Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.