This content has been marked as final.
Show 2 replies
-
1. Re: a4j:support and reRendering a4j:commandButton
asookazian Nov 30, 2007 4:49 PM (in response to asookazian)I added an h:outputText component and that is working (like in the Richfaces JSF demo example for a4j:support), but the commandButton submit still is not showing:
<a4j:form id="a4jMainForm1"> <h:panelGrid columns="2" style="vertical-align:middle"> <h:outputText id="description1" value=""/> <BR/> <h:inputTextarea id="noteText1" value="#{noteAction.noteText}" rows="6" cols="50"> <a4j:support event="onkeyup" reRender="submit1, foo" /> </h:inputTextarea> <h:outputText id="foo" value="#{noteAction.noteText2}"/> <a4j:commandButton id="submit1" value="submit" action="#{noteAction.submit('mpNote')}" onclick="Richfaces.hideModalPanel('mpNote')" rendered="#{noteAction.noteText2 == 's'}"/> <BR/> <a4j:commandButton value="cancel" onclick="Richfaces.hideModalPanel('mpNote');unselectCurrentRadioButton()"/> </h:panelGrid> </a4j:form>
-
2. Re: a4j:support and reRendering a4j:commandButton
asookazian Nov 30, 2007 5:25 PM (in response to asookazian)This works! Had to surround the submit button with h:panelGroup...
<a4j:form id="a4jMainForm1"> <h:panelGrid columns="2" style="vertical-align:middle"> <h:outputText id="description1" value=""/> <BR/> <h:inputTextarea id="noteText1" value="#{noteAction.noteText}" rows="6" cols="50"> <a4j:support event="onkeyup" reRender="out1, foo1" /> </h:inputTextarea> <h:outputText id="foo1" value="#{noteAction.noteText2}"/> <h:panelGroup id="out1"> <a4j:commandButton id="submit1" value="submit" action="#{noteAction.submit('mpNote')}" onclick="Richfaces.hideModalPanel('mpNote')" rendered="#{not empty noteAction.noteText2}"/> </h:panelGroup> <BR/> <a4j:commandButton value="cancel" onclick="Richfaces.hideModalPanel('mpNote');unselectCurrentRadioButton()"/> </h:panelGrid> </a4j:form>