-
1. Re: SuggestionBox inside a DataTable?
russell.loewen Mar 20, 2007 2:31 AM (in response to russell.loewen)Just to make sure I was clear there... I currently have it implemented with rich:dataTable, and I am not seeing the suggest box.
-
2. Re: SuggestionBox inside a DataTable?
ilya_shaikovsky Mar 20, 2007 3:59 AM (in response to russell.loewen)Hmm... looks like a common problem..
Suggestion box must send an Ajax request and update its popup.. But it can't perform this in the table because it has not information about cell where it placed and can't find it on reRendering.
Basically such tasks performs with adding
<a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/>
to the Ajax component that must reRender some content for the concrete cell.. look http://www.jroller.com/page/a4j?entry=ajax_updates_inside_jsf_complex1
But it seems that it doesn't work for suggestion box.
So this will be placed to jira. -
3. Re: SuggestionBox inside a DataTable?
f_kasper Mar 20, 2007 4:05 AM (in response to russell.loewen)Hi
I think it is a problem with richface components when they are embedded in a dataTable (no mather which)
I face a similarly problem when trying to use rich:togglePanel within a rich:dataTable. If I use ajax mode nothing hapens but if i use client side the submit buttons on the page don't work (wrong faces state?)
Is there some special methods for using the RichFace component inside a dataTable? -
5. Re: SuggestionBox inside a DataTable?
ilya_shaikovsky Mar 20, 2007 4:22 AM (in response to russell.loewen)I repeat that to start using ajax Components that refresh itself via ajax requests in dataTable you must read:
http://www.jroller.com/page/a4j?entry=ajax_updates_inside_jsf_complex1
There is a simple example about reRendering the only row where Ajax component. -
6. Re: SuggestionBox inside a DataTable?
ilya_shaikovsky Mar 20, 2007 4:23 AM (in response to russell.loewen)provide please examples how did you trying to use such components if you need additional help.
-
7. Re: SuggestionBox inside a DataTable?
russell.loewen Mar 20, 2007 10:21 AM (in response to russell.loewen)Thanks ilya,
I put the AjaxListener in and it is complaining thatParent is not of type AjaxContainer, type is: org.richfaces.component.html.HtmlSuggestionBox
here is an example of my page:<t:dataTable value="#{applicantOperationDetailsBackingBean.incomeItems}" var="v" rowIndexVar="rowNum" columnClasses="column1,column2,column3,column4,column5,column6,column7,column8,column9" footerClass="dataTableFooter" styleClass="dataTable" id="incomeItemTable"> <t:column footerstyleClass="footerTotalStyle"> <f:facet name="header">Eligible Commodity Sales</f:facet> <h:outputText value="#{rowNum+1}. "/> <h:inputText size="20" id="description"/> <rich:suggestionbox for="description" suggestionAction="#{applicantOperationDetailsBackingBean.autocomplete}" var="suggest" border="2" width="200" height="200" minChars="2" fetchValue="#{suggest.englishName}" rows="5" first="0" styleClass="mysb"> <h:column> <h:outputText value="#{suggest.englishName}"/> </h:column> <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/> </rich:suggestionbox> <f:facet name="footer">TOTAL</f:facet> </t:column> </t:dataTable>