You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Kevin Roast <ke...@alfresco.org> on 2005/05/25 13:02:05 UTC
f:selectItem - itemDisabled attribute not working?
Hello,
I was just wondering if anyone else has seen this problem? I have a
<h:selectOneRadio> with several <f:selectItem> children. I would like to
disable one of the child items based on a value bound boolean property
e.g.
<h:selectOneRadio value="#{myBean.location}" layout="pageDirection">
<f:selectItem itemValue="current" itemDisabled="#{myBean.fileName
!= null}" itemLabel="Use copy in current location" />
<f:selectItem itemValue="other" itemLabel="Use copy uploaded from
my computer" />
</h:selectOneRadio>
So the important bit is: itemDisabled="#{myBean.fileName != null}" - no
matter what value is returned from the associated bean getFileName()
method, the item is _never_ shown as disabled in the browser.
Am I missing something here? Or is this a known issue?
Thanks,
Kevin
--
+44 (0)1628 513624
kevin.roast@alfresco.org
Re: f:selectItem - itemDisabled attribute not working?
Posted by Bruno Aranda <br...@gmail.com>.
The patch has been updated to MYFACES-253, the JIRA opened for this bug.
Bruno
2005/5/25, Bruno Aranda <br...@gmail.com>:
>
> I have a patch for this one. I am opening a JIRA and I will put the patch
> there,
>
> Bruno
>
> 2005/5/25, Martin Marinschek <ma...@gmail.com>:
> >
> > Neither the one nor the other.
> >
> > Maybe you could look in the sources, particularly in HtmlRadioRenderer
> > and see what happens there?
> >
> > Could be that you found a bug...
> >
> > regards,
> >
> > Martin
> >
> > On 5/25/05, Kevin Roast < kevin.roast@alfresco.org> wrote:
> > >
> > >
> > > Hello,
> > >
> > > I was just wondering if anyone else has seen this problem? I have a
> > > <h:selectOneRadio> with several <f:selectItem> children. I would like
> > to
> > > disable one of the child items based on a value bound boolean property
> > e.g.
> > >
> > > <h:selectOneRadio value="#{myBean.location}" layout="pageDirection">
> > > <f:selectItem itemValue="current" itemDisabled="#{ myBean.fileName !=
> > > null}" itemLabel="Use copy in current location" />
> > >
> > > <f:selectItem itemValue="other" itemLabel="Use copy uploaded from my
> > > computer" />
> > > </h:selectOneRadio>
> > >
> > > So the important bit is: itemDisabled="#{myBean.fileName != null}" -
> > no
> > > matter what value is returned from the associated bean getFileName()
> > method,
> > > the item is _never_ shown as disabled in the browser.
> > >
> > > Am I missing something here? Or is this a known issue?
> > >
> > > Thanks,
> > >
> > > Kevin
> > > --
> > > +44 (0)1628 513624
> > > kevin.roast@alfresco.org
> >
>
>
Re: f:selectItem - itemDisabled attribute not working?
Posted by Bruno Aranda <br...@gmail.com>.
I have a patch for this one. I am opening a JIRA and I will put the patch
there,
Bruno
2005/5/25, Martin Marinschek <ma...@gmail.com>:
>
> Neither the one nor the other.
>
> Maybe you could look in the sources, particularly in HtmlRadioRenderer
> and see what happens there?
>
> Could be that you found a bug...
>
> regards,
>
> Martin
>
> On 5/25/05, Kevin Roast <ke...@alfresco.org> wrote:
> >
> >
> > Hello,
> >
> > I was just wondering if anyone else has seen this problem? I have a
> > <h:selectOneRadio> with several <f:selectItem> children. I would like to
> > disable one of the child items based on a value bound boolean property
> e.g.
> >
> > <h:selectOneRadio value="#{myBean.location}" layout="pageDirection">
> > <f:selectItem itemValue="current" itemDisabled="#{myBean.fileName !=
> > null}" itemLabel="Use copy in current location" />
> >
> > <f:selectItem itemValue="other" itemLabel="Use copy uploaded from my
> > computer" />
> > </h:selectOneRadio>
> >
> > So the important bit is: itemDisabled="#{myBean.fileName != null}" - no
> > matter what value is returned from the associated bean getFileName()
> method,
> > the item is _never_ shown as disabled in the browser.
> >
> > Am I missing something here? Or is this a known issue?
> >
> > Thanks,
> >
> > Kevin
> > --
> > +44 (0)1628 513624
> > kevin.roast@alfresco.org
>
Re: f:selectItem - itemDisabled attribute not working?
Posted by Martin Marinschek <ma...@gmail.com>.
Neither the one nor the other.
Maybe you could look in the sources, particularly in HtmlRadioRenderer
and see what happens there?
Could be that you found a bug...
regards,
Martin
On 5/25/05, Kevin Roast <ke...@alfresco.org> wrote:
>
>
> Hello,
>
> I was just wondering if anyone else has seen this problem? I have a
> <h:selectOneRadio> with several <f:selectItem> children. I would like to
> disable one of the child items based on a value bound boolean property e.g.
>
> <h:selectOneRadio value="#{myBean.location}" layout="pageDirection">
> <f:selectItem itemValue="current" itemDisabled="#{myBean.fileName !=
> null}" itemLabel="Use copy in current location" />
>
> <f:selectItem itemValue="other" itemLabel="Use copy uploaded from my
> computer" />
> </h:selectOneRadio>
>
> So the important bit is: itemDisabled="#{myBean.fileName != null}" - no
> matter what value is returned from the associated bean getFileName() method,
> the item is _never_ shown as disabled in the browser.
>
> Am I missing something here? Or is this a known issue?
>
> Thanks,
>
> Kevin
> --
> +44 (0)1628 513624
> kevin.roast@alfresco.org