[richfaces-issues] [JBoss JIRA] (RF-12301) rich:validator and rich:ajax inside the same input element

Jan Papousek (JIRA) jira-events at lists.jboss.org
Mon Jun 11 07:36:06 EDT 2012


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

Jan Papousek updated RF-12301:
------------------------------

    Description: 
This issue affects the following input components:
- rich:autocomplete
- rich:calendar
- rich:inplaceInput
- rich:inplaceSelect
- rich:select

When the rich:validator and rich:ajax is placed inside the same input element, the order is important.

The following code doesn't update update output area:

{code}
<rich:inplaceInput id="input" value="...">
    <rich:validator />
    <a4j:ajax event="change"  render="output" />
</rich:inplaceInput>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..." />
{code}

The following code works correctly:

{code}
<rich:inplaceInput id="input" value="...">
    <a4j:ajax event="change"  render="output" />
    <rich:validator />
</rich:inplaceInput>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..." />
{code}

----

Even more serious problem is when you try to use custom validator (with f:validator element) or f:selectItems. This issue affects the following components:
- rich:autocomplete (f:validator)
- rich:select (f:selectItems)
- rich:inplaceSelect (f:selectItems)

The following code validates the input properly, but doesn't update the output area:
{code}
<rich:autocomplete id="input" autocompleteMethod="..." value="...">
    <f:validator validatorId="..."/>
    <rich:validator />
    <a4j:ajax event="change" render="output"/>
</rich:autocomplete>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..."/>
{code}

The following code tries to fix the output updating (like in the previous examples), but the validation works only ones:

{code}
<rich:autocomplete id="input" autocompleteMethod="..." value="...">
    <f:validator validatorId="..."/>
    <a4j:ajax event="change" render="output"/>
    <rich:validator />
</rich:autocomplete>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..."/>
{code}

The same with:

{code}
<rich:autocomplete id="input" autocompleteMethod="..." value="...">
    <a4j:ajax event="change" render="output"/>
    <f:validator validatorId="..."/>
    <rich:validator />
</rich:autocomplete>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..."/>
{code}

  was:
This issue affects the following input components:
- rich:autocomplete
- rich:calendar
- rich:inplaceInput
- rich:inplaceSelect
- rich:select

When the rich:validator and rich:ajax is placed inside the same input element, the order is important.

The following code doesn't update update output area:

{code}
<rich:inplaceInput id="input" value="...">
    <rich:validator />
    <a4j:ajax event="change"  render="output" />
</rich:inplaceInput>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..." />
{code}

The following code works correctly:

{code}
<rich:inplaceInput id="input" value="...">
    <a4j:ajax event="change"  render="output" />
    <rich:validator />
</rich:inplaceInput>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..." />
{code}

----

Even more serious problem is when you try to use custom validator (with f:validator element). This issue affects the following components:
- rich:autocomplete
- rich:select

The following code validates the input properly, but doesn't update the output area:
{code}
<rich:autocomplete id="input" autocompleteMethod="..." value="...">
    <f:validator validatorId="..."/>
    <rich:validator />
    <a4j:ajax event="change" render="output"/>
</rich:autocomplete>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..."/>
{code}

The following code tries to fix the output updating (like in the previous examples), but the validation works only ones:

{code}
<rich:autocomplete id="input" autocompleteMethod="..." value="...">
    <f:validator validatorId="..."/>
    <a4j:ajax event="change" render="output"/>
    <rich:validator />
</rich:autocomplete>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..."/>
{code}

The same with:

{code}
<rich:autocomplete id="input" autocompleteMethod="..." value="...">
    <a4j:ajax event="change" render="output"/>
    <f:validator validatorId="..."/>
    <rich:validator />
</rich:autocomplete>
<rich:message id="message" for="input"/>
<h:outputText id="output" value="..."/>
{code}


    
> rich:validator and rich:ajax inside the same input element
> ----------------------------------------------------------
>
>                 Key: RF-12301
>                 URL: https://issues.jboss.org/browse/RF-12301
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-a4j-core, component-input, component-validators
>    Affects Versions: 4.2.2.Final
>            Reporter: Jan Papousek
>
> This issue affects the following input components:
> - rich:autocomplete
> - rich:calendar
> - rich:inplaceInput
> - rich:inplaceSelect
> - rich:select
> When the rich:validator and rich:ajax is placed inside the same input element, the order is important.
> The following code doesn't update update output area:
> {code}
> <rich:inplaceInput id="input" value="...">
>     <rich:validator />
>     <a4j:ajax event="change"  render="output" />
> </rich:inplaceInput>
> <rich:message id="message" for="input"/>
> <h:outputText id="output" value="..." />
> {code}
> The following code works correctly:
> {code}
> <rich:inplaceInput id="input" value="...">
>     <a4j:ajax event="change"  render="output" />
>     <rich:validator />
> </rich:inplaceInput>
> <rich:message id="message" for="input"/>
> <h:outputText id="output" value="..." />
> {code}
> ----
> Even more serious problem is when you try to use custom validator (with f:validator element) or f:selectItems. This issue affects the following components:
> - rich:autocomplete (f:validator)
> - rich:select (f:selectItems)
> - rich:inplaceSelect (f:selectItems)
> The following code validates the input properly, but doesn't update the output area:
> {code}
> <rich:autocomplete id="input" autocompleteMethod="..." value="...">
>     <f:validator validatorId="..."/>
>     <rich:validator />
>     <a4j:ajax event="change" render="output"/>
> </rich:autocomplete>
> <rich:message id="message" for="input"/>
> <h:outputText id="output" value="..."/>
> {code}
> The following code tries to fix the output updating (like in the previous examples), but the validation works only ones:
> {code}
> <rich:autocomplete id="input" autocompleteMethod="..." value="...">
>     <f:validator validatorId="..."/>
>     <a4j:ajax event="change" render="output"/>
>     <rich:validator />
> </rich:autocomplete>
> <rich:message id="message" for="input"/>
> <h:outputText id="output" value="..."/>
> {code}
> The same with:
> {code}
> <rich:autocomplete id="input" autocompleteMethod="..." value="...">
>     <a4j:ajax event="change" render="output"/>
>     <f:validator validatorId="..."/>
>     <rich:validator />
> </rich:autocomplete>
> <rich:message id="message" for="input"/>
> <h:outputText id="output" value="..."/>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list