Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.3.0.GA_P01
-
Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Tomcat 7
-
Assignee Priority:P2
-
Salesforce Case Reference:
Description
According to the ace:dataTable tld for alwaysExecuteContents:
Enable the decoding of child components during table feature requests. The table attempts to decode children whenever it is executed, meaning whenever a parent region is submitted, or the table submits itself to paginate, make a selection, reorder columns, or any other feature. Decoding children during feature requests can result in unwanted input submission (during pagination for example), so by default this component suppresses child decoding whenever submitting itself.
The default is false, meaning child components should NOT be executed. However, in the showcase, if you replace one of the h:outputText tags with an h:inputText tag in dataTableLazyLoading.xhtml and add a customer f:validator, you will see the validator execute when paginating, meaning the component has been decoded.
Page Markup:
<h:inputText id="nameCell" value="#{car.name}">
<f:validator validatorId="test.validator" />
</h:inputText>
Validator:
package org.icefaces.samples.showcase.example.ace.dataTable;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.FacesValidator;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
@FacesValidator("test.validator")
public class TestValidator implements Validator {
public void validate(FacesContext facesContext, UIComponent uiComponent, Object o) throws ValidatorException {
System.out.println("VALIDATION !!!!");
}
}
Enable the decoding of child components during table feature requests. The table attempts to decode children whenever it is executed, meaning whenever a parent region is submitted, or the table submits itself to paginate, make a selection, reorder columns, or any other feature. Decoding children during feature requests can result in unwanted input submission (during pagination for example), so by default this component suppresses child decoding whenever submitting itself.
The default is false, meaning child components should NOT be executed. However, in the showcase, if you replace one of the h:outputText tags with an h:inputText tag in dataTableLazyLoading.xhtml and add a customer f:validator, you will see the validator execute when paginating, meaning the component has been decoded.
Page Markup:
<h:inputText id="nameCell" value="#{car.name}">
<f:validator validatorId="test.validator" />
</h:inputText>
Validator:
package org.icefaces.samples.showcase.example.ace.dataTable;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.FacesValidator;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
@FacesValidator("test.validator")
public class TestValidator implements Validator {
public void validate(FacesContext facesContext, UIComponent uiComponent, Object o) throws ValidatorException {
System.out.println("VALIDATION !!!!");
}
}
Committed fix at revision 38647. The alwaysExecuteContents attribute wasn't being checked at processDecodes() and processValidations(). The problem was present in lazy and non-lazy modes.