Hey!
Has anybody successfully used a suggestionbox within a rich tree? i have added <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/> to the suggestion box, which fixed the first problem of bad IDs. The following problems remain, however:
1. The suggestion box renders twice (both with the correct data): as a non-rich/non-scrollable table directly below the input field (wrong look, right location) and as a rich-scrollable window at the top left corner of my form (right look, wrong location).
2. Selecting a choice in the suggestion box does nothing. The input field is not updated.
3. I get frequent "Out of memory: line 99" errors in IE 7.
Thanks!
My markup currently looks like:
<html>
<body>
<a4j:form>
<rich:panel>
<rich:tree switchType="client" value="#{MyBean.richTreeModel}" var="item" nodeFace="#{item.type}">
<rich:treeNode type="Value">
<ui:include src="/value.xhtml"/>
</rich:treeNode>
</rich:tree>
</rich:panel>
<a4j:outputPanel ajaxRendered="true">
<h:messages/>
</a4j:outputPanel>
</a4j:form>
</body>
</html>Value.xhtml:
</ui:component>
<a4j:outputPanel ajaxRendered="true">
<h:panelGrid columns="3">
...
<h:panelGroup>
<h:inputText value="#{item.value}" id="valueInput"/>
<rich:suggestionbox eventsQueue="suggestQueue" for="valueInput" height="150" width="150" border="1" suggestionAction="#{item.autocomplete}" var="suggest">
<a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/>
<h:column>
<h:outputText value="#{suggest}"/>
</h:column>
</rich:suggestionbox>
</h:panelGroup>
</h:panelGrid>
</a4j:outputPanel>
</ui:component>