[richfaces-issues] [JBoss JIRA] (RF-13595) rich:validator doesn't work when loaded via ajax (re-render)

Matej Novotny (JIRA) issues at jboss.org
Mon Apr 7 07:04:13 EDT 2014


    [ https://issues.jboss.org/browse/RF-13595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12959662#comment-12959662 ] 

Matej Novotny commented on RF-13595:
------------------------------------

[~michaelb80], first of all, thanks for the example it's much easier to reproduce something with it :-)
Now as for results, I tried your example and indeed it does not work and behaves exactly as you described in the comment above.
With added a4j:ajax it works (for this simple case - we already have such reproducer in Metamer), so I modified the example to rich:calendar and accordingly I changed validation method.
Finally I added it to Metamer (testing app) - you can see the [xhtml page here|https://github.com/richfaces/richfaces-qa/blob/4.3.x/metamer/application/src/main/webapp/components/richValidator/rf-13595.xhtml] and the bean is [here|https://github.com/richfaces/richfaces-qa/blob/4.3.x/metamer/application/src/main/java/org/richfaces/tests/metamer/bean/issues/RF13595.java] and the test I created is [here|https://github.com/richfaces/richfaces-qa/blob/4.3.x/metamer/ftest/src/test/java/org/richfaces/tests/metamer/ftest/richValidator/TestRF13595.java]. This example does not work anymore even with added a4j:ajax (in this case I used change event). Could you please confirm that this is what you meant by replacing the input field with calendar, eg. the use-case you meant?

[~bleathem] as for simple example/reproducer we already have [this test|https://github.com/richfaces/richfaces-qa/blob/4.3.x/metamer/ftest/src/test/java/org/richfaces/tests/metamer/ftest/richValidator/TestRF12031.java] which is mentioned in related RF-12031. That is why I created this more complex example where the workaround does not work. Is there anything else I can do?
                
> rich:validator doesn't work when loaded via ajax (re-render)
> ------------------------------------------------------------
>
>                 Key: RF-13595
>                 URL: https://issues.jboss.org/browse/RF-13595
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-validators
>    Affects Versions: 4.3.5
>         Environment: RF 4.3.5
> Mojarra 2.1.27
> Java 7 Update 51 x64
> Tomcat 7.0.52
> Firefox 28.0 + Firebug
>            Reporter: Michael B
>            Assignee: Matej Novotny
>         Attachments: validationTest.zip
>
>
> When loading input components with a rich:validator via ajax (re-render), client side validation bridge breaks due to a missing JS function av_xxxxxxxxx.
> As already described in further detail in a comment to this JIRA here:
> https://issues.jboss.org/browse/RF-12031
> I've created a very basic example project to reproduce the problem for a single input field which becomes visible (re-rendered) when you click on an a4j:commandButton.
> Please note that this is a minimum example only. The problem is also reproducable for other input components besides h:inputText - like for example rich:calendar. 
> The workaround described in the referenced JIRA creates other problems in client JS when combined with other components like rich:focus and is also not applicable for other input components besides h:inputText.
> We think the problem is located in the way JS functions are optimized for being re-used as well as in the way they are (not) being added on the client side when a component becomes visible on ajax response re-rendering.
> Please use attached eclipse project to easily reproduce the problem => open Firefox => Firebug console to see the error about the missing JS function av_xxxxxxx ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list