| Author |
how to retrieve all the elements created by ui repeat in backing bean
|
alex dethose
Greenhorn
Joined: May 01, 2009
Posts: 1
|
|
hi
I have a list which mantains information for the ui repeat to create either drop down or text box
i would like to retieve all the components created by ui:repeat tag in the backing bean
does any one has a solution for this
This is my jsf code
<div id="homeQuoteCvg">
<ui:repeat value="#{quoteBean.homeCoverageContainer.homePolicyCoverageInfo.basicCvgInfoList}" var="cvgInfo"> <p id="personalliabilityTRbasic">
<LABEL> <SPAN style="WIDTH: 150px" class="Inline">
<h utputText style="cursor: pointer; color: #4aa6ef;" value="#{cvgInfo.cvgDescAbbrv}"/>
</SPAN> <div id="#{cvgInfo.coverageTypeCode}" > <h:selectOneMenu title="#{cvgInfo.coverageTypeCode}" style="backgroundColor : white" value="#{cvgInfo.selectedSeqNum}"
onchange="alert();tabValueChange();"
rendered="#{cvgInfo.cvgAmtUnitCd=='05'}" >
<f:selectItems value="#{cvgInfo.coverageItemList}" />
</h:selectOneMenu>
<h utputText name="cvgCode"
value="#{cvgInfo.selectedAmount}" rendered="#{cvgInfo.cvgAmtUnitCd=='06'}" >
</h utputText>
</div>
</LABEL>
</p>
</ui:repeat> <p>
thanks
alex.
|
 |
suresh dasari
Ranch Hand
Joined: Oct 05, 2009
Posts: 120
|
|
Hi,
now I am facing the same problem, if any one has the solution that would be more helpfull.
|
Sun Certified Java Programmer with 93 percent
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14568
|
|
Welcome to the JavaRanch, Alex!
There's a "Code" button in the message editor that helps make stuff like what you did more readable.
Rather than use ui:repeat, it looks like you should use a dataTable:
The less raw HTML in a JSF View, the better. I usually use either a 1-column panelGrid or something like RichFaces panel control where you used div, BTW. Or, since the dataTable is itself a block element, I could have just attached the "id=" attribute to the dataTable directly.
Note also that I moved all the style info into column classes. That makes it easier to "skin" the View
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: how to retrieve all the elements created by ui repeat in backing bean
|
|
|