-
1. Re: Simple question with ajax4jsf
fernando_jmt May 11, 2007 11:37 AM (in response to hstang)Have you tried surrounding your input-checkbox with <a4j:region>?
-
2. Re: Simple question with ajax4jsf
hstang May 11, 2007 1:08 PM (in response to hstang)I'm not sure what region does. Looking at the documentation, I'm still a bit confused by the usage of region. What does it exactly do?
-
3. Re: Simple question with ajax4jsf
sergeysmirnov May 11, 2007 2:14 PM (in response to hstang)region limits the part of the component tree that will be processed (validation and update model phases). In your case, if you surround the input-textbox with region, other fields of the form will be ignored (bypassed) on the server. I.e. it is exactly what you desire to have.
-
4. Re: Simple question with ajax4jsf
hstang May 11, 2007 3:14 PM (in response to hstang)I tried putting region around my input-textbox but validation still fires for the other fields. Here is my example code.
<h:form> <s:validateAll> <s:decorate> <h:inputText value="#{foo.dob}" required="true"/> </s:decorate> <h:selectBooleanCheckbox value="#{foo.nameSelected}"> <a:support event="onclick" reRender="namePanel"/> </h:selectBooleanCheckbox> <a:outputPanel id="namePanel"> <s:decorate> <a:region> <h:inputText value="#{foo.name}" rendered="#{foo.nameSelected}"/> </a:region> </s:decorate> </a:outputPanel> </s:validateAll> </h:form>
-
5. Re: Simple question with ajax4jsf
sergeysmirnov May 11, 2007 3:40 PM (in response to hstang)you need to surround with a:region the part that you want to be processed, but not the part you do not want. I.e. you need to surround h:selectBooleanCheckbox in the code above.
-
6. Re: Simple question with ajax4jsf
hstang May 11, 2007 4:18 PM (in response to hstang)Thanks Sergey,
That seems to work!