How to Display Record Count on Search page?

Hi
I am new to OAF and one of the requirement is to display record count on Search page . I followed the same steps in Emp Search page as an example and created my search page.
I followed the following steps
1) I created a transietn Attribute in VO by name RecordCount
2) I had written a method in AMImpl
public void getRecordCount() {
OAViewObject vo = getXXG2SourceAcctSearchVO1();
int fetchedRowCount = vo.getFetchedRowCount();
String msg = fetchedRowCount + " are retrived by query ";
System.out.println(msg);
String xfetchedRowCount = Integer.toString(fetchedRowCount);
System.out.println("xfetchedRowCount : " + xfetchedRowCount);
OARow reportRow = (OARow)vo.createRow();
System.out.println("in set attribute");
reportRow.setAttribute("RecordCount",xfetchedRowCount); // I am using this way and trying to display record count into RecordCount view Attribute
}//getRecordCount
3) on the SearchPG, I created a new messageStyledtext by name RecordCount and assinged VO and viewAttribute accordingly
I am not able to see record count when i run the page ?
Am i missing any steps ?
I see the messages in the log file but not in Record count box ?
Any suggestions?
Thanks
Ravi

Hi Anoop
i made the code change according to you and because of the following condition, it is createing a" new row" in the search page
Row row = vo.createRow();
vo.insertRow(row);
For every search it is creating a new blank row in search page .
I did some more research and modified my code as
public void getRecordCount() {
OAViewObject vo = getXXG2SourceAcctSearchVO1();
int fetchedRowCount = 0;
fetchedRowCount = vo.getFetchedRowCount();
String msg = fetchedRowCount + " are retrived by query ";
System.out.println(msg);
//vo.setMaxFetchSize(0);
//vo.executeQuery();
if (fetchedRowCount == 0 )
Row row = vo.createRow();
//row = (OARow)vo.first();
row.setAttribute("RecordCount", "0");
else
String xfetchedRowCount = Integer.toString(fetchedRowCount);
System.out.println("xfetchedRowCount : " + xfetchedRowCount);
Row row = vo.createRow();
//vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
// Set the primary key value for this single-row VO.
row = (OARow)vo.first();
row.setAttribute("RecordCount", xfetchedRowCount);
and in AM , I am calling this method in PFR as follows
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am1 =
(OAApplicationModule)pageContext.getApplicationModule(webBean);
am1.invokeMethod("getRecordCount");
now i see the record count on the search page . but after 2-3 searches, the record count value is not populating the correct value. its weird
Any suggestions
Thanks
Ravi

Similar Messages

  • How to display stock count on partlist page

    Hi everyone
    Can anybody tell me which aspx or ascx file I need to modify in order to display the stock count on the partlist page where now only presents Image PartNo     Description Price and AddtoCart button.
    Thanks and regards
    Sky

    hi sky,
    here is one possible solution - because I am not sure it's possible to do what you want to do with the supplied controls, as you have no access to the codebehinds.
    Instead, rewrite the PartListblock.ascx to function exactly the way you want to (it's really just a table of data). I've been doing this with my own setup because I find a lot of the time I just can't get the exact functions that I need using the builtin controls.
    Here is an example (very basic) of how you could do it.
    Create a new Web User Control in the catalog/controls folder.
    This would be the .ascx file: (using C#)
    (note I am using .NET 2.0, its OK as long as you also have .NET 1.1 installed on the server as well I have found you can create your own controls using 2.0 and Netpoint will still work fine)
    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MyPartsListBlock.ascx.cs" Inherits="catalog_controls_MyPartsListBlock" %>
    <%@ Import Namespace="netpoint.api.catalog" %>
    <asp:Repeater ID="repItems" runat="server">
    <ItemTemplate>
    <table>
    <tr>
    <td><%#((NPPart)Container.DataItem).ThumbNail %></td>
    <td><%# ((NPPart)Container.DataItem).PartNo%></td>
    <td><%# ((NPPart)Container.DataItem).Inventory %></td>
    <td>Buttons etc</td>
    </tr></table></ItemTemplate>
    </asp:Repeater>
    and here is the codebehind for the control: (MyPartsListBlock.ascx.cs)
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using netpoint.classes;
    using netpoint.api.catalog;
    public partial class catalog_controls_MyPartsListBlock : System.Web.UI.UserControl
        private int catID;
        protected void Page_Load(object sender, EventArgs e)
            //get the CategoryID that was passed into us
            catID = Convert.ToInt32(Request["CategoryID"]);
            //get the page object
            NPBasePage p = (NPBasePage)Page;
            //now get the list of parts for the catalog category we are in
            ArrayList parts = p.Catalog.CategoryParts(catID, p.UserID, p.PriceList, p.Encoding);
            //initialise each part's Inventory count
            foreach (NPPart temp in parts)
                temp.GetInventoryCount(p.UserID);
            //finally bind them to the repeater
            repItems.DataSource = parts;
            repItems.DataBind();
    If you want to use only .Net 1.1 then take out the "Codefile" reference in the first section and put in 2  @Import directives to import the netpoint.api.catalog and netpoint.classes namespaces, then override Page_Load in the ascx file.
    Once you have tested this you can then replace the control on the partslist.aspx with your own control.
    I am assuming you are familiar with asp.net - as you can see all I've done is put in a very basic repeater here which is bound to an ArrayList of NPParts, this list is initialised by getting the CategoryID Request variable and just using the builtin methods of the NPBasePage to get tye list of items
    This way you get total control over the ability to call GetInventoryCount() on the items in the list.
    Obviously you will want to put more elements like images and links into the Repeater's ItemTemplate, but that's just the usual, you can override repItems_OnDataBound to set the image path and the links as each row in the repeater is created, etc.
    Hope this helps, and sorry if its confusing but it will work for you if you just take some time with it.
    Steve

  • Display records as tiles on page

    Hi to everyone, I need you help again.
    I m having a datacontrol consisting of blob column consisting of images, when query result should display only images as tiles on page, facing problem of how to display them as tiles in page (ike google image search). pls share info or sample example !
    Thanks.

    yeah now im able to display image as thumbnails but i got another problem , for every thumbnail i have included a link when clicked it will display a popup, nut im unable to dispaly the data(table record as form type) in the popup dialog .
    jspx code:
    <af:popup id="p1" partialTriggers="cl1" contentDelivery="lazy"
    rendered="true">
    <af:dialog id="d2">
    <af:panelLabelAndMessage label="location" id="plam1">
    <af:outputText value="#{bindings.PropertyVO2.children[stat.index].PropLocation}"
    id="ot3"/>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="Address" id="plam2">
    <af:outputText value="#{bindings.PropertyVO2.children[stat.index].PropAddress}"
    id="ot4"/>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="type" id="plam3">
    <af:outputText value="#{bindings.PropertyVO2.children[stat.index].PropType.attributeValue}"
    id="ot5"/>
    </af:panelLabelAndMessage>
    <af:panelLabelAndMessage label="Price" id="plam4">
    <af:outputText value="#{bindings.PropertyVO2.children[stat.index].PropPrice}"
    id="ot6"/>
    </af:panelLabelAndMessage>
    </af:dialog>
    </af:popup>
    <h:panelGrid columns="3" cellpadding="15" cellspacing="15"
    style="text-align: center;" rowClasses="bottomAlign">
    <af:forEach varStatus="stat" begin="0" end="19"
    items="#{bindings.PropertyVO2.allRowsInRange}">
    <af:panelGroupLayout layout="horizontal" halign="center" id="pgl20"
    inlineStyle="padding:5.0px;">
    <af:panelBox id="pb2" background="light" showHeader="never"
    type="default">
    <af:image clientComponent="true"
    source="/imageservlet?id=#{bindings.PropertyVO2.children[stat.index].PropId}"
    id="prodimage"
    inlineStyle="width:320px; height:240.0px;">
    <af:clientAttribute name="PropId"
    value="#{bindings.PropertyVO2.children[stat.index].PropId}"/>
    <af:attributeDragSource attribute="PropId"/>
    </af:image>
    <af:commandLink text="View Details#{bindings.PropertyVO2.children.PropId.currentRow}" id="cl1">
    <af:showPopupBehavior popupId="p1"/>
    </af:commandLink>
    </af:panelBox>
    </af:panelGroupLayout>
    </af:forEach>
    </h:panelGrid>
    pagedef code:
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.60.13" id="tilePageDef" Package="view.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <iterator Binds="PropertyVO2" RangeSize="25" DataControl="TestAMDataControl"
    id="PropertyVO2Iterator"/>
    </executables>
    <bindings>
    <tree IterBinding="PropertyVO2Iterator" id="PropertyVO2">
    <nodeDefinition DefName="viewvo.PropertyVO" Name="PropertyVO20">
    <AttrNames>
    <Item Value="PropId"/>
    <Item Value="PropAddress"/>
    <Item Value="PropLocation"/>
    <Item Value="PropType"/>
    <Item Value="PropPrice"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    </bindings>
    </pageDefinition>

  • How to display records into a non table base block..

    Hi,
    Can anybody help me how to display records into a non table base block....
    Find below is my coding but it only display the last record in the first line
    in the block.
    PROCEDURE CREATE_CARTON_QUESTION IS
    CURSOR car_c IS
    select /*+ rule */ question_id, question_description
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
    v_found VARCHAR2(10);
    v_status boolean;
    v_error      varchar2(150);
    v_count number;
    car_r car_c%rowtype;
    begin
    begin
    select count(*) into v_count
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
         exception
         when no_data_found then
         v_count := 0;
    end;
    if v_count > 0 then
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id     := car_r.question_id;
    :la_carton.carton_question_answer     := 'N';
    :la_carton.carton_error_details     := null;
    :la_carton.attribute2          := car_r.question_description;
    end loop;
    end if;
    end;
    Thanks in advance.
    Regards,
    Jun

    Hi SNatapov,
    Thanks for you reply but still I get this error...
    FRM-40737 Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.
    Please note that I call that program unit in the last field of my control block inside when-validate-item trigger the questions should be display in la_carton block which is my non-base table block.
    Find below is the code....
    begin
    go_block('la_carton');
    first_record;
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id := car_r.question_id;
    :la_carton.carton_question_answer := 'N';
    :la_carton.carton_error_details := null;
    :la_carton.attribute2 := car_r.question_description;
    next_record;
    end loop;
    end;
    Hoping you can help me this problem...
    Thanks in advance.
    Regards,
    Jun

  • How to display records in jsp

    i have 100 records can anybody tell me how i display records 10 at atime in jsp & by clicking the next button another 10 records displays in the same jsp. How i can do that thing.

    You have to implement a page breake yourself.
    Simple scenario would be to store a page number into a session:
    session.setAttribute("page", selectedPage)
    every time user clicks on a next page link
    When displaying the record read the page and display only those which should be on the page
    Integer selectedPage = session.getAttribute("page")
    if (selectedPage == null) selectedPage = 1;
    //display code goes here

  • How to display query result in seperated page.

    How to display query result in seperated page, if the results are very big (more than 5000 records) and there are so many concurrent users (about 500 - 1000 users).
    Are there any solutions or frameworks?
    Plese help me .........
    thanks,
    --bhasin

    Hi,
    How to display query result in seperated page?I think RowSet will be the better technology to use in this
    situation.For more information on this please visit http://developer.java.sun.com/developer/Books/JDBCTutorial/chapter5.html
    which explains in detail about RowSets.
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support/

  • Any suggestions how to display iframe of sharepoint 2013 page in 2010 page?

    Any suggestions how to display iframe of sharepoint 2013 page in 2010 page?
    keren tsur

    SharePoint by default includes the HTML header X-Frame-Options:SAMEORIGIN which only allows content within iFrames from the same page host.
    You can add
    <WebPartPages:AllowFraming runat="server"
    />
    to the SharePoint 2013 page to allow it to be used in an iFrame.
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • How to display all data on one page in web app

    Hello.
    So I have web app JSF (IceFaces framework) + JBoss all Crystal Report working perfectly. So I have page with Crystal Report tags (e.g.
    <bocrv:reportPageViewer reportSource="#{crystalReport.reportPath}" ...
    in this report I have table with some data (data from DB) and I want to display this data on one page. Unfortunately now this data are moving to the next page and unfortunately I even donu2019t know how switch to the next page (I see only info e.g. 1with 2).
    So how to display this data on one page if its impossible how to torn on pagination.

    So I canu2019t do this, I canu2019t display all data on one page (until Iu2019m using JSF tags)?
    In JSF tags Iu2019m setting only path to file. In my bean Iu2019m using u201CReportClientDocumentu201D object itu2019s easy way to load report file (u201Copenu201D method) and set parameters (u201CgetDataDefController().getParameterFieldController()u201D method) and also connect to data base (u201Clogonu201D method) but I havenu2019t this property u201CsetSeparatePages(boolean)u201D.
    Maybe Iu2019m doing this wrong and there is a simpler way maybe I can use somehow u201CCrystalReportVieweru201D please give my any advice.

  • How to display the count of a list item in Sharepoint Designer?

    How to display the count of a list item in Sharepoint Designer? please reply with the proper code line to add for this.

    Hello,
    What version of sharepoint you are using? Try below approach:
    http://sharepointlogics.com/2010/03/total-count-of-items-in-list-in.html
    Hope it could help
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer
    Please feel free to unmark answer if does not resolves your problem.

  • How to display flash file in adf pages

    how to display flash file in adf pages need help

    Thanks all,
    It is resolved.
    the code i am using to display a flash is below.
    <f:verbatim>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version
    =10,0,0,0" width="300" height="300" id="11gR1_aniH_grey" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="wmode" value="transparent" />
    <param name="movie" value="mx2004demo.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#4d5c64" />     
    <embed src="../Images/mx2004demo.swf" quality="high" width="300" height="300" name="mx2004demo.swf" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false"
    type="application/x-shockwave-flash" wmode="transparent"
    pluginspage="http://www.adobe.com/go/getflashplayer" />
         </object>
    </f:verbatim>

  • How to implement the record count on the page

    Dear,
    I have a basic search page, results region with a simple table.
    I need to show the total number of records returned by a search query.
    Suppose I create messageStyledText "counter" bean to show the result.
    The result will be calculated in the ProcessFormRequest, how would I set the value of the the "counter" bean then? I can not do that in PFR.
    Thank you
    Anatoliy

    In the PFR method of controller, get the row count of VO when user click on search button and then set its value in the counter bean.
    Here the dummy code.. check syntax error & other compile time error
    if(pageContext.getParameter("SearchBtn") != null)
    OAViewObject vo = (OAViewObject)am.findViewObject("SearchVO1")
    if (vo!= null)
    String fetchedRowCount = vo.getFetchedRowCount();
    OAMessageStyleTextBean msb = (OAMessageStyleTextBean)webBean.findChildRecursive("CounterBean");
    if(msb != null)
    msb.setvalue(pageContext, fetchedRowCount);
    }Thanks
    --Anil
    http://oracleanil.blogspot.com

  • How to get th displaye record count through SQL*Plus without result

    set lines 155
    set pages 100
    set autoprint on
    variable cv refcursor
    set serveroutput on size 1000000
    set timing on
    set feedback on
    set echo on
    exec proc_name (input1, input2, :cv);how to get the record count without resultset display in the sql*plus promt ...?
    plz help me....

    This is my earilier code
    set lines 155
    set pages 100
    set autoprint on
    variable cv refcursor
    set serveroutput on size 1000000
    set timing on
    set feedback on
    set echo on
    exec proc_name (input1, input2, :cv);
    Then i have tried to execute like this
    declare
    disp SYS_REFCURSOR;
    cv SYS_REFCURSOR;
    cnt number :=0;
    begin
    proc_name (input1, input2, :cv);
    FOR disp in cv --here cv is the set of record set
    LOOP
    --FETCH cv INTO disp;
    EXIT WHEN cv%NOTFOUND;
    cnt := cnt + 1;
    END LOOP;
    dbms_output.put_line(cnt);
    dbms_output.put_line(cv%rowcount);
    CLOSE cv;
    end;
    getting error...
    LOOP
    ERROR at line 8:
    ORA-06550: line 8, column 2:
    PLS-00103: Encountered the symbol "LOOP" when expecting one of the following:
    . ( % ; for
    The symbol "; was inserted before "LOOP" to continue.
    ORA-06550: line 13, column 2:
    PLS-00103: Encountered the symbol "DBMS_OUTPUT"
    ORA-06550: line 13, column 27:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( , * % & - + / at mod rem <an identifier>
    <a double-quoted delimited-identifier> <an exponent (**)> as
    from into || bulk
    I have set of executable procedure script for exec procedure1(input1, input2 :cv); , exec procedure1(input1, input2 :cv);,.... like that. But i want only the record count, while we execute all these scripts in the sql promt...How to do that one.. ?

  • How to set default settings to display record count in multi record block

    Hi All
    Whenever I query my multi record block, I get 1/? as record count at the console in standard Oracle Applications. Is there any setting so that it displays 1/50 (in case total record queried is 50). I don't want to set query all property of block as I don't have any control in standard Apps forms.
    Thanks in advance
    Navdeep

    Check out the next_navigation_item option for the get_item_property procedure. If you use this you can do the process without having to navigate from one item to the next.
    You can do something like this (untested) to move and resize the items (other than the first in the block):
    PROCEDURE move_and_resize(p_item IN ITEM, p_width IN PLS_INTEGER) IS
      prev_item ITEM := Get_Item_Property(p_item, PREVIOUS_NAVIGATION_ITEM);
    BEGIN
      Set_Item_Property(p_item, WIDTH, Get_Item_Property(p_item, WIDTH) + p_width);
      Set_Item_Property(p_item, X_POS, Get_Item_Property(prev_item, WIDTH) +
                                       Get_Item_Property(prev_item, X_POS));
    END move_and_resize;
    move_and_resize(myitem, -30);

  • Displaying the count of search result?

    Hi,
    We have built new search pages for our client to search for candidates registering in their iRecruitment site. The client prefers to see the no of records of each search result. Typically some searches may fetch around 50000 records.
    How to achieve this. Currently we have set the VO_MAX_FETCH_SIZE for one responsibility as 50000. I think this will have a performance impact and it cannot display the exact count if it is > 50000. Is there any other way just to show the count of search records?
    thanks,
    Hem

    Henry,
    As Ram insisted before that if no. of records in your VO is more than max fetch size set in profile option, then it won't return excat number of records.You can very well use this method in normal flow, if you expect that your VO query will not return more than max fetch size records.
    Otherwise run a separate query to get total, as discussed.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to display record in hyperlink in JSP?

    Does any knows how to display the records in hyperlink? That's mean when I retrieve data from one database....two records...let's say peter and thomas....then i want the two records display in hyperlink....that's mean two records can be clicked by the user....and after the user clicked on either one of the record.....the record's value will be able to pass to the other page for use...
    Can anyone pls help me of this?Thank in advanced....

    This will pass the Value from the DB as Query Parameters to the Target JSP.
    Peter
    Thomas

Maybe you are looking for

  • BSP page was terminated due

    Hello Experts, I have setup the solaris sever system monitoring (Solman with ECC).. I folled the simulator tool and configured sytstem monitoring.. Now when i click Operation- > System monitoring - >  receive an below eror message.. =================

  • After updating to Mountain lion I am having trouble printing to my wifi Epson printer

    After updating to Mountain Lion I am having trouble printing on my wifi Epson Workforce 645. I keep getting an error message and my computer is set in the system prefrences to that printer

  • Need suggestions for install Solaris10 on IBM R52

    Hi all, I am trying to install Solaris 10 on my IBM R52 laptop, most of the hardwares looks working, except sound card and wireless network card(ethernet card working). I am just a newer to Solaris, so it would be really appreciated if you could give

  • Question re Music Notation Files

    Hi. How do i convert a music notation file (*.mus) to a format that Acrobat supports? Would it support MIDI or a format called all files (*.*)file? The (*.mus) file is from Finale PrintMusic, 2011 version. Anyone who has an answer, let me know as soo

  • XML Forms+Taxonomie

    associate xml filter with a folder how can I do that. I made a XML form with a combobox with two values, and I would like to related this values to a Taxonimie to separate into diferent folders. thks