-
1. Re: Changing commandButton to a4j stops submission of select
ilya_shaikovsky May 13, 2009 6:14 AM (in response to jaand96)First simple question.. have you read about forms limitations for the modal panel?
But when I did this the value-binding for the h:selectOneMenu breaks
clarify this please. Some messages appears?
also tell more about your environment(RF, JSF versions). -
2. Re: Changing commandButton to a4j stops submission of select
jaand96 May 13, 2009 1:41 PM (in response to jaand96)I've read some articles on the jboss wiki and a few other posts, if you have anything else on the topic, that'd be great!
So when using a a4j:commandButton I get the error when trying to persist. The value bound to the selectOneMenu, ProductionPointController.productionPoint.countrycode is null which not allowed.
When I use an h:commandButton the value is set to whatever I pick in the drop-down.
If I change the selectOneMenu to be a inputText it works.
Using seam 2.1.2 CR1 (richfaces 3.3.0.GA) and Jboss 4.3. -
3. Re: Changing commandButton to a4j stops submission of select
ilya_shaikovsky May 14, 2009 7:22 AM (in response to jaand96)I have a modalpanel with h:inputText, h:selectOneMenu and h:commandButton to save.
show full modal panel code. -
4. Re: Changing commandButton to a4j stops submission of select
jaand96 May 14, 2009 12:33 PM (in response to jaand96)So this is working code.
Now, if I change the save button to be a a4j:commandButton the dropdowns are "ignored"...<h:form> <rich:modalPanel id="basicdetailspanel" trimOverlayedElements="false"> <f:facet name="header"> <h:panelGroup> <h:outputText value="Details"></h:outputText> </h:panelGroup> </f:facet> <f:facet name="controls"> <h:panelGroup> <h:graphicImage value="/img/close.png" styleClass="hidelink" id="hidelink" /> <rich:componentControl for="basicdetailspanel" attachTo="hidelink" operation="hide" event="onclick" /> </h:panelGroup> </f:facet> <div><!-- CONTENT --> <fieldset><h:panelGrid columns="3"> <s:decorate id="countryDecorate" template="/layout/edit.xhtml"> <ui:define name="label">Country:</ui:define> <h:selectOneMenu id="countrysearch" value="#{ProductionPointController.productionPoint.countrycode}"> <s:selectItems value="#{ProductionPointController.countries}" var="country" label="#{country}" noSelectionLabel="Pick country" /> </h:selectOneMenu> </s:decorate> <s:decorate id="idDecorate" template="/layout/edit.xhtml"> <ui:define name="label">ID:</ui:define> <h:inputText id="Id" value="#{ProductionPointController.productionPoint.nationalid}" required="true"> <a4j:support id="onblur" event="onblur" reRender="idDecorate" /> </h:inputText> </s:decorate> <s:decorate id="typeDecorate" template="/layout/edit.xhtml"> <ui:define name="label">Type:</ui:define> <h:selectOneMenu id="countrysearch" value="#{ProductionPointController.productionPoint.type}"> <s:selectItems value="#{ProductionPointController.types}" var="types" label="#{types}" noSelectionLabel="Pick Type" /> </h:selectOneMenu> </s:decorate> <s:decorate id="nameDecorate" template="/layout/edit.xhtml"> <ui:define name="label">Name:</ui:define> <h:inputText id="name" value="#{ProductionPointController.productionPoint.name}" required="true"> <a4j:support id="onblur" event="onblur" reRender="nameDecorate" /> </h:inputText> </s:decorate> </h:panelGrid></fieldset> </div> <!-- BUTTONS --> <h:panelGroup> <h:commandButton value="Save" id="save" action="#{ProductionPointController.update}" reRender="details" /> <h:commandButton value="Cancel" id="cancel" /> <rich:componentControl for="basicdetailspanel" attachTo="cancel,save" operation="hide" event="onclick" /> </h:panelGroup> </rich:modalPanel> </h:form>
-
5. Re: Changing commandButton to a4j stops submission of select
ilya_shaikovsky May 15, 2009 9:08 AM (in response to jaand96)modal panel should have its own form inside. you could read about it in corresponding guideline section. Also it has domElementAttachment attribute which reveals this restriction but has some side effects. Also could be explored from tld doc.
-
6. Re: Changing commandButton to a4j stops submission of select
jaand96 May 19, 2009 12:56 PM (in response to jaand96)thanks, form inside the modal panel and under the header facet did the trick.