[richfaces-issues] [JBoss JIRA] Updated: (RF-3758) add a4j:supportAll to mirror Seam's s:validateAll

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Thu Jul 17 08:03:52 EDT 2008


     [ https://jira.jboss.org/jira/browse/RF-3758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RF-3758:
-------------------------------

    Fix Version/s: Future
                       (was: 3.2.2)
         Assignee: Ilya Shaikovsky  (was: Nick Belaevski)


> add a4j:supportAll to mirror Seam's s:validateAll
> -------------------------------------------------
>
>                 Key: RF-3758
>                 URL: https://jira.jboss.org/jira/browse/RF-3758
>             Project: RichFaces
>          Issue Type: Feature Request
>    Affects Versions: 3.2.1
>            Reporter: Dan Allen
>            Assignee: Ilya Shaikovsky
>            Priority: Minor
>             Fix For: Future
>
>   Original Estimate: 2 days
>  Remaining Estimate: 2 days
>
> To save the developer from having to add the <s:validate> tag to every input component, Seam introduced the <s:validateAll> tag which walks its descendents and applies the Seam model validator to the input components. The same technique could be added to Ajax4jsf to avoid the need of having to add the <a4j:support> tag to every input.
> Often times you see the following markup:
> <h:panelGroup id="fieldNameGroup">
>   <h:inputText id="fieldName" value="#{model.fieldName">
>     <a4j:support event="onblur" ajaxSingle="true" bypassUpdates="true" reRender="fieldNameGroup"/>
>   </h:inputText>
>   <h:message for="fieldName"/>
> </h:panelGroup>
> It sure would be nice to be able to simplify this to the following:
> <h:panelGroup id="fieldNameGroup">
>   <a4j:supportAll event="onblur" ajaxSingle="true" bypassUpdates="true" reRender="fieldNameGroup">
>     <h:inputText id="fieldName" value="#{model.fieldName}"/>
>   </a4j:supportAll>
>   <h:message for="fieldName"/>
> </h:panelGroup>
> At first, you may think to yourself what the difference is. Well, a Facelet template can accomodate the second example to eliminate the need to specify the <a4j:support> tag. The first example cannot since there is no way to add a child element to a component passed into a template. So you could reduce this to:
> <s:decorate id="fieldNameDecorate" template="layout/edit.xhtml">
>   <ui:param name="reRender" value="fieldNameDecorate"/>
>   <h:inputText id="fieldName" value="#{model.fieldName}"/>
> </s:decorate>
> We could even modify Seam to make the id of the decorate component available to the template so that the reRender parameter is not necessary. The template would look like the second example above, except that the input component would be replaced with <ui:insert/> and the value of reRender would be set to #{reRender}. The other benefit, of course, is that it is easy to turn on and off Ajax4jsf.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list