myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heath Borders <heath.bord...@gmail.com>
Subject Re: Strange methods in UISelectBoolean.java
Date Tue, 08 Feb 2005 18:26:10 GMT
That's setup because the selected property is tied to the value property


On Tue, 08 Feb 2005 14:19:00 -0400, Sylvain Vieujot <svieujot@apache.org> wrote:
> I don't understand the if( name.equals("selected") ) part in the following
> methods from src/jsfapi/javax/faces/component UISelectBoolean.java
> 
> Has anyone an explanation for this ?
> 
> Thanks,
> 
> Sylvain.
> 
>     public ValueBinding getValueBinding(String name)
>     {
>         if (name == null) throw new NullPointerException("name");
>         if (name.equals("selected"))
>         {
>             return super.getValueBinding("value");
>         }
>         else
>         {
>             return super.getValueBinding(name);
>         }
>     }
> 
>     public void setValueBinding(String name,
>                                 ValueBinding binding)
>     {
>         if (name == null) throw new NullPointerException("name");
>         if (name.equals("selected"))
>         {
>             super.setValueBinding("value", binding);
>         }
>         else
>         {
>             super.setValueBinding(name, binding);
>         }
>     } 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Mime
View raw message