myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael D. (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (TOMAHAWK-1664) t:selectBooleanCheckbox / Binding is not working after Mojarra update
Date Fri, 05 Jul 2013 16:15:50 GMT

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13700966#comment-13700966
] 

Michael D. commented on TOMAHAWK-1664:
--------------------------------------

I've to verify it, but it looks like, this and some other issues are caused by usage of "forcedId"
                
> t:selectBooleanCheckbox / Binding is not working after Mojarra update
> ---------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1664
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1664
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.13, 1.1.14
>         Environment: GlassFish Server Open Source Edition 3.1.2.2 (build 5)
> - Windows 7 (64 Bit) & Oracle Java jdk1.7.0_15 (64 Bit)
> - Oracle Linux Server release 5.5 & OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed
mode)
> - Mojarra v2.1.23
> - org.apache.myfaces.tomahawk:tomahawk20:1.1.13
> - org.apache.myfaces.tomahawk:tomahawk20:1.1.14
> - org.apache.myfaces.tomahawk:tomahawk21:1.1.14
>            Reporter: Michael D.
>
> After updating Mojarra from v2.1.6 to v2.1.23 I'm facing the issue, that the binding
of t:selectBooleanCheckbox is not working.
> JSF snippet:
>     --- SNIP ---
> <t:selectBooleanCheckbox
>     id="myId"
>     forceId="true"
>     value="#{myBean.myValue}"
>     binding="#{myBean.myBinding}"
>     styleClass="myClass"/>
> <h:inputText
>     id="anotherId"
>     value="#{myBean.anotherValue}"
>     validator="#{myBean.validate}"
>     requiredMessage="#{msg['required']}"
>     maxlength="100"/>
>     --- SNAP ----
> Java snippet:
>     --- SNIP ---
> @ManagedBean
> public class MyBean {
>     private UIInput myBinding;
>     private boolean myValue;
>     private String anotherValue;
>     // ...
>     public UIInput getMyBinding() { return myBinding; }
>     public void setMyBinding(UIInput myBinding) { this.myBinding = myBinding; }
>     public boolean isMyValue() { return myValue; }
>     public void setMyValue(boolean myValue) { this.myValue = myValue; }
>     public String getAnotherValue() { return anotherValue; }
>     public void setAnotherValue(String anotherValue) { this.anotherValue = anotherValue;
}
>     public void validate(FacesContext ctx, UIComponent comp, Object value) throws ValidatorException
{
>         if ((HtmlSelectBooleanCheckbox) myBinding.isSelected()) { // <---------------
myBinding is null
>             // ...
>         }
>     }
> }
>     --- SNAP ---
>     
> I did debug:
> 1. Opening page
>     a) getMyBinding is called
>     b) setMyBinding is called with valid instance
> 2. Submit form
>     a) No call of getMyBinding/setMyBinding
>     b) validate is called ---> myBinding is null!!!!
> If I replace "t:selectBooleanCheckbox" by "h:selectBooleanCheckbox":
> 1. Opening page
>     a) getMyBinding is called
>     b) setMyBinding is called with valid instance
> 2. Submit form
>     a) setMyBinding is called with valid instance
>     b) validate is called ---> myBinding is valid
> 3. Next page is displayed

--
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

Mime
View raw message