This content has been marked as final.
Show 6 replies
-
1. Re: a4j:support within rich:suggestionbox
ilya_shaikovsky May 17, 2007 8:53 AM (in response to terron)around please your input with suggestion to a4j:region with renderRegionOnly = false.
-
2. Re: a4j:support within rich:suggestionbox
terron May 17, 2007 9:24 AM (in response to terron)Thanks Ilya, that's doing it!
That doesn't mean that I understood why :)
could you give an explanation? region but renderRegionOnly = false !?
Thanks! -
3. Re: a4j:support within rich:suggestionbox
terron May 17, 2007 9:33 AM (in response to terron)
it's ok, got an answer from the doc
http://labs.jboss.com/file-access/default/members/jbossajax4jsf/freezone/docs/devguide/developerGuide.html#region
thanks again -
4. Re: a4j:support within rich:suggestionbox
tuxzilla Jun 28, 2007 2:47 AM (in response to terron)hi, I am trying to do something similar but it doesn't work for me. Here is the view code:
<h:form> ... <table width="580" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <div id="enterBusiness"> <s:decorate id="businessTitleDecoration" template="layout/edit.xhtml"> <ui:define name="label">Business name</ui:define> <h:inputText id="businessTitle" required="true" size="36" maxlength="128" value="#{suggestionBox.businessTitle}"> </h:inputText> </s:decorate> <rich:suggestionbox for="businessTitle" tokens=",[" rules="#{suggestionBox.rules}" suggestionAction="#{suggestionBox.suggestBusinesses}" var="result" fetchValue="#{result.title}" rows="#{suggestionBox.intRows}" first="#{suggestionBox.intFirst}" minChars="3" shadowOpacity="#{suggestionBox.shadowOpacity}" border="0" width="#{suggestionBox.width}" height="#{suggestionBox.height}" selectValueClass="suggestionBoxSelectedRow" shadowDepth="#{suggestionBox.shadowDepth}" cellpadding="#{suggestionBox.cellpadding}" ignoreDupResponses="true" requestDelay="300" styleClass="suggestionBox"> <h:column> <h:outputText value="#{result.title}"/> </h:column> <a:support reRender="phoneDecoration" event="onselect" immediate="true"/> </rich:suggestionbox> <a:region renderRegionOnly="false"> <s:decorate id="phoneDecoration" template="layout/edit.xhtml"> <ui:define name="label">Phone</ui:define> <h:inputText id="businessPhone" required="true" size="36" maxlength="128" value="#{suggestionBox.businessPhone}"/> <h:inputHidden id="businessId" value="#{suggestionBox.businessId}"/> </s:decorate> </a:region> </div> </td> </tr> <tr> <td align="center" height="40"> <h:commandButton id="save" value="Save" action="#{suggestionBox.process}"/> </td> </tr> </table> ... </h:form>
I am trying to submit the form and load the businessPhone and businessId fields of suggestionBox bean based on the selected row in suggestionbox, and then refresh those two fields in view. But the form was never submitted on select event. Am I doing it right? BTW I get access error trying to follow the url. Thanks. -
5. Re: a4j:support within rich:suggestionbox
tuxzilla Jun 28, 2007 3:02 AM (in response to terron)hi, I am trying to do something similar but it doesn't work for me. Here is the view code:
<h:form> ... <table width="580" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"> <div id="enterBusiness"> <s:decorate id="businessTitleDecoration" template="layout/edit.xhtml"> <ui:define name="label">Business name</ui:define> <h:inputText id="businessTitle" required="true" size="36" maxlength="128" value="#{suggestionBox.businessTitle}"> </h:inputText> </s:decorate> <rich:suggestionbox for="businessTitle" tokens=",[" rules="#{suggestionBox.rules}" suggestionAction="#{suggestionBox.suggestBusinesses}" var="result" fetchValue="#{result.title}" rows="#{suggestionBox.intRows}" first="#{suggestionBox.intFirst}" minChars="3" shadowOpacity="#{suggestionBox.shadowOpacity}" border="0" width="#{suggestionBox.width}" height="#{suggestionBox.height}" selectValueClass="suggestionBoxSelectedRow" shadowDepth="#{suggestionBox.shadowDepth}" cellpadding="#{suggestionBox.cellpadding}" ignoreDupResponses="true" requestDelay="300" styleClass="suggestionBox"> <h:column> <h:outputText value="#{result.title}"/> </h:column> <a:support reRender="phoneDecoration" event="onselect" immediate="true"/> </rich:suggestionbox> <a:region renderRegionOnly="false"> <s:decorate id="phoneDecoration" template="layout/edit.xhtml"> <ui:define name="label">Phone</ui:define> <h:inputText id="businessPhone" required="true" size="36" maxlength="128" value="#{suggestionBox.businessPhone}"/> <h:inputHidden id="businessId" value="#{suggestionBox.businessId}"/> </s:decorate> </a:region> </div> </td> </tr> <tr> <td align="center" height="40"> <h:commandButton id="save" value="Save" action="#{suggestionBox.process}"/> </td> </tr> </table> ... </h:form>
I am trying to submit the form and load the businessPhone and businessId fields of suggestionBox bean based on the selected row in suggestionbox, and then refresh those two fields in view. But the form was never submitted on select event. Am I doing it right? BTW I get access error trying to follow the url. Thanks. -
6. Re: a4j:support within rich:suggestionbox
ilya_shaikovsky Jun 28, 2007 7:01 AM (in response to terron)1) access error was solved in the snapshots.
2) please put<a:outputPanel ajaxRendered="true"> <h:messages/> </a:outputPanel>
somewhere in your form