[JBoss JIRA] (RF-12831) <rich:validator/> performs ajax validation without updating underlying model field
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-12831?page=com.atlassian.jira.plugin.s... ]
Juraj Húska commented on RF-12831:
----------------------------------
Hello Kamil,
since I have some difficulties to reproduce your issue, could you please clear to me:
* how {{Model#getValidFrom}} and {{Model.getValidTo}} retrieve the {{Date}} instances
* {{model}} field is initialized in {{ModelValidator}}
* {{validator}} field initialized in {{ModelBean}}
* how the {{ModelBean#getModel()}} returns the same instance of {{Model}} as {{ModelValidator}}
> <rich:validator/> performs ajax validation without updating underlying model field
> ----------------------------------------------------------------------------------
>
> Key: RF-12831
> URL: https://issues.jboss.org/browse/RF-12831
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.3.0.Final
> Environment: JBoss eap 6.0.0, Win 7
> Reporter: Kamil Roman
> Assignee: Juraj Húska
> Priority: Minor
>
> Not sure if it's a bug or a feature, but field annotated with {code}<rich:validator/>{code} with a validation method set with {code}validator{code} attribute gets validated without updating the underlying model field. My code is something like this:
> {code:title=Model.java}
> public class Model {
> //...
> public Date getValidFrom() {/*...*/}
> public Date getValidTo() {/*...*/}
> }
> {code}
> {code:title=ModelValidator.java}
> public class ModelValidator{
> private Model model;
> public boolean isValidToAfterValidFrom() {
> return model.getValidTo().after(model.getValidFrom());
> }
> }
> {code}
> {code:title=model_form.xml}
> <c:set var="model" value="#{ModelBean.model}"/>
> <h:outputLabel value="#{labels.getLabel('valid_from')}" for="validFrom" />
> <rich:calendar value="#{model.validFrom}" id="validFrom" >
> <rich:validator/>
> </rich:calendar>
> <rich:message for="validFrom"/>
>
> <h:outputLabel value="#{labels.getLabel('valid_to')}" for="validTo" />
> <rich:calendar value="#{model.validTo}" id="validTo" validator="#{modelBean.validateValidTo}">
> <rich:validator event="inputblur"/>
> </rich:calendar>
> <rich:message for="validTo"/>
> {code}
> {code:title=ModelBean.java}
> public class ModelBean {
> public Model getModel() {/*..*/}
> private ModelValidator validator;
> //...
> public validateValidTo(FacesContext context, UIComponent toValidate, Object value) {
> if(!validator.isValidToAfterValidFrom()) {
> FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, labelBean.getLabel("valid.to.not.after.valid.from.error"), null);
> throw new ValidatorException(message);
> }
> }
> {code}
> The getModel() method returns the same Model instance as is used by the ModelValidator in ModelBean.
> Now, the testcase is:
> 1. User selects validTo earlier than ValidFrom (on a valid Model instance)
> 2. Validation passes as the underlying model value is not updated (validator refers to the same Model instance as ModelBean)
> 3. User submits the form.
> 4. System displays error message as server-side validation on submit is performed after applying request values.
> 5. User corrects the value in validTo field.
> 6. System still displays error message as validation fails, because the new value is not applied to the model (model holds the invalid value applied during failed submit).
> If this is not a bug, but a feature, it would be great if you included this behaviour in the docs!
--
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
11 years, 8 months
[JBoss JIRA] (RF-12747) Fix ignored tests during Framework build
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12747?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12747:
-------------------------------
Sprint: RF5 - Build 2
> Fix ignored tests during Framework build
> ----------------------------------------
>
> Key: RF-12747
> URL: https://issues.jboss.org/browse/RF-12747
> Project: RichFaces
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: build/distribution
> Affects Versions: 5.0.0.Alpha1
> Reporter: Lukáš Fryč
> Assignee: Lukáš Fryč
> Priority: Critical
> Labels: rf5-build
> Fix For: 5.0.0.Alpha1
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> There are 6 tests failing when you run whole build, but they work when you run them separately.
> ----
> Tests fail when you run {{clean}} step first: {{mvn clean test -Dtest=AttachQueueHandlerTest}}
> When you do not run it, they works fine: {{mvn test -Dtest=AttachQueueHandlerTest}}
--
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
11 years, 8 months
[JBoss JIRA] (RF-12744) Make the test suite log less verbose
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12744?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12744:
-------------------------------
Sprint: RF5 - Build 2
> Make the test suite log less verbose
> ------------------------------------
>
> Key: RF-12744
> URL: https://issues.jboss.org/browse/RF-12744
> Project: RichFaces
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: tests - unit
> Affects Versions: 5.0.0.Alpha1
> Reporter: Lukáš Fryč
> Assignee: Lukáš Fryč
> Labels: rf5-build
> Fix For: 5.0.0.Alpha1
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> We could add logging.properties which will filter out unnecessary output (e.g. JSF container startup logging).
> We should also remove any unnecessary System.out/logging from tests.
--
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
11 years, 8 months
[JBoss JIRA] (RF-12698) Rename CDK and Resources plugins to comply conventions: maven-cdk-plugin -> richfaces-cdk-maven-plugin
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12698?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12698:
-------------------------------
Sprint: RF5 - Build 2
> Rename CDK and Resources plugins to comply conventions: maven-cdk-plugin -> richfaces-cdk-maven-plugin
> ------------------------------------------------------------------------------------------------------
>
> Key: RF-12698
> URL: https://issues.jboss.org/browse/RF-12698
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: cdk
> Affects Versions: 4.3.0.CR1
> Reporter: Lukáš Fryč
> Fix For: 5.0.0.Alpha1
>
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> During CDK build, following warning appears:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building RichFaces CDK: Resources Maven Plugin 4.3.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ maven-richfaces-resources-plugin ---
> [INFO] Deleting /mnt/workspace/workspaces/richfaces/cdk/maven-resources-plugin/target
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-java-version) @ maven-richfaces-resources-plugin ---
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven-version) @ maven-richfaces-resources-plugin ---
> [INFO]
> [INFO] --- maven-plugin-plugin:2.9:descriptor (default-descriptor) @ maven-richfaces-resources-plugin ---
> [ERROR]
> Artifact Ids of the format maven-___-plugin are reserved for
> plugins in the Group Id org.apache.maven.plugins
> Please change your artifactId to the format ___-maven-plugin
> In the future this error will break the build.
> ....
> {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
11 years, 8 months
[JBoss JIRA] (RF-12756) Refactor deployments in fundamental tests
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12756?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12756:
-------------------------------
Sprint: RF5 - Build 2
> Refactor deployments in fundamental tests
> -----------------------------------------
>
> Key: RF-12756
> URL: https://issues.jboss.org/browse/RF-12756
> Project: RichFaces
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: tests - functional
> Affects Versions: 5.0.0.Alpha1
> Reporter: Lukáš Fryč
> Assignee: Lukáš Fryč
> Labels: rf5-build
> Fix For: 5.0.0.Alpha1
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> Fundamental tests now uses several {{*Deployment}} basis which have nearly the same functionality.
> We need to decide whether we should:
> * use microdeployments
> ** in this case we will need to deal with breaking up taglib/faces-config to several parts
> * use full deployments
> In each case, it is needed to cache the deployment otherwise it will be necessary to package similar parts for each deployment separately.
--
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
11 years, 8 months