[JBoss JIRA] (RF-13785) Validation inside popupPanel is ignored when form is submitted
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13785?page=com.atlassian.jira.plugin.s... ]
Juraj Húska commented on RF-13785:
----------------------------------
The issue was introduced sometime between 4.5.0.Alpha2 and 4.5.0.Apha3.
> Validation inside popupPanel is ignored when form is submitted
> --------------------------------------------------------------
>
> Key: RF-13785
> URL: https://issues.jboss.org/browse/RF-13785
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Affects Versions: 4.5.0.Alpha3, 4.5.0.Beta1
> Reporter: Juraj Húska
> Priority: Blocker
>
> Consider please a form with multiple inputs inside {{popupPanel}}, which is configured to hide when there are no validation issues.
> *The issue is:* If the form is submitted e.g. with {{a4j:commandButton}}, then it hides even when there are some validation issues.
> {{PopupPanel}} has set {{oncomplete}} attribute to:
> {code:JavaScript}
> oncomplete="if (!#{facesContext.validationFailed}) { #{rich:component('popup')}.hide(); } "
> {code}
> {{facesContext.validationFailed}} is wrongly evaluated always to {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13785) Validation inside popupPanel is ignored when form is submitted
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13785?page=com.atlassian.jira.plugin.s... ]
Juraj Húska updated RF-13785:
-----------------------------
Affects Version/s: 4.5.0.Alpha3
> Validation inside popupPanel is ignored when form is submitted
> --------------------------------------------------------------
>
> Key: RF-13785
> URL: https://issues.jboss.org/browse/RF-13785
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Affects Versions: 4.5.0.Alpha3, 4.5.0.Beta1
> Reporter: Juraj Húska
> Priority: Blocker
>
> Consider please a form with multiple inputs inside {{popupPanel}}, which is configured to hide when there are no validation issues.
> *The issue is:* If the form is submitted e.g. with {{a4j:commandButton}}, then it hides even when there are some validation issues.
> {{PopupPanel}} has set {{oncomplete}} attribute to:
> {code:JavaScript}
> oncomplete="if (!#{facesContext.validationFailed}) { #{rich:component('popup')}.hide(); } "
> {code}
> {{facesContext.validationFailed}} is wrongly evaluated always to {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13785) Validation inside popupPanel is ignored when form is submitted
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13785?page=com.atlassian.jira.plugin.s... ]
Juraj Húska updated RF-13785:
-----------------------------
Steps to Reproduce:
# It can be reproduced on showcase as there are such popups
# load showcase from Openshift: http://showcase-latest.richfaces.org/richfaces/component-sample.jsf?demo=...
# click on "_Show popup_" button
# write into name input e.g.: "_a_"
# click on the "_Save_" button
# see that the panel is closed, even when there are validation errors
was:
# It can be reproduced on showcase as there are such popups
# deploy showcase, and, load e.g.: http://localhost:8080/showcase/richfaces/component-sample.jsf?demo=focus&...
# click on "_Show popup_" button
# write into name input e.g.: "_a_"
# click on the "_Save_" button
# see that the panel is closed, even when there are validation errors
> Validation inside popupPanel is ignored when form is submitted
> --------------------------------------------------------------
>
> Key: RF-13785
> URL: https://issues.jboss.org/browse/RF-13785
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Affects Versions: 4.5.0.Beta1
> Reporter: Juraj Húska
> Priority: Blocker
>
> Consider please a form with multiple inputs inside {{popupPanel}}, which is configured to hide when there are no validation issues.
> *The issue is:* If the form is submitted e.g. with {{a4j:commandButton}}, then it hides even when there are some validation issues.
> {{PopupPanel}} has set {{oncomplete}} attribute to:
> {code:JavaScript}
> oncomplete="if (!#{facesContext.validationFailed}) { #{rich:component('popup')}.hide(); } "
> {code}
> {{facesContext.validationFailed}} is wrongly evaluated always to {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13778) RF-45 cyclic dependency on richfaces-parent
by Pavel Slegr (JIRA)
[ https://issues.jboss.org/browse/RF-13778?page=com.atlassian.jira.plugin.s... ]
Pavel Slegr commented on RF-13778:
----------------------------------
Actually, we will need to release new 1.1.8 because of change of the parent, wdyt ? [~bleathem], [~manaRH]
> RF-45 cyclic dependency on richfaces-parent
> -------------------------------------------
>
> Key: RF-13778
> URL: https://issues.jboss.org/browse/RF-13778
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: build/distribution
> Affects Versions: 4.5.0.Alpha3
> Reporter: Pavol Pitonak
> Priority: Blocker
> Fix For: 4.5.0.Beta1
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> Historically there is a dependency in .../jsf-tests/pom.xml on richfaces-parent which used to be a standalone project/repo in 4.3.x
> {code}
> <parent>
> <groupId>org.richfaces</groupId>
> <artifactId>richfaces-parent</artifactId>
> <version>12</version>
> </parent>
> {code}
> However nowadays in 4.5.x there is playing the role of parent the
> richfaces/pom.xml
> https://github.com/richfaces/richfaces/blob/master/pom.xml
> {code}
> <groupId>org.richfaces</groupId>
> <artifactId>richfaces-parent</artifactId>
> <packaging>pom</packaging>
> <version>4.5.0-SNAPSHOT</version>
> <name>RichFaces Parent</name>
> {code}
> which makes a cyclic dependency
> jsf-test --> richfaces --> jsf-test
> as there are inside https://github.com/richfaces/richfaces/blob/master/build/pom.xml
> referenced dependencies for jsf-tests
> {code}
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>htmlunit-client</artifactId>
> <version>${version.jsf-test}</version>
> <exclusions>
> <exclusion>
> <groupId>javax.servlet</groupId>
> <artifactId>javax.servlet-api</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>jsf-test-stage</artifactId>
> <version>${version.jsf-test}</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>jsf-mock</artifactId>
> <version>${version.jsf-test}</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>jsf-mockito</artifactId>
> <version>${version.jsf-test}</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>jsf-test-scriptunit</artifactId>
> <version>${version.jsf-test}</version>
> </dependency>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13785) Validation inside popupPanel is ignored when form is submitted
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13785?page=com.atlassian.jira.plugin.s... ]
Juraj Húska updated RF-13785:
-----------------------------
Priority: Blocker (was: Major)
> Validation inside popupPanel is ignored when form is submitted
> --------------------------------------------------------------
>
> Key: RF-13785
> URL: https://issues.jboss.org/browse/RF-13785
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Affects Versions: 4.5.0.Beta1
> Reporter: Juraj Húska
> Priority: Blocker
>
> Consider please a form with multiple inputs inside {{popupPanel}}, which is configured to hide when there are no validation issues.
> *The issue is:* If the form is submitted e.g. with {{a4j:commandButton}}, then it hides even when there are some validation issues.
> {{PopupPanel}} has set {{oncomplete}} attribute to:
> {code:JavaScript}
> oncomplete="if (!#{facesContext.validationFailed}) { #{rich:component('popup')}.hide(); } "
> {code}
> {{facesContext.validationFailed}} is wrongly evaluated always to {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13778) RF-45 cyclic dependency on richfaces-parent
by Pavel Slegr (JIRA)
[ https://issues.jboss.org/browse/RF-13778?page=com.atlassian.jira.plugin.s... ]
Pavel Slegr commented on RF-13778:
----------------------------------
provided pull request, [~bleathem] please verify
> RF-45 cyclic dependency on richfaces-parent
> -------------------------------------------
>
> Key: RF-13778
> URL: https://issues.jboss.org/browse/RF-13778
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: build/distribution
> Affects Versions: 4.5.0.Alpha3
> Reporter: Pavol Pitonak
> Priority: Blocker
> Fix For: 4.5.0.Beta1
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> Historically there is a dependency in .../jsf-tests/pom.xml on richfaces-parent which used to be a standalone project/repo in 4.3.x
> {code}
> <parent>
> <groupId>org.richfaces</groupId>
> <artifactId>richfaces-parent</artifactId>
> <version>12</version>
> </parent>
> {code}
> However nowadays in 4.5.x there is playing the role of parent the
> richfaces/pom.xml
> https://github.com/richfaces/richfaces/blob/master/pom.xml
> {code}
> <groupId>org.richfaces</groupId>
> <artifactId>richfaces-parent</artifactId>
> <packaging>pom</packaging>
> <version>4.5.0-SNAPSHOT</version>
> <name>RichFaces Parent</name>
> {code}
> which makes a cyclic dependency
> jsf-test --> richfaces --> jsf-test
> as there are inside https://github.com/richfaces/richfaces/blob/master/build/pom.xml
> referenced dependencies for jsf-tests
> {code}
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>htmlunit-client</artifactId>
> <version>${version.jsf-test}</version>
> <exclusions>
> <exclusion>
> <groupId>javax.servlet</groupId>
> <artifactId>javax.servlet-api</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>jsf-test-stage</artifactId>
> <version>${version.jsf-test}</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>jsf-mock</artifactId>
> <version>${version.jsf-test}</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>jsf-mockito</artifactId>
> <version>${version.jsf-test}</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.test-jsf</groupId>
> <artifactId>jsf-test-scriptunit</artifactId>
> <version>${version.jsf-test}</version>
> </dependency>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13785) Validation inside popupPanel is ignored when form is submitted
by Juraj Húska (JIRA)
Juraj Húska created RF-13785:
--------------------------------
Summary: Validation inside popupPanel is ignored when form is submitted
Key: RF-13785
URL: https://issues.jboss.org/browse/RF-13785
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-validators
Affects Versions: 4.5.0.Beta1
Reporter: Juraj Húska
Consider please a form with multiple inputs inside {{popupPanel}}, which is configured to hide when there are no validation issues.
*The issue is:* If the form is submitted e.g. with {{a4j:commandButton}}, then it hides even when there are some validation issues.
{{PopupPanel}} has set {{oncomplete}} attribute to:
{code:JavaScript}
oncomplete="if (!#{facesContext.validationFailed}) { #{rich:component('popup')}.hide(); } "
{code}
{{facesContext.validationFailed}} is wrongly evaluated always to {{false}}.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months
[JBoss JIRA] (RF-13780) Random JavaScript error due to missing attribute 'richfaces.RICH_CONTAINER'
by Michael B (JIRA)
[ https://issues.jboss.org/browse/RF-13780?page=com.atlassian.jira.plugin.s... ]
Michael B edited comment on RF-13780 at 8/18/14 8:16 AM:
---------------------------------------------------------
[~bleathem] it seems you are right - it looks like a problem after an AJAX update. - I'll get to that in a moment...
First, thanks for the link to the debug guide, - besides ui:debug, we're already using what's described there.
-Trying with RF 4.5.0 Alpha 3 unfortunately is not an option at this point in time, because we are already far behind our project schedule due to several problems with JSF(Mojarra) and RF. Also migrating a really big application to RF 4.5 (even if its just for testing) takes time we don't have right now and by the looks of it is no trivial matter at least if I consider the- migration guide [https://github.com/richfaces/richfaces/wiki/Migration-from-RichFaces-4-to...].
-Reproducing the problem with a small test application (as we usually do it) failed on the first try. But maybe we can afford a little more time to trying to reproduce the problem in that environment and then migrating the test application to RF 4.5 ...-
But back to the original problem - we tried to debug a little further with the big application and what we've found so far seems to confirm that the problem lies in an AJAX update:
# The "toggleType" of the tree is set to "ajax", because there's some data loading and calculations to be done when toggling the tree
# Clicking on a tree expander icon fires the ajax request
# The partial response is evaluated and updates several components
# One of the components in the partial response update is {code}<...>:tree:treeModelAdapter.0.treeModelAdapter.2:treeNode{code} BTW: "limitRender" is not respected if set on the tree! (which causes other problems - maybe also this one?!) - so that's why there are updates to other components like messages etc. as well.
# The partial response is handled by this function: {code} var ajaxOnComplete = function (data) {
var type = data.type;
var responseXML = data.responseXML;
if (data.type == 'event' && data.status == 'complete' && responseXML) {
var partialResponse = jQuery(responseXML).children("partial-response");
if (partialResponse && partialResponse.length) {
var elements = partialResponse.children('changes').children('update, delete');
jQuery.each(elements, function () {
richfaces.cleanDom(jQuery(this).attr('id'));
});
}
}
};{code}
# For every updated or deleted component "richfaces.cleanDom" is invoked. "cleanDom" calls "cleanComponent" which in the end calls "detach" (already shown in a previous post above)
# This leads to the tree node {code}<...>:tree:treeModelAdapter.0.treeModelAdapter.2:treeNode.rf-tr-nd.rf-tr-nd-colps{code} losing its "component" attachment.
# After cleanig the DOM, the components are attached to the elements. I can see - amongst others - a call to "attachToDom" for the ID {code}<...>:tree:treeModelAdapter.0.treeModelAdapter.2:treeNode.rf-tr-nd.rf-tr-nd-exp{code}
# After processing the partial response the toggleEvent is fired as already described above.
# The function "richfaces.$" doesn't find the tree node component anymore, because it has been detached and re-attached to the expanded node just a moment ago
was (Author: michaelb80):
[~bleathem] it seems you are right - it looks like a problem after an AJAX update. - I'll get to that in a moment...
First, thanks for the link to the debug guide, - besides ui:debug, we're already using what's described there.
Trying with RF 4.5.0 Alpha 3 unfortunately is not an option at this point in time, because we are already far behind our project schedule due to several problems with JSF(Mojarra) and RF. Also migrating a really big application to RF 4.5 (even if its just for testing) takes time we don't have right now and by the looks of it is no trivial matter - at least if I consider the migration guide [https://github.com/richfaces/richfaces/wiki/Migration-from-RichFaces-4-to...].
Reproducing the problem with a small test application (as we usually do it) failed on the first try. But maybe we can afford a little more time to trying to reproduce the problem in that environment and then migrating the test application to RF 4.5 ...
But back to the original problem - we tried to debug a little further with the big application and what we've found so far seems to confirm that the problem lies in an AJAX update:
# The "toggleType" of the tree is set to "ajax", because there's some data loading and calculations to be done when toggling the tree
# Clicking on a tree expander icon fires the ajax request
# The partial response is evaluated and updates several components
# One of the components in the partial response update is {code}<...>:tree:treeModelAdapter.0.treeModelAdapter.2:treeNode{code} BTW: "limitRender" is not respected if set on the tree! (which causes other problems - maybe also this one?!) - so that's why there are updates to other components like messages etc. as well.
# The partial response is handled by this function: {code} var ajaxOnComplete = function (data) {
var type = data.type;
var responseXML = data.responseXML;
if (data.type == 'event' && data.status == 'complete' && responseXML) {
var partialResponse = jQuery(responseXML).children("partial-response");
if (partialResponse && partialResponse.length) {
var elements = partialResponse.children('changes').children('update, delete');
jQuery.each(elements, function () {
richfaces.cleanDom(jQuery(this).attr('id'));
});
}
}
};{code}
# For every updated or deleted component "richfaces.cleanDom" is invoked. "cleanDom" calls "cleanComponent" which in the end calls "detach" (already shown in a previous post above)
# This leads to the tree node {code}<...>:tree:treeModelAdapter.0.treeModelAdapter.2:treeNode.rf-tr-nd.rf-tr-nd-colps{code} losing its "component" attachment.
# After cleanig the DOM, the components are attached to the elements. I can see - amongst others - a call to "attachToDom" for the ID {code}<...>:tree:treeModelAdapter.0.treeModelAdapter.2:treeNode.rf-tr-nd.rf-tr-nd-exp{code}
# After processing the partial response the toggleEvent is fired as already described above.
# The function "richfaces.$" doesn't find the tree node component anymore, because it has been detached and re-attached to the expanded node just a moment ago
> Random JavaScript error due to missing attribute 'richfaces.RICH_CONTAINER'
> ---------------------------------------------------------------------------
>
> Key: RF-13780
> URL: https://issues.jboss.org/browse/RF-13780
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component, component-tree
> Affects Versions: 4.3.7
> Environment: RichFaces 4.3.7
> Mojarra 2.1.29
> Java 7 Update 67 (x64)
> Tomcat 7.0.52 (x64)
> Firefox 31
> Reporter: Michael B
>
> First of all: this is a bug report which may be related to RF-13776, since it also originates in the same spot of the JavaScript library of RichFaces.
> Preface:
> The problem is difficult to reproduce systematically, since it only seems to occur in one of n cases of loading one and the same complex xhtml (with exactly the same data from the backing bean).
> The problem is described based on the rich:tree component when clicking on the expand icon of a treeNode which fires a "ToggleEvent".
> Occasionally there is a JavaScript error in the last line of
> {code}
> richfaces.ui.TreeNode.emitToggleEvent = function(nodeId) {
> var node = document.getElementById(nodeId);
> if (!node) {
> return;
> }
> richfaces.$(node).__fireToggleEvent();
> };
> {code}
> When the problem occurs, the expression {code}richfaces.$(node){code} evaluates to 'undefined'.
> Debugging into the function when the problem occurs:
> {code:title=richfaces.$|borderStyle=solid}
> richfaces.$ = function(source) {
> var element = richfaces.getDomElement( source );
> if(element)
> {
> return( element[richfaces.RICH_CONTAINER] || {} )["component"]
> }
> };
> {code}
> While the element is correctly evaluated to the treeNode/treeNodeToggle-source, the expression {code}element[richfaces.RICH_CONTAINER]{code} evaluates to 'undefined'.
> Reloading the page one or more times produces correct results, where the attribute is set.
> To be able to provide a reproducable example of the problem, please provide some information under which circumstances the property may not be set correctly for some components. Please also give us a hint, where to debug into the RF JavaScript code to find the spot where this property is set.
> Although the problem doesn't occur all the time, it happens quite often with the effect of breaking the entire application. So for future versions I would suggest a check if {code}richfaces.$(xyz){code} evalutes to a valid result, before invoking any operations on the result and maybe write a message to the a4j:log in cases where a valid result is expected but not returned.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 3 months