-
1. Re: Urgent Help Please, Suggestion Box
ilya_shaikovsky Sep 8, 2010 2:25 AM (in response to ro86)use a4j:repeat instead of c:forEach
-
2. Re: Urgent Help Please, Suggestion Box
ro86 Sep 8, 2010 4:00 AM (in response to ilya_shaikovsky)Hi LLya, Thanks for your reply,
I tried using a4j:repeat but I faced a problem in the generated component ID.
For the same previous example using a4j repeate
<a4j:repeat value="${bean.inputList}" var="parameter"><h:inputText id="_${parameter.code}" value="#{parameter.value}"/><rich:suggestionbox for="_${parameter.code}"var="result"nothingLabel="No data"selfRendered="true"ajaxSingle="false"suggestionAction="#{bean.autoComplete}"><h:column><h:outputText value="#{result}"/></h:column></rich:suggestionbox></a4j:repeat><a4j:repeat value="${bean.inputList}" var="parameter">
<h:inputText id="_${parameter.code}" value="#{parameter.value}"/>
<rich:suggestionbox for="_${parameter.code}"
var="result"
nothingLabel="No data"
selfRendered="true"
ajaxSingle="false"
suggestionAction="#{bean.autoComplete}">
<h:column>
<h:outputText value="#{result}"/>
</h:column>
</rich:suggestionbox>
</a4j:repeat>
I get the following error on page start:
com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View
javax.faces.FacesException: Component for target _1 not found in SuggestionBox j_1_sb
When I tried to load the page without suggestion components I found that generated
component ids doesn't match the value given in the repeat tag , instead it was given a value like 'j_id40:0:_'
-
3. Re: Urgent Help Please, Suggestion Box
ilya_shaikovsky Sep 10, 2010 5:56 AM (in response to ro86)change to
<h:inputText id="justPlainShortId" value="#{parameter.value}"/>
<rich:suggestionbox for="justPlainShortId"
-
4. Re: Urgent Help Please, Suggestion Box
ro86 Sep 13, 2010 8:41 AM (in response to ilya_shaikovsky)Thanks Ilya, It is now working