You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jorge Vásquez <jv...@3eyegroup.com> on 2006/12/07 01:45:22 UTC

SelectONeMenu valueChangeListener not skipping validation phase...

Regards,

I have a selectoneMenu component on my page and I want it to skip validation
phase when it changes, in the past somehow immediate=”true” solved this
problem for me but now I have noticed that this ain´t working anymore.  

In my page I have:

<h:selectOneMenu id="eclass" value="#{nativeHandler.eclass}"
class="dropdown" immediate="true" 

                                                     onchange="submit()"
valueChangeListener="#{nativeHandler.eClassSelected}">

                                               <f:selectItems
value="#{nativeHandler.eclassList}" />

                                         </h:selectOneMenu>

 

And I have an input which is marked as “required” and whenever I change the
selectOneMenu option it displays the respective validation message for this
component, which I don´t want to happen.

 

Any ideas, is this a known issue, am I missing something?

 

Thanks,

JV

 


RE: SelectONeMenu valueChangeListener not skipping validation phase...

Posted by Jorge Vásquez <jv...@3eyegroup.com>.
Nop, its not the first page, still, what you say sounds pretty interesting
to have in mind.

Regards and thanks,

JV

 

  _____  

De: turbomanage@gmail.com [mailto:turbomanage@gmail.com] En nombre de David
Chandler
Enviado el: jueves, 07 de diciembre de 2006 12:24
Para: MyFaces Discussion
Asunto: Re: SelectONeMenu valueChangeListener not skipping validation
phase...

 

Is the form on which this is occurring also your welcome file (index.jsf, or
some such thing)? I recently saw this "two clicks required" behavior in that
case. On first access, the URL would be http://myserver/myapp/. On the first
click, it would simply re-render with the complete URL
http://myserver/myapp/index.jsf. The second click then worked. 

When I changed my welcome file to index.html with a redirect to the jsf
page, this problem went away.

/dmc

On 12/7/06, Jorge Vásquez <jv@3eyegroup.com  <ma...@3eyegroup.com> >
wrote:

In that form where I have the selectoneMenu component, I have to click twice
over the button that does the submit of the form in order to effectively
process the action associated with that button.  The first time nothing
happens and then the action is finally executed.  Don´t know how to explain
this better…Its strange but its happening, if you want some source code I´ll
gladly submit it.  My workaround here has been to do the validation directly
on the action method, it works fine but kind of let me a feeling of
unsatisfaction.

Thanks,

JV

 

 

  _____  

De: Cagatay Civici [mailto:cagatay.civici@gmail.com] 
Enviado el: jueves, 07 de diciembre de 2006 4:53
Para: MyFaces Discussion
Asunto: Re: SelectONeMenu valueChangeListener not skipping validation
phase...

 

Yes renderResponse() should solve the problem, what do you mean by 2 submits
are necessary from an action button. 

On 12/7/06, Jorge Vásquez <jv...@3eyegroup.com> wrote:

I tried solving it by including
FacesContext.getCurrentInstance().renderResponse() but it introduces a new
problem, since 2 submits are necessary from an action button.

I am starting to think that this is a bug.

Regards,

JV

 

  _____  

De: Jorge Vásquez [mailto: jv@3eyegroup.com] 
Enviado el: miércoles, 06 de diciembre de 2006 19:45
Para: 'MyFaces Discussion'
Asunto: SelectONeMenu valueChangeListener not skipping validation phase...

 

Regards,

I have a selectoneMenu component on my page and I want it to skip validation
phase when it changes, in the past somehow immediate="true" solved this
problem for me but now I have noticed that this ain´t working anymore.  

In my page I have:

< h:selectOneMenu id = "eclass" value = "#{nativeHandler.eclass}" class =
"dropdown" immediate = "true" 

                                                     onchange = "submit()"
valueChangeListener = "#{nativeHandler.eClassSelected}" >

                                               < f:selectItems value =
"#{nativeHandler.eclassList}" />

                                         </ h:selectOneMenu >

 

And I have an input which is marked as "required" and whenever I change the
selectOneMenu option it displays the respective validation message for this
component, which I don´t want to happen.

 

Any ideas, is this a known issue, am I missing something?

 

Thanks,

JV

 

 




-- 
David Chandler
Development Coach
learnjsf.com 


Re: SelectONeMenu valueChangeListener not skipping validation phase...

Posted by David Chandler <da...@learnjsf.com>.
Is the form on which this is occurring also your welcome file (index.jsf, or
some such thing)? I recently saw this "two clicks required" behavior in that
case. On first access, the URL would be http://myserver/myapp/. On the first
click, it would simply re-render with the complete URL
http://myserver/myapp/index.jsf. The second click then worked.

When I changed my welcome file to index.html with a redirect to the jsf
page, this problem went away.

/dmc

On 12/7/06, Jorge Vásquez <jv...@3eyegroup.com> wrote:
>
>  In that form where I have the selectoneMenu component, I have to click
> twice over the button that does the submit of the form in order to
> effectively process the action associated with that button.  The first time
> nothing happens and then the action is finally executed.  Don´t know how to
> explain this better…Its strange but its happening, if you want some source
> code I´ll gladly submit it.  My workaround here has been to do the
> validation directly on the action method, it works fine but kind of let me a
> feeling of unsatisfaction.
>
> Thanks,
>
> JV
>
>
>
>
>  ------------------------------
>
> *De:* Cagatay Civici [mailto:cagatay.civici@gmail.com]
> *Enviado el:* jueves, 07 de diciembre de 2006 4:53
> *Para:* MyFaces Discussion
> *Asunto:* Re: SelectONeMenu valueChangeListener not skipping validation
> phase...
>
>
>
> Yes renderResponse() should solve the problem, what do you mean by 2
> submits are necessary from an action button.
>
> On 12/7/06, *Jorge Vásquez* <jv...@3eyegroup.com> wrote:
>
> I tried solving it by including FacesContext.getCurrentInstance().renderResponse()
> but it introduces a new problem, since 2 submits are necessary from an
> action button.
>
> I am starting to think that this is a bug.
>
> Regards,
>
> JV
>
>
>  ------------------------------
>
> *De:* Jorge Vásquez [mailto:jv@3eyegroup.com]
> *Enviado el:* miércoles, 06 de diciembre de 2006 19:45
> *Para:* 'MyFaces Discussion'
> *Asunto:* SelectONeMenu valueChangeListener not skipping validation
> phase...
>
>
>
> Regards,
>
> I have a selectoneMenu component on my page and I want it to skip
> validation phase when it changes, in the past somehow immediate="true"
> solved this problem for me but now I have noticed that this ain´t working
> anymore.
>
> In my page I have:
>
> < h:selectOneMenu id = "eclass" value = "#{nativeHandler.eclass}" class ="dropdown"
> immediate = "true"
>
>                                                      onchange = "submit()"
> valueChangeListener = "#{nativeHandler.eClassSelected}" >
>
>                                                < f:selectItems value = "#{
> nativeHandler.eclassList}" />
>
>                                          </ h:selectOneMenu >
>
>
>
> And I have an input which is marked as "required" and whenever I change
> the selectOneMenu option it displays the respective validation message for
> this component, which I don´t want to happen.
>
>
>
> Any ideas, is this a known issue, am I missing something?
>
>
>
> Thanks,
>
> JV
>
>
>
>
>



-- 
David Chandler
Development Coach
learnjsf.com

RE: SelectONeMenu valueChangeListener not skipping validation phase...

Posted by Jorge Vásquez <jv...@3eyegroup.com>.
In that form where I have the selectoneMenu component, I have to click twice
over the button that does the submit of the form in order to effectively
process the action associated with that button.  The first time nothing
happens and then the action is finally executed.  Don´t know how to explain
this better…Its strange but its happening, if you want some source code I´ll
gladly submit it.  My workaround here has been to do the validation directly
on the action method, it works fine but kind of let me a feeling of
unsatisfaction.

Thanks,

JV

 

 

  _____  

De: Cagatay Civici [mailto:cagatay.civici@gmail.com] 
Enviado el: jueves, 07 de diciembre de 2006 4:53
Para: MyFaces Discussion
Asunto: Re: SelectONeMenu valueChangeListener not skipping validation
phase...

 

Yes renderResponse() should solve the problem, what do you mean by 2 submits
are necessary from an action button. 

On 12/7/06, Jorge Vásquez <jv...@3eyegroup.com> wrote:

I tried solving it by including
FacesContext.getCurrentInstance().renderResponse() but it introduces a new
problem, since 2 submits are necessary from an action button.

I am starting to think that this is a bug.

Regards,

JV

 

  _____  

De: Jorge Vásquez [mailto:jv@3eyegroup.com] 
Enviado el: miércoles, 06 de diciembre de 2006 19:45
Para: 'MyFaces Discussion'
Asunto: SelectONeMenu valueChangeListener not skipping validation phase...

 

Regards,

I have a selectoneMenu component on my page and I want it to skip validation
phase when it changes, in the past somehow immediate="true" solved this
problem for me but now I have noticed that this ain´t working anymore.  

In my page I have:

< h:selectOneMenu id = "eclass" value = "#{nativeHandler.eclass}" class =
"dropdown" immediate = "true" 

                                                     onchange = "submit()"
valueChangeListener = "#{nativeHandler.eClassSelected}" >

                                               < f:selectItems value =
"#{nativeHandler.eclassList}" />

                                         </ h:selectOneMenu >

 

And I have an input which is marked as "required" and whenever I change the
selectOneMenu option it displays the respective validation message for this
component, which I don´t want to happen.

 

Any ideas, is this a known issue, am I missing something?

 

Thanks,

JV

 

 


Re: SelectONeMenu valueChangeListener not skipping validation phase...

Posted by Cagatay Civici <ca...@gmail.com>.
Yes renderResponse() should solve the problem, what do you mean by 2 submits
are necessary from an action button.

On 12/7/06, Jorge Vásquez <jv...@3eyegroup.com> wrote:
>
>  I tried solving it by including FacesContext.getCurrentInstance().renderResponse()
> but it introduces a new problem, since 2 submits are necessary from an
> action button.
>
> I am starting to think that this is a bug.
>
> Regards,
>
> JV
>
>
>  ------------------------------
>
> *De:* Jorge Vásquez [mailto:jv@3eyegroup.com]
> *Enviado el:* miércoles, 06 de diciembre de 2006 19:45
> *Para:* 'MyFaces Discussion'
> *Asunto:* SelectONeMenu valueChangeListener not skipping validation
> phase...
>
>
>
> Regards,
>
> I have a selectoneMenu component on my page and I want it to skip
> validation phase when it changes, in the past somehow immediate="true"
> solved this problem for me but now I have noticed that this ain´t working
> anymore.
>
> In my page I have:
>
> <h:selectOneMenu id="eclass" value="#{nativeHandler.eclass}" class="dropdown"
> immediate="true"
>
>                                                      onchange="submit()"
> valueChangeListener="#{nativeHandler.eClassSelected}">
>
>                                                <f:selectItems value="#{
> nativeHandler.eclassList}" />
>
>                                          </h:selectOneMenu>
>
>
>
> And I have an input which is marked as "required" and whenever I change
> the selectOneMenu option it displays the respective validation message for
> this component, which I don´t want to happen.
>
>
>
> Any ideas, is this a known issue, am I missing something?
>
>
>
> Thanks,
>
> JV
>
>
>

RE: SelectONeMenu valueChangeListener not skipping validation phase...

Posted by Jorge Vásquez <jv...@3eyegroup.com>.
I tried solving it by including
FacesContext.getCurrentInstance().renderResponse() but it introduces a new
problem, since 2 submits are necessary from an action button.

I am starting to think that this is a bug.

Regards,

JV

 

  _____  

De: Jorge Vásquez [mailto:jv@3eyegroup.com] 
Enviado el: miércoles, 06 de diciembre de 2006 19:45
Para: 'MyFaces Discussion'
Asunto: SelectONeMenu valueChangeListener not skipping validation phase...

 

Regards,

I have a selectoneMenu component on my page and I want it to skip validation
phase when it changes, in the past somehow immediate=”true” solved this
problem for me but now I have noticed that this ain´t working anymore.  

In my page I have:

<h:selectOneMenu id="eclass" value="#{nativeHandler.eclass}"
class="dropdown" immediate="true" 

                                                     onchange="submit()"
valueChangeListener="#{nativeHandler.eClassSelected}">

                                               <f:selectItems
value="#{nativeHandler.eclassList}" />

                                         </h:selectOneMenu>

 

And I have an input which is marked as “required” and whenever I change the
selectOneMenu option it displays the respective validation message for this
component, which I don´t want to happen.

 

Any ideas, is this a known issue, am I missing something?

 

Thanks,

JV