SuggestionBox not working in f:subview
gibiman Jun 30, 2008 8:08 AMHi ,
This is a possible bug ... or of course a small mistake on my part :) .
The following works like charm :
<f:loadBundle basename="ro.msf.messages.labels" var="msg" />
<f:view>
<html>
<head>
</head>
<body>
<h:form>
<rich:modalPanel id="panel" width="350" height="100">
<f:facet name="header">
<h:panelGroup>
<h:outputText
value="#{msg.subview_cumparator_TitluMeniuSelectareClient}"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="/images/modal/close.png"
style="cursor:pointer" id="hidelink" />
<rich:componentControl for="panel" attachTo="hidelink"
operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<h:outputText
value="To close the window please click the top-right close button"></h:outputText>
<!-- eventQueue !!!!! -->
<h:inputText value="#{clientsBean.clientSelectat}" id="text" />
<rich:suggestionbox id="suggestionBoxId" for="text" tokens=","
suggestionAction="#{clientsBean.autocomplete}" var="result"
fetchValue="#{result.numeClient}" first="#{suggestionBox.intFirst}"
minChars="#{suggestionBox.minchars}"
shadowOpacity="#{suggestionBox.shadowOpacity}"
border="#{suggestionBox.border}" width="#{suggestionBox.width}"
height="#{suggestionBox.height}"
shadowDepth="#{suggestionBox.shadowDepth}"
cellpadding="#{suggestionBox.cellpadding}"
nothingLabel="#{msg.subview_cumparator_MeniuSelectareClient_MesajNiciUnRezultat}">
<h:column>
<f:facet name="header">
<h:outputText value="123"></h:outputText>
</f:facet>
</h:column>
<h:column>
<h:outputText value="#{result.numeClient}" />
</h:column>
<h:column>
<h:outputText value="#{result.nrRegComert}"
style="font-style:italic" />
</h:column>
</rich:suggestionbox>
</h:form>
</body>
</html>
</f:view>
on the other hand , the following code does not , it simply won't call the autocomplete method :
<f:subview id="subview_cumparator">
<h:form>
<rich:modalPanel id="panel" width="350" height="100">
<f:facet name="header">
<h:panelGroup>
<h:outputText
value="#{msg.subview_cumparator_TitluMeniuSelectareClient}"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="/images/modal/close.png"
style="cursor:pointer" id="hidelink" />
<rich:componentControl for="panel" attachTo="hidelink"
operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<h:outputText
value="To close the window please click the top-right close button"></h:outputText>
<!-- eventQueue !!!!! -->
<h:inputText value="#{clientsBean.clientSelectat}" id="text" />
<rich:suggestionbox id="suggestionBoxId" for="text" tokens=","
suggestionAction="#{clientsBean.autocomplete}" var="result"
fetchValue="#{result.numeClient}" first="#{suggestionBox.intFirst}"
minChars="#{suggestionBox.minchars}"
shadowOpacity="#{suggestionBox.shadowOpacity}"
border="#{suggestionBox.border}" width="#{suggestionBox.width}"
height="#{suggestionBox.height}"
shadowDepth="#{suggestionBox.shadowDepth}"
cellpadding="#{suggestionBox.cellpadding}"
nothingLabel="#{msg.subview_cumparator_MeniuSelectareClient_MesajNiciUnRezultat}">
<h:column>
<f:facet name="header">
<h:outputText value="123"></h:outputText>
</f:facet>
</h:column>
<h:column>
<h:outputText value="#{result.numeClient}" />
</h:column>
<h:column>
<h:outputText value="#{result.nrRegComert}"
style="font-style:italic" />
</h:column>
</rich:suggestionbox>
</rich:modalPanel>
</h:form>
</f:subview>
If i have done somthing wrong , please warn me , if not suggest me a work-around , other than removing the subview :D
Thanks ,
Victor