Skip to Content
avatar image
Former Member

How to give the TableView id dynamically

Hi,

I want to display my form data. In my page I have a header and a detailes section. My Details section repeates and I have to get a same table for mat for each item. The problem I'm facing here is I can't assign the TableView Id dynamically.

My Table:

<hbj:tableView

id="PartsTableView<%=cTab.getTabName()%>"

model="objClaimModule.partsModel"

headerText="Parts"

headerVisible="true"

footerVisible="false"/>

I'm trying to append the <%=cTab.getTabName()%> in a loop.

But When I run the page It's saying----

Form elements must have unique ids: PartsTableView (class com.sapportals.htmlb.table.TableView)

Can anyone throw some light????

Thanks In Advance

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 10, 2004 at 07:56 AM

    The id of an htmlb element must be unique so that it can be retrieved in the dynpage if necessary.

    Think you can use:

    <%

    for(int i =0; i<numberoftables;i++){

    %>

    <hbj:tableView

    id="PartsTableView<%=cTab.getTabName()%><%=i%>"

    model="objClaimModule.partsModel"

    headerText="Parts"

    headerVisible="true"

    footerVisible="false"/>

    <%

    }

    %>

    Add comment
    10|10000 characters needed characters exceeded