You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Aaron Bartell <aa...@gmail.com> on 2005/03/23 04:46:26 UTC

MyFaces 1.0.9 selectOneMenu - possible bug

I think I have found bug in either the JSF RI or MyFaces 1.0.9 
concerning the selectOneMenu tag. My problem is that ever since I 
upgraded to 1.0.9 my selectOneMenu's haven't been defaulting to their 
correct values based on the value="" attribute, even though I know that 
they are getting the correct value.

The below code is a very basic page that has a <x:selectOneMenu> that 
should get it's value from my UserCtl.curUsr.costgroupuiddefault. I 
added an <h:outputText> tag so I could see what value was being return 
to the selectOneMenu's value attribute.

I am now thinking that my jump to MyFaces 1.0.9 is causing conflicts of 
some sort but I don't know where, how or why. Does anybody have input 
for me, or does anybody else see what I am seeing?


<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
<f:view>   
<h:form>
    <h:outputText value="#{UserCtl.curUsr.costgroupuiddefault}" 
styleClass="copy"/> 
        
    <x:selectOneMenu id="costgroup" 
value="#{UserCtl.curUsr.costgroupuiddefault}">
        <f:selectItems value="#{GroupCtl.costSOM}" />
    </x:selectOneMenu>

    <h:commandButton value="SAVE" action="#{UserCtl.updateUser}" 
styleClass="button"/>
    <h:commandButton value="CANCEL" action="cancel"  immediate="true" 
styleClass="button"/>

</h:form>
</f:view>


This is the output produced by the above code. As you can see the 
outputText is sending "17" to the browser, but I am always having the 
"--select--" displayed.
...
<span class="copy">17</span>                                            
                          
<select id="_id1:costgroup" name="_id1:costgroup" size="1">       
<option value="0">--select--</option>       
<option value="17">LAW - AU - 001</option>       
<option value="18">LAW - CG - 001</option>       
<option value="19">LAW - CG - 002</option>
</select> 
...                                                                   
           
                               

Re: MyFaces 1.0.9 selectOneMenu - possible bug

Posted by Martin Marinschek <ma...@gmail.com>.
well, it has only been a RC, so I wouldn't call it stable, no...

but the JSCookMenu bug has been in there since the inclusion of the
extension filter, so it has been some time.

regards,

Martin


On Tue, 22 Mar 2005 22:52:03 -0600, Aaron Bartell
<aa...@gmail.com> wrote:
> After some more digging I think I may have found my answer.
> 
> http://issues.apache.org/jira/browse/MYFACES-144
> 
> Just so I can get a feel of where I should be with my development, is
> 1.0.9 still kinda unstable and we should wait before implementing it
> into production projects? This is the second bug I have found today
> (the first being one with JSCookMenu) and in turn have spent about 5
> hours digging through things to find the reason that these features do
> not work.
> 
> Aaron Bartell
> 
> On Tue, 22 Mar 2005 21:46:26 -0600, Aaron Bartell
> <aa...@gmail.com> wrote:
> > I think I have found bug in either the JSF RI or MyFaces 1.0.9
> > concerning the selectOneMenu tag. My problem is that ever since I
> > upgraded to 1.0.9 my selectOneMenu's haven't been defaulting to their
> > correct values based on the value="" attribute, even though I know that
> > they are getting the correct value.
> >
> > The below code is a very basic page that has a <x:selectOneMenu> that
> > should get it's value from my UserCtl.curUsr.costgroupuiddefault. I
> > added an <h:outputText> tag so I could see what value was being return
> > to the selectOneMenu's value attribute.
> >
> > I am now thinking that my jump to MyFaces 1.0.9 is causing conflicts of
> > some sort but I don't know where, how or why. Does anybody have input
> > for me, or does anybody else see what I am seeing?
> >
> > <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> > <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> > <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
> > <f:view>
> > <h:form>
> >     <h:outputText value="#{UserCtl.curUsr.costgroupuiddefault}"
> > styleClass="copy"/>
> >
> >     <x:selectOneMenu id="costgroup"
> > value="#{UserCtl.curUsr.costgroupuiddefault}">
> >         <f:selectItems value="#{GroupCtl.costSOM}" />
> >     </x:selectOneMenu>
> >
> >     <h:commandButton value="SAVE" action="#{UserCtl.updateUser}"
> > styleClass="button"/>
> >     <h:commandButton value="CANCEL" action="cancel"  immediate="true"
> > styleClass="button"/>
> >
> > </h:form>
> > </f:view>
> >
> > This is the output produced by the above code. As you can see the
> > outputText is sending "17" to the browser, but I am always having the
> > "--select--" displayed.
> > ...
> > <span class="copy">17</span>
> >
> > <select id="_id1:costgroup" name="_id1:costgroup" size="1">
> > <option value="0">--select--</option>
> > <option value="17">LAW - AU - 001</option>
> > <option value="18">LAW - CG - 001</option>
> > <option value="19">LAW - CG - 002</option>
> > </select>
> > ...
> >
> >
> 
> --
> Aaron Bartell
>

Re: MyFaces 1.0.9 selectOneMenu - possible bug

Posted by Aaron Bartell <aa...@gmail.com>.
After some more digging I think I may have found my answer.

http://issues.apache.org/jira/browse/MYFACES-144

Just so I can get a feel of where I should be with my development, is
1.0.9 still kinda unstable and we should wait before implementing it
into production projects? This is the second bug I have found today
(the first being one with JSCookMenu) and in turn have spent about 5
hours digging through things to find the reason that these features do
not work.

Aaron Bartell


On Tue, 22 Mar 2005 21:46:26 -0600, Aaron Bartell
<aa...@gmail.com> wrote:
> I think I have found bug in either the JSF RI or MyFaces 1.0.9
> concerning the selectOneMenu tag. My problem is that ever since I
> upgraded to 1.0.9 my selectOneMenu's haven't been defaulting to their
> correct values based on the value="" attribute, even though I know that
> they are getting the correct value.
> 
> The below code is a very basic page that has a <x:selectOneMenu> that
> should get it's value from my UserCtl.curUsr.costgroupuiddefault. I
> added an <h:outputText> tag so I could see what value was being return
> to the selectOneMenu's value attribute.
> 
> I am now thinking that my jump to MyFaces 1.0.9 is causing conflicts of
> some sort but I don't know where, how or why. Does anybody have input
> for me, or does anybody else see what I am seeing?
> 
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
> <f:view>
> <h:form>
>     <h:outputText value="#{UserCtl.curUsr.costgroupuiddefault}"
> styleClass="copy"/>
> 
>     <x:selectOneMenu id="costgroup"
> value="#{UserCtl.curUsr.costgroupuiddefault}">
>         <f:selectItems value="#{GroupCtl.costSOM}" />
>     </x:selectOneMenu>
> 
>     <h:commandButton value="SAVE" action="#{UserCtl.updateUser}"
> styleClass="button"/>
>     <h:commandButton value="CANCEL" action="cancel"  immediate="true"
> styleClass="button"/>
> 
> </h:form>
> </f:view>
> 
> This is the output produced by the above code. As you can see the
> outputText is sending "17" to the browser, but I am always having the
> "--select--" displayed.
> ...
> <span class="copy">17</span>
> 
> <select id="_id1:costgroup" name="_id1:costgroup" size="1">
> <option value="0">--select--</option>
> <option value="17">LAW - AU - 001</option>
> <option value="18">LAW - CG - 001</option>
> <option value="19">LAW - CG - 002</option>
> </select>
> ...
> 
> 


-- 
Aaron Bartell