You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by vo...@apache.org on 2023/02/03 17:11:40 UTC

[myfaces] branch main updated (c1a48630b -> dbcfd9c6c)

This is an automated email from the ASF dual-hosted git repository.

volosied pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git


 discard c1a48630b MYFACES-4550 clean up
     new dbcfd9c6c MYFACES-4550 clean up

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (c1a48630b)
            \
             N -- N -- N   refs/heads/main (dbcfd9c6c)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/myfaces/component/validate/ValidateWholeBeanComponent.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


[myfaces] 01/01: MYFACES-4550 clean up

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

volosied pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git

commit dbcfd9c6c5df7eefdd2eaea581efadbeb24f580e
Author: Volodymyr Siedlecki <vo...@gmail.com>
AuthorDate: Fri Feb 3 11:07:48 2023 -0500

    MYFACES-4550 clean up
---
 .../component/validate/ValidateWholeBeanComponent.java   | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/component/validate/ValidateWholeBeanComponent.java b/impl/src/main/java/org/apache/myfaces/component/validate/ValidateWholeBeanComponent.java
index a69127ee9..1c0ff35d6 100644
--- a/impl/src/main/java/org/apache/myfaces/component/validate/ValidateWholeBeanComponent.java
+++ b/impl/src/main/java/org/apache/myfaces/component/validate/ValidateWholeBeanComponent.java
@@ -66,7 +66,7 @@ public class ValidateWholeBeanComponent extends UIInput
     @Override
     public void encodeBegin(FacesContext context) throws IOException
     {    
-        // https://github.com/jakartaee/faces/issues/1780
+        // Developement check: https://github.com/jakartaee/faces/issues/1780
         if (context.isProjectStage(ProjectStage.Development)) 
         {
             // find closest form
@@ -86,16 +86,10 @@ public class ValidateWholeBeanComponent extends UIInput
      * As required by https://github.com/jakartaee/faces/issues/1
      * Also ensures all inputs are available for f:wholeBeanValidate processing
      * (otherwise they'd be empty during the validation)
-     * Inspired by Mojarra's UIValidateWholeBean#misplacedComponentCheck
-     * 1) Get all children of the form component
-     * 2) Loop in reverse thorough each child in the form
-     * 3) If we find an editable component (EditableValueHolder)
-     * and it's group validator matches f:wholeBeanValidate (this part is unique to
-     * myfaces) then throw an exception.
-     * 4) If we find the f:wholeBeanValidate's client id before any
-     * EditableValueHolder tags, return.
+     * Similar to a Recursive Non-Binary Tree Search, but checks if f:wholeBeanValidate 
+     * is before any EditableValueHolders (i.e inputs)
      */
-    public void validateTagPlacement(UIComponent component, String clientId) throws IllegalStateException
+    private void validateTagPlacement(UIComponent component, String clientId) throws IllegalStateException
     {
         List<UIComponent> children = component.getChildren();
     
@@ -122,7 +116,7 @@ public class ValidateWholeBeanComponent extends UIInput
               }
               else
               {
-                  validateTagPlacement(c, clientId);
+                  validateTagPlacement(c, clientId); // continue again 
               }
           }
         }