]
Nick Belaevski updated RF-5773:
-------------------------------
Fix Version/s: Future
Forms not working within DataTable
----------------------------------
Key: RF-5773
URL:
https://jira.jboss.org/jira/browse/RF-5773
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5,
3.1.6, 3.2.0, 3.2.0.SR1, 3.2.1, 3.2.2, 3.3.0
Reporter: Hugh Nguyen
Fix For: Future
There is a problem with form handling for forms (either a4j:form or h:form) nested within
a dataTable (either rich:dataTable or h:dataTable). I've already filed a bug report
with JSF for h:form case, but I realised that fixing it in the JSF implementation
doesn't fix a4j case, because a4j has its own version of UIForm (UIAjaxForm).
The situation is like this:
When a form is nested within a dataTable, although there is one form component in the
component tree, it's rendered into multiple instances for each of the table row. A
form instance is processed by each of JSF processing phases only if it's marked as
having been submitted in the Decodes phase. However, when a form instance other than the
one in the last row is submitted, it's submitted flag is cleared in the iterations for
later rows in the Decodes phase. Thus when JSF enter subsequent phases, the form
processing is skipped, and the form data would not be available in Applications phase.
I would like to propose a solution: recheck and set the submitted flag at beginning of
the later phases. Here is the one line that should go at the beginning of
UIAjaxForm.mustProcessed() method:
setSubmitted(context.getExternalContext().getRequestParameterMap().containsKey(getClientId(context)));
Note that problem only surface when there is data to be updated to backing bean. Purely
action forms (i.e. from that handle commandLink, commandButton, dropSupport, etc.) seem
not affected, because they don't seem to need Validators and Updates phases.
Also, there is a very baffling situation: if just one field is submitted with
<a4j:support ajaxSingle=true/>, then the Validators and Updates phases are processed
correctly for just that field, with either <h:form> or <a4j:form>.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: