it's now working.
the doSubmitSelect() was never called because of an error (the quote letft 
at the end).
thank for all who replied.
meissa



Bill Johnson <[EMAIL PROTECTED]> 
06/07/2007 18:22
Veuillez répondre à
"Struts Users Mailing List" <user@struts.apache.org>


A
Struts Users Mailing List <user@struts.apache.org>
cc

Objet
Re: optionstransferselect tag






You have to change the "rightid" and "leftid" values
with the actual names assigned to the <select> tags
generated by the S2 tags. Does that make sense?

-Bill


--- [EMAIL PROTECTED] wrote:

> 
> I've corrected it.
> But when my form is submitted, values that are
> selected are still not 
> submitted.
> I'm calling the function below:
> function doSubmitSelect()
> {
> var selectObj = document.getElementById('leftId'); 
> selectAllOptionsExceptSome(selectObj, 'key', '');
> selectObj = document.getElementById('rightId'); 
> selectAllOptionsExceptSome(selectObj, 'key', '');" 
> 
> }
> 
> the optiontransfertag definition is here:
> <s:optiontransferselect 
>         tooltip="Selectionner vos support favoris"
>         headerKey="-1"
>         headerValue="--- Selectionnez ---"
>         doubleHeaderKey="-1"
>         id="leftId"
>         doubleId="rightId"
>         doubleHeaderValue="--- Selectionnez ---"
>         emptyOption="true"
>         doubleEmptyOption="true"
>         label="Support favoris"
>         leftTitle="Supports favoris"
>         rightTitle="support favoris Choisis"
>         name="supportsFavoris" 
>         list="#application.supports" 
>         listKey="codeSupport" listValue="libelle"
>         doubleName="supportsFavorisChoisis"
>         doubleList="defaultListSupport" />
> 
> 
> I wonder if I have to define the leftId and the
> rightId in the form.
> 
> Meissa
> 
> 
> 
> Bill Johnson <[EMAIL PROTECTED]> 
> 06/07/2007 17:23
> Veuillez répondre à
> "Struts Users Mailing List" <user@struts.apache.org>
> 
> 
> A
> Struts Users Mailing List <user@struts.apache.org>
> cc
> 
> Objet
> Re: optionstransferselect tag
> 
> 
> 
> 
> 
> 
> The onsubmit attribute is for the <s:form> tag, not
> the <s:submit> tag.
> 
> -Bill
> 
> --- [EMAIL PROTECTED] wrote:
> 
> > 
> > I'm trying to use the onsubmit attribute in the
> > s:submit tag but it fails.
> > The exception is saying that the attribute
> onsubmit
> > is not correct 
> > according to submit TLD.
> > Can someone tell what I've done wrong.
> > here is my jsp:
> > 
> > <%@ taglib prefix="s" uri="/struts-tags" %>
> > 
> > <html>
> > <head>
> > <title> Media - Tags - UI Tags -
> > Optiontransferselect</title>
> > <script language="JavaScript"
> > type="text/javascript">
> > function doSubmitSelect()
> > {
> > var selectObj = document.getElementById('leftId'
> > );selectAllOptionsExceptSome(selectObj, 'key',
> '');
> > selectObj = document.getElementById('rightId'
> > );selectAllOptionsExceptSome(selectObj, 'key',
> '');"
> > 
> > 
> > }
> > </script>
> > <s:head theme="ajax" />
> > </head>
> > <body>
> > 
> > <center>
> > 
> > <s:form action="optiontfSubmit" method="post"> 
> > <table width="50%" border="0" align="center"
> > cellpadding="0" cellspacing=
> > "0">
> >         <TR>
> >                 <TD width="15%" height="25"
> > align="left">&nbsp;</TD>
> >                 <TD align="left">
> >                 <s:optiontransferselect 
> >         tooltip="Selectionner vos support favoris"
> >         headerKey="-1"
> >         headerValue="--- Selectionnez ---"
> >         doubleHeaderKey="-1"
> >         id="leftId"
> >         doubleId="rightId"
> >         doubleHeaderValue="--- Selectionnez ---"
> >         emptyOption="true"
> >         doubleEmptyOption="true"
> >         label="Support favoris"
> >         leftTitle="Supports favoris"
> >         rightTitle="support favoris Choisis"
> >         name="supportsFavoris" 
> >         list="#application.supports" 
> >         listKey="codeSupport" listValue="libelle"
> >         doubleName="supportsFavorisChoisis"
> >         doubleList="defaultListSupport" />
> >                 </TD>
> >         </TR>
> > 
> >         <tr>
> >                 <td></td>
> >                 <td align="left"  colspan="2">
> > <s:submit value="Valider" 
> > onsubmit="javascript:doSubmitSelect();"/></td>
> >         </tr>
> > </TABLE>
> > 
> > 
> > </s:form>
> > </center>
> > </body>
> > 
> > </html>
> > 
> > 
> > 
> > 
> > 
> > 
> > Jeromy Evans <[EMAIL PROTECTED]> 
> > 06/07/2007 09:49
> > Veuillez répondre à
> > "Struts Users Mailing List"
> <user@struts.apache.org>
> > 
> > 
> > A
> > Struts Users Mailing List <user@struts.apache.org>
> > cc
> > 
> > Objet
> > Re: optionstransferselect tag
> > 
> > 
> > 
> > 
> > 
> > 
> > You can work-around this bug in 2.0.6 by adding
> the
> > following javascript 
> > to the onsubmit attribute of
> optionstransferselect:
> > 
> > 
> > onsubmit="var selectObj = 
> >
>
document.getElementById('leftId');selectAllOptionsExceptSome(selectObj,
> > 
> > 'key', '');selectObj = 
> >
>
document.getElementById('rightId');selectAllOptionsExceptSome(selectObj,
> > 
> > 'key', '');"
> > 
> > where:
> > leftId is the id of the first select (id value)
> > rightId is the id of the second select (doubleId
> > value)
> > 
> > That is an exact copy of the javascript included
> in
> > <script> by the tag, 
> > but adding it to onsubmit guarantees it executes.
> > 
> > I can't comment on whether the problem was fixed
> in
> 
=== message truncated ===



 
____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut 
etre tenu responsable de son contenu. Toute utilisation ou diffusion non 
autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci 
de le detruire et d'avertir l'expediteur.
Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si 
necessaire

The integrity of this message cannot be guaranteed on the Internet. Natixis can 
not therefore be considered responsible for the contents. Any unauthorized use 
or dissemination is prohibited. If you are not the intended recipient of this 
message, then please delete it and notify the sender.
Let us mind the environment : let's print our mails only when necessary.

Reply via email to