You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yann Verlynde <yv...@oxade.com> on 2002/11/22 17:15:56 UTC

Problem with pre-select html:select Tag

Hello,

I have already read a lot of posts to implements that but I don't
understand.

Process: When the user select a value on the combo select, the page refresh
and fill a new select tag by a content which depend on the value selected by
the user.  The second select tag is well filled but the first is not pre
select on the value clicked by the user.

I don't understand why my select tag doesn't pre-select the good value. My
form class is in session scope and when I test my value it seems that it has
the good value.
Does anyone can help me please?

<%=request.getParameter("selectCMP")%>
<html:select property="selectCMP" onchange="choix(this)">
  <logic:notPresent name="selectCMP" scope="request">
    <html:option value="0">Choisissez votre Cadre Emploi</html:option>
  </logic:notPresent>
  <html:options collection="CMP" labelProperty="CMP_LIB" property="CMP_ID"/>
</html:select>

Thanks in advance

Yann VERLYNDE
Ingénieur d'Etudes
Oxade Ingénierie
13, Place Kossuth
75009 PARIS

Tel  : 01 42 82 99 38
Fax : 01 42 82 99 35
www.oxade.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with pre-select html:select Tag

Posted by Yann Verlynde <yv...@oxade.com>.
function choix(select){
  var choixSelect;
  if( select.name == 'selectCMP'){
    choixSelect = new getObj("choixSelect");
    choixSelect.obj.value = '1';
  }
  else if( select.name == 'selectSPE'){
    choixSelect = new getObj("choixSelect");
    choixSelect.obj.value = '2';
  }
  else alert('Erreur!!!');

  alert(choixSelect.obj.value);
  document.SaisieAgentForm.submit();
}
This function is used to know on which select the user interact.

----- Original Message -----
From: "Patrice" <pp...@nerim.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, November 22, 2002 5:29 PM
Subject: Re: Problem with pre-select html:select Tag


> Hi Yann,
>
> Should I know what is in your javascript function choix(this) ?
>
> Patrice
>
> ----- Original Message -----
> From: "Yann Verlynde" <yv...@oxade.com>
> To: "Struts" <st...@jakarta.apache.org>
> Sent: Friday, November 22, 2002 5:15 PM
> Subject: Problem with pre-select html:select Tag
>
>
> > Hello,
> >
> > I have already read a lot of posts to implements that but I don't
> > understand.
> >
> > Process: When the user select a value on the combo select, the page
> refresh
> > and fill a new select tag by a content which depend on the value
selected
> by
> > the user.  The second select tag is well filled but the first is not pre
> > select on the value clicked by the user.
> >
> > I don't understand why my select tag doesn't pre-select the good value.
My
> > form class is in session scope and when I test my value it seems that it
> has
> > the good value.
> > Does anyone can help me please?
> >
> > <%=request.getParameter("selectCMP")%>
> > <html:select property="selectCMP" onchange="choix(this)">
> >   <logic:notPresent name="selectCMP" scope="request">
> >     <html:option value="0">Choisissez votre Cadre Emploi</html:option>
> >   </logic:notPresent>
> >   <html:options collection="CMP" labelProperty="CMP_LIB"
> property="CMP_ID"/>
> > </html:select>
> >
> > Thanks in advance
> >
> > Yann VERLYNDE
> > Ingénieur d'Etudes
> > Oxade Ingénierie
> > 13, Place Kossuth
> > 75009 PARIS
> >
> > Tel  : 01 42 82 99 38
> > Fax : 01 42 82 99 35
> > www.oxade.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with pre-select html:select Tag

Posted by Patrice <pp...@nerim.net>.
Hi Yann,

Should I know what is in your javascript function choix(this) ?

Patrice

----- Original Message -----
From: "Yann Verlynde" <yv...@oxade.com>
To: "Struts" <st...@jakarta.apache.org>
Sent: Friday, November 22, 2002 5:15 PM
Subject: Problem with pre-select html:select Tag


> Hello,
>
> I have already read a lot of posts to implements that but I don't
> understand.
>
> Process: When the user select a value on the combo select, the page
refresh
> and fill a new select tag by a content which depend on the value selected
by
> the user.  The second select tag is well filled but the first is not pre
> select on the value clicked by the user.
>
> I don't understand why my select tag doesn't pre-select the good value. My
> form class is in session scope and when I test my value it seems that it
has
> the good value.
> Does anyone can help me please?
>
> <%=request.getParameter("selectCMP")%>
> <html:select property="selectCMP" onchange="choix(this)">
>   <logic:notPresent name="selectCMP" scope="request">
>     <html:option value="0">Choisissez votre Cadre Emploi</html:option>
>   </logic:notPresent>
>   <html:options collection="CMP" labelProperty="CMP_LIB"
property="CMP_ID"/>
> </html:select>
>
> Thanks in advance
>
> Yann VERLYNDE
> Ingénieur d'Etudes
> Oxade Ingénierie
> 13, Place Kossuth
> 75009 PARIS
>
> Tel  : 01 42 82 99 38
> Fax : 01 42 82 99 35
> www.oxade.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with pre-select html:select Tag

Posted by Yann Verlynde <yv...@oxade.com>.
Unfortunatly no :(
----- Original Message -----
From: "Patrice" <pp...@nerim.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, November 22, 2002 6:09 PM
Subject: Re: Problem with pre-select html:select Tag


> I'm searching, but I don't see what's wrong...
> A stupid question: you don't remove the form from the request (or the
> session) in your action, or do something like setSelectCmp("") ?
>
>
> ----- Original Message -----
> From: "Yann Verlynde" <yv...@oxade.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Friday, November 22, 2002 5:56 PM
> Subject: Re: Problem with pre-select html:select Tag
>
>
> > Patrice,
> >
> > I have a form Class and an Action class. My action class access to a
> > database and get back the content of the second list (which is
calculated
> by
> > the value clicked on the first list) . I have the second list in my JSP
> but
> > the first is not positionned on the user's choice.
> >
> > Thanks in advance
> > Yann
> > ----- Original Message -----
> > From: "Patrice" <pp...@nerim.net>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Friday, November 22, 2002 5:48 PM
> > Subject: Re: Problem with pre-select html:select Tag
> >
> >
> > > Yann,
> > >
> > > I've got another question: the form action is a struts action that
> > > calculates the content of the second list, isn't it ?
> > >
> > >
> > > ----- Original Message -----
> > > From: "Yann Verlynde" <yv...@oxade.com>
> > > To: "Struts" <st...@jakarta.apache.org>
> > > Sent: Friday, November 22, 2002 5:15 PM
> > > Subject: Problem with pre-select html:select Tag
> > >
> > >
> > > > Hello,
> > > >
> > > > I have already read a lot of posts to implements that but I don't
> > > > understand.
> > > >
> > > > Process: When the user select a value on the combo select, the page
> > > refresh
> > > > and fill a new select tag by a content which depend on the value
> > selected
> > > by
> > > > the user.  The second select tag is well filled but the first is not
> pre
> > > > select on the value clicked by the user.
> > > >
> > > > I don't understand why my select tag doesn't pre-select the good
> value.
> > My
> > > > form class is in session scope and when I test my value it seems
that
> it
> > > has
> > > > the good value.
> > > > Does anyone can help me please?
> > > >
> > > > <%=request.getParameter("selectCMP")%>
> > > > <html:select property="selectCMP" onchange="choix(this)">
> > > >   <logic:notPresent name="selectCMP" scope="request">
> > > >     <html:option value="0">Choisissez votre Cadre
Emploi</html:option>
> > > >   </logic:notPresent>
> > > >   <html:options collection="CMP" labelProperty="CMP_LIB"
> > > property="CMP_ID"/>
> > > > </html:select>
> > > >
> > > > Thanks in advance
> > > >
> > > > Yann VERLYNDE
> > > > Ingénieur d'Etudes
> > > > Oxade Ingénierie
> > > > 13, Place Kossuth
> > > > 75009 PARIS
> > > >
> > > > Tel  : 01 42 82 99 38
> > > > Fax : 01 42 82 99 35
> > > > www.oxade.com
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with pre-select html:select Tag

Posted by Patrice <pp...@nerim.net>.
I'm searching, but I don't see what's wrong...
A stupid question: you don't remove the form from the request (or the
session) in your action, or do something like setSelectCmp("") ?


----- Original Message -----
From: "Yann Verlynde" <yv...@oxade.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, November 22, 2002 5:56 PM
Subject: Re: Problem with pre-select html:select Tag


> Patrice,
>
> I have a form Class and an Action class. My action class access to a
> database and get back the content of the second list (which is calculated
by
> the value clicked on the first list) . I have the second list in my JSP
but
> the first is not positionned on the user's choice.
>
> Thanks in advance
> Yann
> ----- Original Message -----
> From: "Patrice" <pp...@nerim.net>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Friday, November 22, 2002 5:48 PM
> Subject: Re: Problem with pre-select html:select Tag
>
>
> > Yann,
> >
> > I've got another question: the form action is a struts action that
> > calculates the content of the second list, isn't it ?
> >
> >
> > ----- Original Message -----
> > From: "Yann Verlynde" <yv...@oxade.com>
> > To: "Struts" <st...@jakarta.apache.org>
> > Sent: Friday, November 22, 2002 5:15 PM
> > Subject: Problem with pre-select html:select Tag
> >
> >
> > > Hello,
> > >
> > > I have already read a lot of posts to implements that but I don't
> > > understand.
> > >
> > > Process: When the user select a value on the combo select, the page
> > refresh
> > > and fill a new select tag by a content which depend on the value
> selected
> > by
> > > the user.  The second select tag is well filled but the first is not
pre
> > > select on the value clicked by the user.
> > >
> > > I don't understand why my select tag doesn't pre-select the good
value.
> My
> > > form class is in session scope and when I test my value it seems that
it
> > has
> > > the good value.
> > > Does anyone can help me please?
> > >
> > > <%=request.getParameter("selectCMP")%>
> > > <html:select property="selectCMP" onchange="choix(this)">
> > >   <logic:notPresent name="selectCMP" scope="request">
> > >     <html:option value="0">Choisissez votre Cadre Emploi</html:option>
> > >   </logic:notPresent>
> > >   <html:options collection="CMP" labelProperty="CMP_LIB"
> > property="CMP_ID"/>
> > > </html:select>
> > >
> > > Thanks in advance
> > >
> > > Yann VERLYNDE
> > > Ingénieur d'Etudes
> > > Oxade Ingénierie
> > > 13, Place Kossuth
> > > 75009 PARIS
> > >
> > > Tel  : 01 42 82 99 38
> > > Fax : 01 42 82 99 35
> > > www.oxade.com
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with pre-select html:select Tag

Posted by Yann Verlynde <yv...@oxade.com>.
Patrice,

I have a form Class and an Action class. My action class access to a
database and get back the content of the second list (which is calculated by
the value clicked on the first list) . I have the second list in my JSP but
the first is not positionned on the user's choice.

Thanks in advance
Yann
----- Original Message -----
From: "Patrice" <pp...@nerim.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, November 22, 2002 5:48 PM
Subject: Re: Problem with pre-select html:select Tag


> Yann,
>
> I've got another question: the form action is a struts action that
> calculates the content of the second list, isn't it ?
>
>
> ----- Original Message -----
> From: "Yann Verlynde" <yv...@oxade.com>
> To: "Struts" <st...@jakarta.apache.org>
> Sent: Friday, November 22, 2002 5:15 PM
> Subject: Problem with pre-select html:select Tag
>
>
> > Hello,
> >
> > I have already read a lot of posts to implements that but I don't
> > understand.
> >
> > Process: When the user select a value on the combo select, the page
> refresh
> > and fill a new select tag by a content which depend on the value
selected
> by
> > the user.  The second select tag is well filled but the first is not pre
> > select on the value clicked by the user.
> >
> > I don't understand why my select tag doesn't pre-select the good value.
My
> > form class is in session scope and when I test my value it seems that it
> has
> > the good value.
> > Does anyone can help me please?
> >
> > <%=request.getParameter("selectCMP")%>
> > <html:select property="selectCMP" onchange="choix(this)">
> >   <logic:notPresent name="selectCMP" scope="request">
> >     <html:option value="0">Choisissez votre Cadre Emploi</html:option>
> >   </logic:notPresent>
> >   <html:options collection="CMP" labelProperty="CMP_LIB"
> property="CMP_ID"/>
> > </html:select>
> >
> > Thanks in advance
> >
> > Yann VERLYNDE
> > Ingénieur d'Etudes
> > Oxade Ingénierie
> > 13, Place Kossuth
> > 75009 PARIS
> >
> > Tel  : 01 42 82 99 38
> > Fax : 01 42 82 99 35
> > www.oxade.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with pre-select html:select Tag

Posted by Patrice <pp...@nerim.net>.
Yann,

I've got another question: the form action is a struts action that
calculates the content of the second list, isn't it ?


----- Original Message -----
From: "Yann Verlynde" <yv...@oxade.com>
To: "Struts" <st...@jakarta.apache.org>
Sent: Friday, November 22, 2002 5:15 PM
Subject: Problem with pre-select html:select Tag


> Hello,
>
> I have already read a lot of posts to implements that but I don't
> understand.
>
> Process: When the user select a value on the combo select, the page
refresh
> and fill a new select tag by a content which depend on the value selected
by
> the user.  The second select tag is well filled but the first is not pre
> select on the value clicked by the user.
>
> I don't understand why my select tag doesn't pre-select the good value. My
> form class is in session scope and when I test my value it seems that it
has
> the good value.
> Does anyone can help me please?
>
> <%=request.getParameter("selectCMP")%>
> <html:select property="selectCMP" onchange="choix(this)">
>   <logic:notPresent name="selectCMP" scope="request">
>     <html:option value="0">Choisissez votre Cadre Emploi</html:option>
>   </logic:notPresent>
>   <html:options collection="CMP" labelProperty="CMP_LIB"
property="CMP_ID"/>
> </html:select>
>
> Thanks in advance
>
> Yann VERLYNDE
> Ingénieur d'Etudes
> Oxade Ingénierie
> 13, Place Kossuth
> 75009 PARIS
>
> Tel  : 01 42 82 99 38
> Fax : 01 42 82 99 35
> www.oxade.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>