How to get row index in table?

I will show row no in table.
In help,I find a example and follow it,I test:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="rowSetProperty"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetProperty name="estimatedRowCount"/>
</boundAttribute>
</bc4j:input>
</contents>
</bc4j:column>
It's OK! But I couldn't get current row index.
I test:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="rowSetProperty"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetProperty name="currentRowIndex"/>
</boundAttribute>
</bc4j:input>
</contents>
</bc4j:column>
It's error! How can I do?

Thanks
I try:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="Seq No"/>
</columnHeader>
<contents>
<textInput readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetIteratorProperty name="currentRowIndex"/>
</boundAttribute>
</textInput>
</contents>
</bc4j:column>
Nothing be showed in the table cells.
Here, I finished using Javabean:
public class ClsRowIndexBean
private int _counter=0; 
public ClsRowIndexBean()
public int getCounter()
return _counter++;
public int getCurrentCounter()
return _counter;
public void setCounter(int counter)
_counter = counter;       
}

Similar Messages

  • How to get row index in dynamically populated table?

    Hi,
    I am following example given in http://balusc.xs4all.nl/srv/dev-jep-dat.html to Dynamically populate datatable. How can I get row index while populating table in populateDynamicDataTable() method
    private List myList;
    private String[] headers; // Optional.
    private HtmlDataTable dynamicDataTable;
    // Actions ----------------------------------------------------------
    public void loadMyList() {
    // Set headers (optional).
    headers = new String[] {"header1", "header2", "header3"};
    // Set rows. This is a stub example, just do your dynamic thing.
    String[] row1 = {"ID1", "Name1", "Value1"};
    String[] row2 = {"ID2", "Name2", "Value2"};
    String[] row3 = {"ID3", "Name3", "Value3"};
    // Convert rows to List and set the List.
    myList = new ArrayList();
    myList.add(Arrays.asList(row1));
    myList.add(Arrays.asList(row2));
    myList.add(Arrays.asList(row3));
    public void populateDynamicDataTable() {
    //*********************** I want current row in this method *************//
    // Any columns?
    if (myList != null && myList.size() > 0) {
    dynamicDataTable = new HtmlDataTable();
    // Get amount of columns.
    int columns = ((List) myList.get(0)).size();
    // Set columns.
    for (int i = 0; i < columns; i++) {
    // Set header (optional).
    UIOutput header = new UIOutput();
    header.setValue(headers);
    // Set output.
    UIOutput output = new UIOutput();
    ValueBinding myItem =
    FacesContext
    .getCurrentInstance()
    .getApplication()
    .createValueBinding("#{myItem[" + i + "]}");
    output.setValueBinding("value", myItem);
    // Set column.
    UIColumn column = new UIColumn();
    column.setHeader(header);
    column.getChildren().add(output);
    // Add column.
    dynamicDataTable.getChildren().add(column);
    // Getters ----------------------------------------------------------
    public List getMyList() {
    return myList;
    public HtmlDataTable getDynamicDataTable() {
    if (dynamicDataTable == null) {
    loadMyList(); // Reload to get most recent data.
    populateDynamicDataTable();
    return dynamicDataTable;
    // Setters ----------------------------------------------------------
    public void setMyList(List myList) {
    this.myList = myList;
    public void setDynamicDataTable(HtmlDataTable dynamicDataTable) {
    this.dynamicDataTable = dynamicDataTable;
    I have tried dynamicDataTable.getRowIndex, but it returns -1
    Is there any other way?
    Thanks ,
    Chitra.

    When you dynamically populate a datatable, you're populating the columns, not the actual rows.
    Just add EL to the styleClass attribute, like:styleClass="#{myBean.myTable.rowIndex == 1 ? 'highlightedClass' : 'defaultClass'}"where 'myTable' refers to a HtmlDataTable property in the backing bean.

  • How to get row index of data table in the while ValueChangeListener fired?

    Hi,
    i have a data table in my page, which contains various components like inputText, selectOneChoice in each row.
    i am invoking a method ValueChangeListener attribute of the selectOneChoice component. I have given the autoSubmit=true for this component.
    <tr:selectOneChoice id="ratingModelType"
    value="#{childRatio.ratingModelType}" binding="#{pageManager.form.bindRatioType}"
    valueChangeListener="#{pageManager.form.onRatingModelTypeChange}" autoSubmit="true"
    contentStyle="width:150px" required="#{!childRatio.disableChildRatioRatingModelType}"
    requiredMessageDetail="#{appBundle['error.ratingModelTypeShouldNotBeEmpty']}">
    <f:selectItems value="#{pageManager.catalog['Rating Model Type']}" />
    <tr:selectOneChoice>In that method i want to fetch the map(with all updated values) relevant to the currently modified row of the table.
    Since i am not using the selectionListener or any radio buttons in the page i am not able to get the row index of the table.
    somebody please tell me how to get the row index of the table, while ValueChangeListener fired?
    Thanks in advance.
    Subbu

    Hi niki,
    Thank you so much. With your suggestion i got the result exactly what i want.
    thanks again.
    --subbu                                                                                                                                                                                                                               

  • How to get row index?

    Hi,
    can any one tell me how to get the particular row index matrix. I need to get the row index when et_validate event raised.
    Regards,
    Siva

    Hi Siva,
    Use offset property in DBDataSource Object.
      Int RowNo;
    RowNo= DbDatasource.Offset;
    Regards,
    Sravan Kumar Pothu

  • How to get the index of table row without selection?

    Hi all,
    I have an table designed in XML view.Now i have added an change method for qty cell "valqty". When user inputs the qty in the cell and press enter this method is triggered now I want to know which index of the table is currently edited.Through which i can get the value of other cell in the same row.
    NOTE: The table row doesn't have selection either multiple or single
    I tried the following inside the valqty method but it now working
    this.getValue();
    this.getBindingContext().getProperty('PRD_NUM');
    <Table id="idProductsTable"
    inset="false"
    items="{oModel>/deliverylist}"
    visibleRowCount= "7"
    mode="MultiSelect"
    modeAnimationOn="true">
    <headerToolbar>
    <Toolbar>
    <Label text="Products"></Label>
    </Toolbar>
    </headerToolbar>
    <columns>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Order" />
    </Column>
    <Column
    minScreenWidth="Tablet"
    demandPopin="true">
    <Text text="Quantity" />
    </Column>
    </columns>
    <items>
    <ColumnListItem>
    <cells>
    <Text text="{oModel>PRD_NUM}" />
    <Input value="{oModel>DEL_QUAN}" change="valqty" maxLength="13"  />
    </cells>
    </ColumnListItem>
    </items>
    </Table>
    Thanks

    Thanks Robin,
    But in my case oEvent.getSource() is returning the cell instance and
    oEvent.getSource().getBindingContext() is undefined
    Hence not getting the value
    I also tried the following
    oEvent.getSource().getParent().getParent().indexOfItem()
    But index returned is -1

  • How to get row number of selected entry from OVS search result

    Hi,
    Anyone having any idea on how to get row number of the  selected entry/ how to differentiate rows in OVS search result in ON_OVS method?
    Regards,
    Jatin

    Hi,
    You can get the selected record to <ls_selection> structure in co phase 3.
    From that structure you can get what ever field you want.,
    check the below code for reference,
    << Moderator message - Cut and paste response from F4 help for ALV table field removed. Plagiarism is not allowed in SCN >>
    hope this helps u.,
    Thanks & Regards,
    Kiran
    Edited by: Rob Burbank on Jan 5, 2012 5:24 PM

  • How to get the index of a h:column element?

    Hi!
    I'd like to know how to get the index of a <h:column> element.
    Here is the code of what I'm trying to do:
    <h:column>
         <a:commandLink
              value="#{familyAction.familyDocsByPrj}"
              action="#{homeAction.search(ROW_INDEX)}"
              reRender="rightAppPanel" />
    </h:column>When clicking a row, I'd like to make a "search" depending on the selected row.
    Does anybode know how to do that?
    Thanks a lot :)

    Thanks a lot for all your answers! :)
    I finally got to do something with my little knowledge =P
    I created a new class containing all the data needed for the dataTable (including a "String id").
    And that's what I get:
    <h:column>
         <a:commandLink
              value="#{familyAction.familyDocsByPrj.name}"
              action="#{homeAction.search(familyAction.familydocsByPrj.id)}"
              reRender="rightAppPanel" />
    </h:column>

  • How about get item count of table in formGroup.vm

    JHeadstart Team:
    I want change maxColumns=" 1" or" 2" by item count of table .but I do not know how about get item count of table .
    #if (${JHS.current.group.columns} > 10)
    #set ($majin = 2)
    #else
    #set ($majin = 1)
    #end
    <af:panelForm rows="1" maxColumns="$majin" width="${JHS.current.group.formWidth}" id="${JHS.current.group.shortName}FormItems">
    majin
    #FORM_ITEMS()
    </af:panelForm>

    You can do this using the following syntax:
    #if (${JHS.current.itemContainer.items.size()}>10)
    maxColumns="2"
    #else
    maxColumns="1"
    #end
    Steven Davelaar,
    Jheadstart Team

  • How to get all INDEXes from a database

    How to get all INDEXes in a database? I need to store them in script file (.SQL). My database version is 10.2.0.3.0.
    Edited by: Iniyavan on Sep 18, 2009 1:39 PM

    --Thanks, Koppelaars. The second query works. But I'm unable to store in spool file. May be it's due to CLOBs in the output. I did the following:
    set head off
    set feedback off
    set linesize 32727
    set pagesize 50000
    spool c:\indexes.sql
    select dbms_metadata.get_ddl('INDEX',INDEX_NAME,'MYSCHEMA')
    from user_indexes;
    spool off
    --In the spool file, I find only this
    CREATE UNIQUE INDEX "MYSCHEMA"."A" ON "MYSCHEMA"."BNK_DEALID" ("DEAL_ID")
    PCTF
    CREATE INDEX "MYSCHEMA"."ACCENT_RAC_REPORT" ON "MYSCHEMA"."ACCENT" ("SCHEME", "VAL
    CREATE INDEX "MYSCHEMA"."ACCENT_REPORT" ON "MYSCHEMA"."ACCENT" ("SCHEME", "APP_REF
    CREATE UNIQUE INDEX "MYSCHEMA"."ACCENT_X" ON "MYSCHEMA"."ACCENT" ("DEAL_ID")
    P
    CREATE UNIQUE INDEX "MYSCHEMA"."ACCNAV_X" ON "MYSCHEMA"."ACCNAV" ("SCHEME", "ACCNA
    --How to get all the DMLs in one SQL file?
    --Nagappan, I'm using WIN.

  • I'm a MB Pro beginner (after 25 years with PC). I have an Iomega ext HD, but how do get it indexed. I'm trying searches in Finder, and it says "searching Iomega drive" - but I don't think it's indexing. How do I force it to index?

    I'm a MB Pro beginner (after 25 years with PC). I have an Iomega ext HD, but how do get it indexed?, and it doesn't come up with any results I'm trying searches in Finder, and it says "searching Iomega drive" - but I don't think it's indexing. How do I force it to index?

    Well I'm leaning the other way. I think my present MBP will be the last Apple product I buy.
    With the way Apple is going, all New Mac computers are sealed unit that don't allow the user to upgrade them in any way. They are getting more expensive initially. They are impossible to fix, even by Apple. All the parts are either soldered to the Logic Board or glued inside the case parts. The add on warranty only covers manufacturing defects and is expensive. And to fix one out of waranty is close to if not more then a new system.
    The only thing different in a Mac, and most other products Apple sells, is the operating system and the cases they come in. As for the OS both have their glitches and at this time there are no viruses that infect OS X. There is more software available for Windows. More choices as to what hardware you can use or upgrade to at a later date.
    Mac computers are becoming large iPads or iPhones with built in keyboards.
    jeremy_from_rome wrote:
    And as for the question: PC or Mac, the consensus that I hear from colleagues and friends is just as you state it: stay with Mac, be patient, work at it, and you’ll never look back! Thanks again

  • How to get the index of selected values in SelectManyChoice...

    How to get the index of selected values in SelectManyChoice... the value which i get is coming when i submit the value second time

    By using the given code i get the value of the selected indices, but problem here is i get the value when it get submits at the second time... First time the length of that int array is 0.
    Second time it shows the value two times (i.e) First time submitted value and the second time submitted value. After that it works fine.. I have problem while clicking first time only..
    The Following error also raises.. One multiselect is dependent on other multiselect.
    DF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
    java.lang.ArrayIndexOutOfBoundsException: 6
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:334)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:199)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2416)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3717)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:500)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)

  • How to get value on the table control in infotyp e0008

    Dear Freinds
                I have written a user exit ZXPADU02 for my requirement
    as per the requirement in i have calculated  wa-poo8-bet01 = wa_p0008-ansal/12 and i have passed on to the INNNN structure .
    Nowe when do a Create or Copy for a rcord in  infotype 0008  iam not
    getting value on Q0008-betrg field on the SCREEN , since it is table control how to get data on the table Control Cell .
    Please let me knlow
    regards

    Hi Syamala,
    The try to find the name of the table control and pass the values to it.
    Of course you have to loop and endloop, the table control and mofidy it from the work area.
    Message was edited by:
            Sera

  • How to get count,index and compare to arraylists

    hi
    how to get count,index and comparing of 2 arraylist.... plz suggest me asap...

    How is your question related to JDBC? And what have you done so far with your code?

  • How to get the index of a row in dynamically generated list

    Hi,
    I am displaying a list which contains 6 rows using <logic:iterator/>
    If i am changing a text value which is in 3 row, I want to pass that row index to the javascript function.
    I am using IndexId attribute of <logic:iterator> to get the index of a row,but
    It is working fine for Hyperlink buttons, but it is no working for text boxes.
    can any one plz help me..
    Thanks,
    madhu

    madhu,
    Please post your code... It's a bit like asking a mechanic to fix your car blind folded.

  • How to get data from large table (more than 9 million rows) by EJB?

    I have a giant table, it has more than 9 million rows.
    I want to use ejb finders method to get data from this table but always get not enough memory error or time out error,
    Can anyone give me solutions?
    Thx

    Your problem may be that you are simply trying to load so many objects (found by your finder) that you are exceeding available memory. For example if each object is 100 bytes and you try to load 1,000,000 objects thats 100Mb of memory gone.
    You could try increasing the amount of memory available to OC4J with the appropriate argument on the command line (or in the 10gAS console). For example to make 1Gb available to OC4J you would add the argument:
    -Xmx1000m
    Of course you need have this available as hard memory on your server or you will incur serious swapping.
    Chris

Maybe you are looking for

  • ITunes won't play certain songs...help!

    Ok so these songs it wont play have always played before and now all of a sudden they don't want to play also it shows the album artwork as not modifiable all of a sudden..i thought i could delete them then open them up again onto itunes but now they

  • Reports 10g vs the good old days

    Having been running reports from forms since the good/old client-server days, reports 10g is both a blessing and a curse. While it's certainly nice not to have to install software on each and every client box, since reports are now kept in cache on t

  • CWMS call-in drop after meeting-ID entered

    Phones or devices registered directly to our UCM are able to join CWMS meetings just fine. All CWMS functionality working fine other than this dial-in scenario. A remote office is setup with a new DID for local calls going to CWMS. This DID is transl

  • Burning DVD to watch in mexico

    Which setting I need to burn a DVD for US also Mexico? are they different or the same. Lately I burned a DVD  just following the Adobe Premiere 11 Publish and Share but when they tried to watch it in Mexico they couldn't . Please help

  • Processor Whine..

    I know this is something that is being posted about quite a lot but i wanted to put in my findings. My MBP arrived four days ago and i have noticed the processor whine, and although it's not bad enough to drive me from the room its annoying because t