You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2006/07/21 17:19:45 UTC

Re: [jira] Resolved: (MYFACES-1365) h:selectOneMenu - Phase processing broken for the first selectOneMenu when using 2 of them.

Moving to the myfaces-user list....

Well, my guess/speculation is that selectoneMenu must have a valid
selection.   Null isn't a valid selection so it's throwing a
validation (or conversion) error.

I don't know why there's no error message being displayed, though.


On 7/21/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> Insert the lines at the top of the page - didn't help - shows nothing.
> But perhaps i found something - although i don't know if it's the real
> cause, but if i fix it it works:
>
> My second selectOneMenu is:
>
>                 <h:selectOneMenu value="#{tableData.country}">
>                         <f:valueChangeListener
>                                 type="my.examples.sortabletable.CountryListener"/>
>                         <f:selectItems value="#{tableData.countryNames}" />
>                 </h:selectOneMenu>
>
> #{tableData.country } is declared as follows:
>
>     private String country;
>
> At the first instantiation of the bean - i did not set this value to
> something.
>
> If i add this to the constructor ( DE and US are static strings with the
> appropiate locale definition ):
>
>
>         FacesContext context = FacesContext.getCurrentInstance();
>         Locale locale = context.getViewRoot().getLocale();
>         if(locale.getLanguage().equals(DE)) {
>             country = DE;
>         } else {
>             country = US;
>         }
>
> all works fine. If the value is not set at instantiation - validation
> fails, if i set this value in the constructor, it works.
>
> Can you bring some light to me? thx.
>
> kind regards
>
> Torsten
>
>
>
> Am Donnerstag, den 20.07.2006, 15:51 -0400 schrieb Mike Kienenberger:
> > On 7/20/06, Torsten Krah (JIRA) <de...@myfaces.apache.org> wrote:
> > > Got some interesting news - found facestraces project and attatched it.
> > >
> > > For the first event at test2.faces, the validation phase fails and update + application phase arent executed, which is right if validation phase is failing.
> > > The validation failed - because, i don't know - thats what i have to find out, but so this bug is invalid, thx for help, i'll report why it fails for the first time.
> >
> > Glad you're making progress.
> >
> > Try sticking these at the top of your page:
> >
> >                       <t:messages globalOnly="true" showDetail="true" />
> >                       <t:messages globalOnly="false" showDetail="true" />
> >
> > (The first one might be redundent.)
>
>

Re: [jira] Resolved: (MYFACES-1365) h:selectOneMenu - Phase processing broken for the first selectOneMenu when using 2 of them.

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
I think you're right. I'll search the code if an error message should be
displayed for that reason or not. If there is no one, maybe there should
be made one, we'll see.

thx for you're help.

kind regards

Am Freitag, den 21.07.2006, 11:19 -0400 schrieb Mike Kienenberger:
> Moving to the myfaces-user list....
> 
> Well, my guess/speculation is that selectoneMenu must have a valid
> selection.   Null isn't a valid selection so it's throwing a
> validation (or conversion) error.
> 
> I don't know why there's no error message being displayed, though.
> 
> 
> On 7/21/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> > Insert the lines at the top of the page - didn't help - shows nothing.
> > But perhaps i found something - although i don't know if it's the real
> > cause, but if i fix it it works:
> >
> > My second selectOneMenu is:
> >
> >                 <h:selectOneMenu value="#{tableData.country}">
> >                         <f:valueChangeListener
> >                                 type="my.examples.sortabletable.CountryListener"/>
> >                         <f:selectItems value="#{tableData.countryNames}" />
> >                 </h:selectOneMenu>
> >
> > #{tableData.country } is declared as follows:
> >
> >     private String country;
> >
> > At the first instantiation of the bean - i did not set this value to
> > something.
> >
> > If i add this to the constructor ( DE and US are static strings with the
> > appropiate locale definition ):
> >
> >
> >         FacesContext context = FacesContext.getCurrentInstance();
> >         Locale locale = context.getViewRoot().getLocale();
> >         if(locale.getLanguage().equals(DE)) {
> >             country = DE;
> >         } else {
> >             country = US;
> >         }
> >
> > all works fine. If the value is not set at instantiation - validation
> > fails, if i set this value in the constructor, it works.
> >
> > Can you bring some light to me? thx.
> >
> > kind regards
> >
> > Torsten
> >
> >
> >
> > Am Donnerstag, den 20.07.2006, 15:51 -0400 schrieb Mike Kienenberger:
> > > On 7/20/06, Torsten Krah (JIRA) <de...@myfaces.apache.org> wrote:
> > > > Got some interesting news - found facestraces project and attatched it.
> > > >
> > > > For the first event at test2.faces, the validation phase fails and update + application phase arent executed, which is right if validation phase is failing.
> > > > The validation failed - because, i don't know - thats what i have to find out, but so this bug is invalid, thx for help, i'll report why it fails for the first time.
> > >
> > > Glad you're making progress.
> > >
> > > Try sticking these at the top of your page:
> > >
> > >                       <t:messages globalOnly="true" showDetail="true" />
> > >                       <t:messages globalOnly="false" showDetail="true" />
> > >
> > > (The first one might be redundent.)
> >
> >