cancel
Showing results for 
Search instead for 
Did you mean: 

How to give the TableView id dynamically

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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"/>

<%

}

%>