Hi All,

I am trying to put a bunch of user input controls on a web page
dynamically using tr:iterator ... and then tie each control to an
element of a dynamic list in my backing bean so I can access to the user
input from the bean. What I want to know is whether it is even possible
to set value for a specific list element from the JSP page? I can't
figure out what kind of a getter/setter method my dynamic list needs to
have.

Here is the JSP code snippet that I am thinking of ...

<tr:iterator value="#{myBean.myItemList}" var="myItem" varStatus="rows">
    <h:inputText binding="myBean.myDynamicList[#{rows.index}]"/>
</tr:iterator>

The above inputText binding should translate into
"myBean.myDynamicList[0]", at least that's what I think should happen.
However, for this to work, I would need to have a getter/setter method
for each element of myDynamicList in the backing bean. Since
myDynamicList is supposed to be dynamic (its size can change from one
request to another), I don't know the number of elements in it and
therefore I cannot hard-code the getter/setter methods. Any suggestions
or comments would be greatly appreciated.

Thanks!

Usman Malik


NOTE: The information in this email may be confidential and legally
privileged. If you are not the intended recipient, you must not
read, use or disseminate the information; please advise the sender
immediately by reply email and delete this message and any
attachments without retaining a copy. Although this email and any
attachments are believed to be free of any virus or other defect
that may affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by RGIS, LLC for
any loss or damage arising in any way from its use.

Reply via email to