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"> </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 > 2.0.8, or if the > exact cause of the intermittent problem was ever > identified as a bug. > > More details in this thread: > http://www.nabble.com/-S2--Optiontransfertselect-tag-t3827911.html > > regards, > Jeromy Evans > > [EMAIL PROTECTED] wrote: > > There is bug in optionstransferselect tag in > struts 2.0.6. When the form > > > is submitted,nothing > > is selected. > > Can someone tells me if this has been fixed in > struts 2.0.8. > > > > thanks in advance. > > Meissa > > > > > > > > [EMAIL PROTECTED] > > 06/07/2007 09:25 > > 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 > > > > > > > > > > > > > > > > but the showcase sample example is working > correctly. > > That's why I'm troubledshooted not to have my > example working. > > Meissa > > > > > > > > Bill Johnson <[EMAIL PROTECTED]> > > 05/07/2007 17:56 > > 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 > > > > > > > > > > > > > > I'm having the same problem and it appears to be > > because the default theme is requiring DOJO to > > automatically select all the select options before > > submitting the form. I'm not sure if there is a > JIRA > > bug opened for this or not, but there probably > should > === message truncated === ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ --------------------------------------------------------------------- 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.