You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Galina Gavrilo (JIRA)" <de...@myfaces.apache.org> on 2007/10/10 17:40:51 UTC

[jira] Created: (MYFACES-1744) Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem

Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem
---------------------------------------------------------------------------------------------------

                 Key: MYFACES-1744
                 URL: https://issues.apache.org/jira/browse/MYFACES-1744
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.1.5
         Environment: Windows XP
            Reporter: Galina Gavrilo


If SelectOneMenu has child of another type than SelectItems or SelectItem at first place in the children list (e.g. itomahawk jsValueChangeListener), validation of combobox fails with message "Value is not a valid option." Value range is empty in this case because _SelectItemsIterator hasNext() method returns false if first child is not of type SelectItems or SelectItem. It should just skip such children, and should continue looking for values. Right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MYFACES-1744) Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem

Posted by "David Brainard (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Brainard updated MYFACES-1744:
------------------------------------

    Status: Patch Available  (was: Open)

> Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1744
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1744
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>         Environment: Windows XP
>            Reporter: Galina Gavrilo
>         Attachments: _SelectItemsIterator.patch, SelectItemsIterator.patch
>
>
> If SelectOneMenu has child of another type than SelectItems or SelectItem at first place in the children list (e.g. itomahawk jsValueChangeListener), validation of combobox fails with message "Value is not a valid option." Value range is empty in this case because _SelectItemsIterator hasNext() method returns false if first child is not of type SelectItems or SelectItem. It should just skip such children, and should continue looking for values. Right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1744) Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem

Posted by "Galina Gavrilo (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539355 ] 

Galina Gavrilo commented on MYFACES-1744:
-----------------------------------------

Patch suitable, but ,what the procedure to include this patch into official build? Is it possible and how to achieve this?
Thanks in advance.

> Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1744
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1744
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>         Environment: Windows XP
>            Reporter: Galina Gavrilo
>         Attachments: _SelectItemsIterator.patch, SelectItemsIterator.patch
>
>
> If SelectOneMenu has child of another type than SelectItems or SelectItem at first place in the children list (e.g. itomahawk jsValueChangeListener), validation of combobox fails with message "Value is not a valid option." Value range is empty in this case because _SelectItemsIterator hasNext() method returns false if first child is not of type SelectItems or SelectItem. It should just skip such children, and should continue looking for values. Right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1744) Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem

Posted by "David Brainard (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538114 ] 

David Brainard commented on MYFACES-1744:
-----------------------------------------

I have checked with the RI impl they dont have this problem.  

In myfaces if i have any type of component like f:param and f:valuechanelistener etc before f:selectitem or  f:selectitems  SelectItemsIterator and _SelectItemsIterator does not return correct value for hasNext(). 

I have added the following patch to both the classes SelectItemsIterator and _SelectItemsIterator so that they ignore the children which are not UISelectItem and UISelectItems.

if (_childs.hasNext())
        {
            UIComponent child = (UIComponent) _childs.next();
            while(!(child instanceof UISelectItem)
            		&& !(child instanceof UISelectItems))
            {
            	child = (UIComponent) _childs.next();
            }

Pls comment if this approach is not suitable. 

i'll add a patch for this soon.

> Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1744
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1744
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>         Environment: Windows XP
>            Reporter: Galina Gavrilo
>
> If SelectOneMenu has child of another type than SelectItems or SelectItem at first place in the children list (e.g. itomahawk jsValueChangeListener), validation of combobox fails with message "Value is not a valid option." Value range is empty in this case because _SelectItemsIterator hasNext() method returns false if first child is not of type SelectItems or SelectItem. It should just skip such children, and should continue looking for values. Right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1744) Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem

Posted by "David Brainard (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538119 ] 

David Brainard commented on MYFACES-1744:
-----------------------------------------

Patch added.

> Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1744
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1744
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>         Environment: Windows XP
>            Reporter: Galina Gavrilo
>         Attachments: _SelectItemsIterator.patch, SelectItemsIterator.patch
>
>
> If SelectOneMenu has child of another type than SelectItems or SelectItem at first place in the children list (e.g. itomahawk jsValueChangeListener), validation of combobox fails with message "Value is not a valid option." Value range is empty in this case because _SelectItemsIterator hasNext() method returns false if first child is not of type SelectItems or SelectItem. It should just skip such children, and should continue looking for values. Right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1744) Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619660#action_12619660 ] 

Leonardo Uribe commented on MYFACES-1744:
-----------------------------------------

After checking this issue the solution proposed is correct, but it should be applied on both shared and core projects, for both 1.1 and 1.2 versions.

The normal behavior for this iterator should be as proposed on the solution skip elements that does not inherit form UISelectItem or UISelectItems.

I'll apply this patch soon.

> Validation messages is shown for SelectOneMenu in case first child is not SelectItems or SelectItem
> ---------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1744
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1744
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5, 1.2.3
>         Environment: Windows XP
>            Reporter: Galina Gavrilo
>         Attachments: _SelectItemsIterator.patch, SelectItemsIterator.patch
>
>
> If SelectOneMenu has child of another type than SelectItems or SelectItem at first place in the children list (e.g. itomahawk jsValueChangeListener), validation of combobox fails with message "Value is not a valid option." Value range is empty in this case because _SelectItemsIterator hasNext() method returns false if first child is not of type SelectItems or SelectItem. It should just skip such children, and should continue looking for values. Right?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.