[
https://issues.jboss.org/browse/RF-13107?page=com.atlassian.jira.plugin.s...
]
Lukáš Fryč edited comment on RF-13107 at 8/15/13 8:10 AM:
----------------------------------------------------------
The issue is very similar to the {{mode=server}}: once the initial page is loaded, it does
contain just a DOM for first tab - see attached image (all others are loaded lazily as you
switch to them).
That's why {{Submit}} works when you switch to second tab and then back.
And that's also why it worked in previous sample with mode=ajax - we had reproduced on
second tab and message on first tab.
It comes again to problem that {{ajaxRendered=true}} components shouldn't be rendered
when they are not present on the page.
----
We can either
1. detect the presence of the ajax-rendered component on server-side
* no idea how we should know it was already rendered or not
2. we can intercept {{jsf.ajax.response}} and remove all irrelevant parts of
partial-response
* in this case we should provide debug message that partial response is being stripped
was (Author: lfryc):
The issue is very similar to the {{mode=server}}: once the initial page is loaded, it
does contain just a DOM for first tab - see attached image (all others are loaded lazily
as you switch to them).
That's why {{Submit}} works when you switch to second tab and then back. And
that's also why it worked in previous sample with mode=ajax - we had reproduced on
second tab and message on first tab.
It comes again to problem that {{ajaxRendered=true}} components shouldn't be rendered
when they are not present on the page.
----
We can either
1. detect the presence of the ajax-rendered component on server-side
* no idea how we should know it was already rendered or not
2. we can intercept {{jsf.ajax.response}} and remove all irrelevant parts of
partial-response
* in this case we should provide debug message that partial response is being stripped
rich:message is renderer even though it is in non-active switchable
panel, causing JSF to fail with mallformedXML error
-----------------------------------------------------------------------------------------------------------------------
Key: RF-13107
URL:
https://issues.jboss.org/browse/RF-13107
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-validators
Affects Versions: 4.3.2
Reporter: Jonáš Trantina
Fix For: 4.3.4
Attachments: bug_reproducer.zip, reproducer_ajax.zip, rf13107ajax.png
Original Estimate: 1 hour, 30 minutes
Remaining Estimate: 1 hour, 30 minutes
We have a form with a tabPanel component with two tabs A and B. In A there is an input
and its rich:message in B the same plus a button that submits and re-renders B. When B is
opened (thus A is not rendered) and the form is submitted and validation fails, then no
message is shown.
Note that:
1) switchType must be set to server to ensure the A's rich:message is really not on
the page.
2) button in B must re-render only content of B
This is only a specific scenario, the issue might occur also in other situations (e.g.
global messages tag outside of tabPanel is not rendered).
Please find the enclosed reproducer.
Snipper:
{code:xml}
<h:form>
<rich:tabPanel switchType="server">
<rich:tab>
<h:inputText id="surname"
value="#{richBean.surname}">
<f:validateLength minimum="10"/>
</h:inputText>
<rich:message for="surname"/>
</rich:tab>
<rich:tab>
<h:panelGroup id="content">
<h:inputText id="name"
value="#{richBean.name}">
<f:validateLength minimum="6"/>
</h:inputText>
<rich:message for="name"/>
</h:panelGroup>
<a4j:commandButton value="Submit"
execute="content" render="content" />
</rich:tab>
</rich:tabPanel>
</h:form>
{code}
--
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