html:select tag or logic:iterate
Hi all, I am quite new to struts tag library and I need an advice. In the HttpSession I have an object of type Collection, which stores a list of MyObject. MyOBject has two properties, description and id. Out of this Collection of MyObject I must generate a selectable list Which displays MyObject names, (wity MyObject.id as value) I have tried to embed the html:select inside a logic:iterate, but my editor (websphere studio)complaints for following code html:select property=defaultContainerType multiple=no logic:iterate collection=%= (Collection)session.getAttribute(CONTAINER_TYPES)% id=container html:option value=bean:write name=container property=type/ bean:write name=container property=description/ /html:option /logic:iterate /html:select the error is 'Attribute container has no value' anyone has a suggestion on how to solve my problem? Fact is that the Collection is stored in the session, not in a JavaBean.. Thanks and regards marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag or logic:iterate
try this, html:select property=defaultContainerType html:options collection=CONTAINER_TYPES property=id labelProperty=name/ /html:select F. - Original Message - From: Marco Mistroni [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, December 15, 2003 3:00 PM Subject: html:select tag or logic:iterate Hi all, I am quite new to struts tag library and I need an advice. In the HttpSession I have an object of type Collection, which stores a list of MyObject. MyOBject has two properties, description and id. Out of this Collection of MyObject I must generate a selectable list Which displays MyObject names, (wity MyObject.id as value) I have tried to embed the html:select inside a logic:iterate, but my editor (websphere studio)complaints for following code html:select property=defaultContainerType multiple=no logic:iterate collection=%= (Collection)session.getAttribute(CONTAINER_TYPES)% id=container html:option value=bean:write name=container property=type/ bean:write name=container property=description/ /html:option /logic:iterate /html:select the error is 'Attribute container has no value' anyone has a suggestion on how to solve my problem? Fact is that the Collection is stored in the session, not in a JavaBean.. Thanks and regards marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: html:select tag or logic:iterate
Inside the struts-exercise-taglib.war that comes with struts 1.1 you will find a pratical example to solve your problem... You should not do a logic:iterate inside html:select, insteat of logic:iterate use the option:optionsCollection and pass your collection to it... look the jsp example Vector options = new Vector(); options.add(new LabelValueBean(Label 0, Value 0)); options.add(new LabelValueBean(Label 1, Value 1)); options.add(new LabelValueBean(Label 2, Value 2)); options.add(new LabelValueBean(Label 3, Value 3)); options.add(new LabelValueBean(Label 4, Value 4)); options.add(new LabelValueBean(Label 5, Value 5)); options.add(new LabelValueBean(Label 6, Value 6)); options.add(new LabelValueBean(Label 7, Value 7)); options.add(new LabelValueBean(Label 8, Value 8)); options.add(new LabelValueBean(Label 9, Value 9)); pageContext.setAttribute(options, options); html:select property=collectionSelect size=10 multiple=true html:options collection=options property=value labelProperty=label/ /html:select or jsp:useBean id=testbean scope=session class=org.apache.struts.webapp.exercise.TestBean/ html:select property=beanCollectionSelect size=10 multiple=true html:optionsCollection name=testbean property=beanCollection/ /html:select Tiago Henrique C. R. Alves -Mensagem original- De: Marco Mistroni [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 15 de dezembro de 2003 10:00 Para: 'Struts Users Mailing List' Assunto: html:select tag or logic:iterate Hi all, I am quite new to struts tag library and I need an advice. In the HttpSession I have an object of type Collection, which stores a list of MyObject. MyOBject has two properties, description and id. Out of this Collection of MyObject I must generate a selectable list Which displays MyObject names, (wity MyObject.id as value) I have tried to embed the html:select inside a logic:iterate, but my editor (websphere studio)complaints for following code html:select property=defaultContainerType multiple=no logic:iterate collection=%= (Collection)session.getAttribute(CONTAINER_TYPES)% id=container html:option value=bean:write name=container property=type/ bean:write name=container property=description/ /html:option /logic:iterate /html:select the error is 'Attribute container has no value' anyone has a suggestion on how to solve my problem? Fact is that the Collection is stored in the session, not in a JavaBean.. Thanks and regards marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with html:select tag calling set method in form
Is this the correct functionallity of struts?? if you have a multiple selection list box, and everything is deselected, the setter method in the form object is not getting called. It only gets called if there are 1 or more entries in the list box selected ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | damian_bradicich@| | | stchome.com | | || | | 10/30/2003 10:44 | | | AM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ --| | | |To: Struts Users Mailing List [EMAIL PROTECTED] | |cc: | |Subject: Problem with html:select tag calling set method in form | --| I have a jsp that creates a select tag w/ size = 2 and multiple also true, which gives me a list box w/ multi selection. So, I open up the page, and I see all the data fine, I select a couple of items in the list box and save, everything is great, my setter in the form is getting called. However, if i deselect all entries in the list box, and save, the setter method in the form is not being called, has anyone else noticed this? If so, does anyone have a workaround? ___ Damian Bradicich Software Developer Scientific Technologies Corporation Web Site: www.stchome.com Advancing Public Health Core Capacities While Leveraging the Resources of a Community ___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with html:select tag calling set method in form
This looke like correct to me.Because if you do not select anything, that also means that there wont be any value sent for that request parameter.And so the setter will not be called. You can runa simple check.Check by calling request.getParameter if any parameter with the name for the select box is being sent in request.I am sure you wont find any... HTH. regards, Shirish -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 3:21 PM To: Struts Users Mailing List Subject: Re: Problem with html:select tag calling set method in form Is this the correct functionallity of struts?? if you have a multiple selection list box, and everything is deselected, the setter method in the form object is not getting called. It only gets called if there are 1 or more entries in the list box selected ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | damian_bradicich@| | | stchome.com | | || | | 10/30/2003 10:44 | | | AM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ --| | | |To: Struts Users Mailing List [EMAIL PROTECTED] | |cc: | |Subject: Problem with html:select tag calling set method in form | --| I have a jsp that creates a select tag w/ size = 2 and multiple also true, which gives me a list box w/ multi selection. So, I open up the page, and I see all the data fine, I select a couple of items in the list box and save, everything is great, my setter in the form is getting called. However, if i deselect all entries in the list box, and save, the setter method in the form is not being called, has anyone else noticed this? If so, does anyone have a workaround? ___ Damian Bradicich Software Developer Scientific Technologies Corporation Web Site: www.stchome.com Advancing Public Health Core Capacities While Leveraging the Resources of a Community ___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with html:select tag calling set method in form
I was thinking that was the case, but was hoping otherwise, I'll have to come up w/ a javascript solution. thx for the help Shirish ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | shirishchandra.sakha| | | [EMAIL PROTECTED] | | || | | 11/04/2003 09:35 AM | | | Please respond to| | | Struts Users Mailing| | | List| | || |-+ --| | | |To: [EMAIL PROTECTED] | |cc: | |Subject: RE: Problem with html:select tag calling set method in form | --| This looke like correct to me.Because if you do not select anything, that also means that there wont be any value sent for that request parameter.And so the setter will not be called. You can runa simple check.Check by calling request.getParameter if any parameter with the name for the select box is being sent in request.I am sure you wont find any... HTH. regards, Shirish -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 3:21 PM To: Struts Users Mailing List Subject: Re: Problem with html:select tag calling set method in form Is this the correct functionallity of struts?? if you have a multiple selection list box, and everything is deselected, the setter method in the form object is not getting called. It only gets called if there are 1 or more entries in the list box selected ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | damian_bradicich@| | | stchome.com | | || | | 10/30/2003 10:44 | | | AM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ --| | | |To: Struts Users Mailing List [EMAIL PROTECTED] | |cc: | |Subject: Problem with html:select tag calling set method in form | --| I have a jsp that creates a select tag w/ size = 2 and multiple also true, which gives me a list box w/ multi selection. So, I open up the page, and I see all the data fine, I select a couple of items in the list box and save, everything is great, my setter in the form is getting called. However, if i deselect all entries in the list box, and save, the setter method in the form is not being called, has anyone else noticed this? If so, does anyone have a workaround? ___ Damian Bradicich Software Developer Scientific Technologies Corporation Web Site: www.stchome.com Advancing Public Health Core Capacities While Leveraging the Resources of a Community ___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED
RE: Problem with html:select tag calling set method in form
what is it you are trying to do?I mean why the setter should be caled when nothing is selected? Just curious :-)) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 4:41 PM To: Struts Users Mailing List Subject: RE: Problem with html:select tag calling set method in form I was thinking that was the case, but was hoping otherwise, I'll have to come up w/ a javascript solution. thx for the help Shirish ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | shirishchandra.sakha| | | [EMAIL PROTECTED] | | || | | 11/04/2003 09:35 AM | | | Please respond to| | | Struts Users Mailing| | | List| | || |-+ --| | | |To: [EMAIL PROTECTED] | |cc: | |Subject: RE: Problem with html:select tag calling set method in form | --| This looke like correct to me.Because if you do not select anything, that also means that there wont be any value sent for that request parameter.And so the setter will not be called. You can runa simple check.Check by calling request.getParameter if any parameter with the name for the select box is being sent in request.I am sure you wont find any... HTH. regards, Shirish -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 3:21 PM To: Struts Users Mailing List Subject: Re: Problem with html:select tag calling set method in form Is this the correct functionallity of struts?? if you have a multiple selection list box, and everything is deselected, the setter method in the form object is not getting called. It only gets called if there are 1 or more entries in the list box selected ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | damian_bradicich@| | | stchome.com | | || | | 10/30/2003 10:44 | | | AM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ --| | | |To: Struts Users Mailing List [EMAIL PROTECTED] | |cc: | |Subject: Problem with html:select tag calling set method in form | --| I have a jsp that creates a select tag w/ size = 2 and multiple also true, which gives me a list box w/ multi selection. So, I open up the page, and I see all the data fine, I select a couple of items in the list box and save, everything is great, my setter in the form is getting called. However, if i deselect all entries in the list box, and save, the setter method in the form is not being called, has anyone else noticed this? If so, does anyone have a workaround? ___ Damian Bradicich Software Developer Scientific Technologies Corporation Web Site: www.stchome.com Advancing Public Health Core Capacities While Leveraging the Resources of a Community ___ - To unsubscribe, e-mail: [EMAIL PROTECTED
RE: Problem with html:select tag calling set method in form
We have a couple of pages which use the same form (advanced and basic search), so the reset method can't be used to clear the fields (as you would for any normal pages). I was hoping that the setter would be called to reset the field, so I am putting javascript in to null out the field in the form so that the changes will be saved properly ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | shirishchandra.sakha| | | [EMAIL PROTECTED] | | || | | 11/04/2003 11:09 AM | | | Please respond to| | | Struts Users Mailing| | | List| | || |-+ --| | | |To: [EMAIL PROTECTED] | |cc: | |Subject: RE: Problem with html:select tag calling set method in form | --| what is it you are trying to do?I mean why the setter should be caled when nothing is selected? Just curious :-)) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 4:41 PM To: Struts Users Mailing List Subject: RE: Problem with html:select tag calling set method in form I was thinking that was the case, but was hoping otherwise, I'll have to come up w/ a javascript solution. thx for the help Shirish ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | shirishchandra.sakha| | | [EMAIL PROTECTED] | | || | | 11/04/2003 09:35 AM | | | Please respond to| | | Struts Users Mailing| | | List| | || |-+ --| | | |To: [EMAIL PROTECTED] | |cc: | |Subject: RE: Problem with html:select tag calling set method in form | --| This looke like correct to me.Because if you do not select anything, that also means that there wont be any value sent for that request parameter.And so the setter will not be called. You can runa simple check.Check by calling request.getParameter if any parameter with the name for the select box is being sent in request.I am sure you wont find any... HTH. regards, Shirish -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 3:21 PM To: Struts Users Mailing List Subject: Re: Problem with html:select tag calling set method in form Is this the correct functionallity of struts?? if you have a multiple selection list box, and everything is deselected, the setter method in the form object is not getting called. It only gets called if there are 1 or more entries in the list box selected ___ Damian Bradicich Software Developer Scientific Technologies Corporation Tel: (603) 471-4712 Email: [EMAIL PROTECTED] Web Site: www.stchome.com Advancing Public Health Through Information Technology ___ |-+ | | damian_bradicich@| | | stchome.com
Problem with html:select tag calling set method in form
I have a jsp that creates a select tag w/ size = 2 and multiple also true, which gives me a list box w/ multi selection. So, I open up the page, and I see all the data fine, I select a couple of items in the list box and save, everything is great, my setter in the form is getting called. However, if i deselect all entries in the list box, and save, the setter method in the form is not being called, has anyone else noticed this? If so, does anyone have a workaround? ___ Damian Bradicich Software Developer Scientific Technologies Corporation Web Site: www.stchome.com Advancing Public Health Core Capacities While Leveraging the Resources of a Community ___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems in usage of html:select tag
Hello! I want, that the user can switch the language at runtime and he can chose the language without pressing the submit button. The selection of another item should replace the pressing of the submit button. Can anybody help me? html:form action=/language method = GET html:select property=language html:option value=Deutsch/ html:option value=Englisch/ /html:select html:submit/ -- there are another possibility to mapp the action?? /html:form There are a tutorial how to use the Stuts Tags??? Thank You! Dirk
RE: Problems in usage of html:select tag
I had a similar problem. I used javascript to submit the form forcibly in the onchange event of the html:select Swaroop -Original Message- From: Dirk Behrendt [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 4:27 PM To: [EMAIL PROTECTED] Subject: Problems in usage of html:select tag Hello! I want, that the user can switch the language at runtime and he can chose the language without pressing the submit button. The selection of another item should replace the pressing of the submit button. Can anybody help me? html:form action=/language method = GET html:select property=language html:option value=Deutsch/ html:option value=Englisch/ /html:select html:submit/ -- there are another possibility to mapp the action?? /html:form There are a tutorial how to use the Stuts Tags??? Thank You! Dirk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems in usage of html:select tag
html:select property=language html:select property=language onchange=javascript: submit () There are a tutorial how to use the Stuts Tags??? Documentation is included as a war struts-documentation.war There are User guides and API docs for tags. If you do not want to run the war as an app you can just unpack it and browse html. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:select tag
I'm new to Struts , can some one give me a good example of how to use html:select tag with options. Thanks Shriyan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag
Take a look at the struts-example, there is a demonstration there. -- James Mitchell Software Developer/Struts Evangelist http://www.open-tools.org - Original Message - From: Shriyan Sanmuganathan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 29, 2003 12:59 PM Subject: html:select tag I'm new to Struts , can some one give me a good example of how to use html:select tag with options. Thanks Shriyan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:select tag
Try this. http://bobcat.webappcabaret.net/ninsky/index.jsp I'd appreciate feedback if you find it useful (or not). Steve -Original Message- From: Shriyan Sanmuganathan [mailto:[EMAIL PROTECTED] Sent: May 29, 2003 9:59 AM To: [EMAIL PROTECTED] Subject: html:select tag I'm new to Struts , can some one give me a good example of how to use html:select tag with options. Thanks Shriyan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:select tag
your link explains very detail. if i have 15 drop downs on a page means i need to give 15 different request.setAttributes PrepareOptionsAction has so many request.setAttribute things. is any better way doing this with html:options. Sri -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2003 12:05 PM To: Struts Users Mailing List Subject: RE: html:select tag Try this. http://bobcat.webappcabaret.net/ninsky/index.jsp I'd appreciate feedback if you find it useful (or not). Steve -Original Message- From: Shriyan Sanmuganathan [mailto:[EMAIL PROTECTED] Sent: May 29, 2003 9:59 AM To: [EMAIL PROTECTED] Subject: html:select tag I'm new to Struts , can some one give me a good example of how to use html:select tag with options. Thanks Shriyan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:select tag
If you have 15 *different* lists then, yes, you will need to store them all. But if 2 or more lists share the same options then you will only need one collection. On the example page, there are two lists of books, but they both get their options from the same request scope collection. Also, you might not need to place your collections in the request each time. Depending on the list, you might be able to use the session or application scopes. For example, a list that all users share and does not change could be placed in the application scope at application startup. Steve -Original Message- From: Kommana, Sridhar [mailto:[EMAIL PROTECTED] Sent: May 29, 2003 1:53 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: html:select tag your link explains very detail. if i have 15 drop downs on a page means i need to give 15 different request.setAttributes PrepareOptionsAction has so many request.setAttribute things. is any better way doing this with html:options. Sri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
do to put onChange on a html:select tag
how do i put a onChange function in a html:select tag? help anyone? many thanks in advance...
RE: do to put onChange on a html:select tag
You just do it :) . Look over the Struts User Guide, including the API pages. In the select tag, you'll see an onchange attribute. -Original Message- From: Richard Raquepo [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 4:54 PM To: Struts Users Mailing List Subject: do to put onChange on a html:select tag how do i put a onChange function in a html:select tag? help anyone? many thanks in advance... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
error in my html:select tag
i have this code in my jsp :53 html:select property=provincecode styleClass=normalblack onchange=province(userAccountForm,'bean:write name=userAccountForm property=citycode/') but i get this error: [ServletException in:/manager/addtm-body.jsp] /manager/addtm-body.jsp:53: expected `' at ``'' (for tag `html:select' at line 53). The XML tag syntax is: tag attr1='value1'' can't i combine a bean:write in a html:select tag? thanks
Re: error in my html:select tag
You can't use a custom tag as the value of another tag's attribute. David From: Richard Raquepo [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: error in my html:select tag Date: Fri, 28 Feb 2003 11:18:16 +0800 i have this code in my jsp :53 html:select property=provincecode styleClass=normalblack onchange=province(userAccountForm,'bean:write name=userAccountForm property=citycode/') but i get this error: [ServletException in:/manager/addtm-body.jsp] /manager/addtm-body.jsp:53: expected `' at ``'' (for tag `html:select' at line 53). The XML tag syntax is: tag attr1='value1'' can't i combine a bean:write in a html:select tag? thanks _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: error in my html:select tag
No, use a defined bean. bean:define name=citycode bean:write name=userAccountForm property=citycode/ /bean:define html:select property=provincecode styleClass=normalblack onchange=%=province(userAccountForm,' + citycode + ')% -- James Mitchell Web Developer/Struts Evangelist http://www.microsoft.com/struts/ -Original Message- From: Richard Raquepo [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 10:18 PM To: Struts Users Mailing List Subject: error in my html:select tag i have this code in my jsp :53 html:select property=provincecode styleClass=normalblack onchange=province(userAccountForm,'bean:write name=userAccountForm property=citycode/') but i get this error: [ServletException in:/manager/addtm-body.jsp] /manager/addtm-body.jsp:53: expected `' at ``'' (for tag `html:select' at line 53). The XML tag syntax is: tag attr1='value1'' can't i combine a bean:write in a html:select tag? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:select tag and the value attribute
Hello All, I'm having some trouble getting the html:select tag to recognize the value attribute in order to set the appropriate enclosed option to selected. It works fine with a simple string, but doesn't seem to recognize a RT expression. Here's the code sample: html:select property=mapservicename value=${mapserviceDetailForm.mapservice.name} html:optionsCollection label=name property=mapserviceList value=name / /html:select There is a bean mapservice contained in mapserviceDetailForm, and it has a property name that should identify the option to be selected. Can anyone point out what I'm doing wrong? Thanks! -- john - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag and the value attribute
John == John C Cartwright John writes: John Hello All, John I'm having some trouble getting the html:select tag to recognize the value John attribute in order to set the appropriate enclosed option to selected. It John works fine with a simple string, but doesn't seem to recognize a RT expression. John Here's the code sample: John html:select John property=mapservicename John value=${mapserviceDetailForm.mapservice.name} John html:optionsCollection Johnlabel=name Johnproperty=mapserviceList Johnvalue=name / John /html:select John There is a bean mapservice contained in mapserviceDetailForm, and it has a John property name that should identify the option to be selected. John Can anyone point out what I'm doing wrong? Well, technically you're not using an RT expression, but an EL expression. Those will only work with the Struts-EL library (or the JSTL). You're obviously somewhat familiar with that, or you wouldn't have tried this. Does that tell you what you need to know? -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP; SCWCD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag and the value attribute
Thanks for the prompt reply, David. I didn't realize that there was a Struts-EL library, where would I find such a beast? I don't see mention of it in the 1.1b3 distribution nor in the on-line docs. Thanks again! -- john David M. Karr wrote: John == John C Cartwright John writes: John Hello All, John I'm having some trouble getting the html:select tag to recognize the value John attribute in order to set the appropriate enclosed option to selected. It John works fine with a simple string, but doesn't seem to recognize a RT expression. John Here's the code sample: John html:select John property=mapservicename John value=${mapserviceDetailForm.mapservice.name} John html:optionsCollection Johnlabel=name Johnproperty=mapserviceList Johnvalue=name / John /html:select John There is a bean mapservice contained in mapserviceDetailForm, and it has a John property name that should identify the option to be selected. John Can anyone point out what I'm doing wrong? Well, technically you're not using an RT expression, but an EL expression. Those will only work with the Struts-EL library (or the JSTL). You're obviously somewhat familiar with that, or you wouldn't have tried this. Does that tell you what you need to know? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag and the value attribute
John == John C Cartwright John writes: John Thanks for the prompt reply, David. I didn't realize that there was a John Struts-EL library, where would I find such a beast? I don't see mention of it John in the 1.1b3 distribution nor in the on-line docs. It's in a directory in the contrib directory, in the main distribution. There is a small section on it in the user guide. You could search the mail archives for more discussion about it. The following link is for the original announcement about it on struts-user: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg43743.html -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP; SCWCD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag and the value attribute
Very cool! -- thanks very much for your help and for contributing Struts-EL! -- john David M. Karr wrote: John == John C Cartwright John writes: John Thanks for the prompt reply, David. I didn't realize that there was a John Struts-EL library, where would I find such a beast? I don't see mention of it John in the 1.1b3 distribution nor in the on-line docs. It's in a directory in the contrib directory, in the main distribution. There is a small section on it in the user guide. You could search the mail archives for more discussion about it. The following link is for the original announcement about it on struts-user: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg43743.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
blank default value in html:select tag
I'm using html:select tag for all drop down boxes. The default selected value in the drop down box is always first record of the table. I require that should be blank initially i.e before selection. I set value attribute as blank. But it doesn't work. How to do this? Can any one help me in this regard? Thanks Regards Jaisankar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: blank default value in html:select tag
html:select property=propertyNm size=1 html:option value=All/html:option html:options collection=myList property=key labelProperty=label/ /html:select - Original Message - From: Arunachalam Jaisankar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 12, 2003 5:50 PM Subject: blank default value in html:select tag I'm using html:select tag for all drop down boxes. The default selected value in the drop down box is always first record of the table. I require that should be blank initially i.e before selection. I set value attribute as blank. But it doesn't work. How to do this? Can any one help me in this regard? Thanks Regards Jaisankar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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=0Choisissez 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem with pre-select html:select Tag
So your form bean associated with the action has a proper getter and setter for the selectCMP attribute? Their signatures would be like String getSelectCMP() and void setSelectCMP(String cmp). It might be worth setting a breakpoint in those two methods, or adding print statements to them, to see whether they get there, and what values are being gotten/set into them. -Original Message- From: Yann Verlynde [mailto:[EMAIL PROTECTED]] 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=0Choisissez votre Cadre Emploi/html:option /logic:notPresent html:options collection=CMP labelProperty=CMP_LIB property=CMP_ID/ /html:select -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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 [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] 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=0Choisissez 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with pre-select html:select Tag
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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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 [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] 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=0Choisissez 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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 [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] 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=0Choisissez 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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 [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] 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=0Choisissez 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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 [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] 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=0Choisissez 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with pre-select html:select Tag
Unfortunatly no :( - Original Message - From: Patrice [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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 [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] 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 [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] 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=0Choisissez 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:select tag question
This may be a question for the Struts Developers, but here goes. I've been investigating the following JSP error (thrown by a JSP page attempting to use a FormBean) :- javax.servlet.jsp.JspException: No getter method available for property archiveServer for bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304) at org.apache.jsp.ResultArchiveAdmin_jsp._jspService(ResultArchiveAdmin_jsp.jav a:265) Having looked at the Struts source code it would appear that the org.apache.struts.taglib.html.BEAN string should be the Class of the FormBean I've associated with my JSP page - but it isn't. This is the default value that the name var is initialised to. It would appear that the SelectTag.setName() method is not being called and hence the tag does not know the FormBean it should be looking for. Has anyone any ideas when/how the SelectTag should be told the Class of the FormBean it should be looking for so that it can populate the HTML OPTION tag? BTW I'm referencing the JSP page directly via a link, should I go via an Action? It wouldn't do anything as this initial reference simply displays an empty Form for the user to complete. Many thanks. Neil. Neil Axtell Principal Engineer (MMI/Web Technologies) ANRITSU LIMITED European Measurement Division - Engineering 200 Capability Green Luton, UK Tel: +44 (0) 1582 433347 Fax: +44 (0) 1582 433276 E-Mail: [EMAIL PROTECTED] mailto:Neil.Axtell;eu.anritsu.com - This email message, together with any attachments, is for the exclusive and confidential use of the addressee(s). If you have received this message in error, please notify the sender by email immediately, then delete the message and any copies. Any views or opinions presented herein are solely those of the author and do not necessarily represent those of the Anritsu group of companies. - -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Html:select tag does not set the options
Hi, I am trying to populate a combobox with an array of strings. I have the following in my JSP: html:select property=selectedValue html:options name=nameList / /html:select where selectedValue is a property in my form. nameList is an ArrayList of Strings in my session. How can I use the ArrayList of Strings from my session to populate the combobox? Pls let me know. _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Html:select tag does not set the options
I would suggest creating your own tag... I am not sure if this is the best approach, but it seems to work well for me If you have your own tagand this tag returns your ArrayList of strings wrapped in option/option tags it will work so you would have something like html:select property=selectedValue yourPrefix:yourCustomTag properties/ /html:select where you have a tag that is mapped with yourCustomTag. Hope this helps Sean -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[Newbie] prob with html:options or html:select tag
Hi, I have a weird problem here (as always :). I have the following code in my *.jsp file: form action=handleprojectaddrequest.do method=post Select request type html:select property=codtyp html:options name=projectaddrequestform collection=listTyp property=id labelProperty=name/ /html:select /form so, codtyp is a property of HandleProjectAddRequestAction projectaddrequestform is a session bean (it's actually loaded into the session, because I did the check before in the jsp page) listTyp is a collection (ArrayList) of beans (type is one of mine named ElementSimple) id and name are two properties of the class ElementSimple My session bean is well loaded. My ArrayList does contain values. So why do I have an error when I try to execute the preceding code ? Thanks for having read me so far :) Friendly Regards, Slimane FYI, here's the exception thrown: javax.servlet.ServletException: Cannot find bean under name org.apache.struts.taglib.html.BEAN at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457) at org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.java:378) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:970) at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:404) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) at
RE: [Newbie] prob with html:options or html:select tag
Make sure that you use the html:form taglib. Currently you are not using it. It will get the bean for your page... html:form action=handleprojectaddrequest.do Select request type html:select property=codtyp html:options name=projectaddrequestform collection=listTyp property=id labelProperty=name/ /html:select /html:form dave -Original Message- From: Slimane Zouggari [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 4:09 AM To: [EMAIL PROTECTED] Subject: [Newbie] prob with html:options or html:select tag Hi, I have a weird problem here (as always :). I have the following code in my *.jsp file: form action=handleprojectaddrequest.do method=post Select request type html:select property=codtyp html:options name=projectaddrequestform collection=listTyp property=id labelProperty=name/ /html:select /form so, codtyp is a property of HandleProjectAddRequestAction projectaddrequestform is a session bean (it's actually loaded into the session, because I did the check before in the jsp page) listTyp is a collection (ArrayList) of beans (type is one of mine named ElementSimple) id and name are two properties of the class ElementSimple My session bean is well loaded. My ArrayList does contain values. So why do I have an error when I try to execute the preceding code ? Thanks for having read me so far :) Friendly Regards, Slimane FYI, here's the exception thrown: javax.servlet.ServletException: Cannot find bean under name org.apache.struts.taglib.html.BEAN at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:457) at org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.j ava:378) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:679) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:431) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:355) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:970) at org.apache.struts.action.RequestProcessor.processActionForward(RequestPr ocessor.java:404) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 269) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234 4) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja va:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 72) at org.apache.catalina.core.ContainerBase.invoke
RE: [Newbie] prob with html:options or html:select tag
Hi, thanks for your answer :) Unfortunately, it still doesn't work the way I want it to. However I do have a more explicit error-message (see below). So, when I do the following, it doesn't work: 1/ html:form action=handleprojectaddrequest.do method=post scope=session Sélectionnez le type de requête html:select property=codtyp html:options name=projectaddrequestform collection=listTyp property=id labelProperty=name/ /html:select /html:form But when I do the following (however, I'm aware it's not the Struts way), it suddenly works: 2/ html:form action=handleprojectaddrequest.do method=post scope=session Sélectionnez le type de requête html:select property=codtyp logic:iterate id=elt name=projectaddrequestform scope=session property=listTyp type=be.stluc.info.element.ElementSimple option value=bean:write name=elt property=id/bean:write name=elt property=name/ /logic:iterate /html:select /html:form What am I missing ? :( Friendly Regards, Slimane PS: here's the error-message throwed using the 1st piece of code: javax.servlet.ServletException: Cannot find bean under name listTyp at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457) at org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.java:631) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:970) at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:404) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
Any readonly property for The html:select tag
Hello, I'd Like to make my html :Select Readonly, Is there any property for it., If I use disabled=true I cant access the parameter of the Select tag thanks in advance. regards, Sudhir -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help using html:select tag
My guess is that you didn't provie the name attribute for you select tag. Which mean buy providing the property attribute a lone, the select tag will look for the been associated with the outer tag, which in this case is the form tag and you probably didn't have the outer tag(html:form tag) define. -Original Message- From: Andrew Luxner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 7:26 AM To: '[EMAIL PROTECTED]' Subject: Help using html:select tag Hello, I'm new to struts and trying to use the html:select tag. When I try to run this I get the following error: Cannot find bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:283) Is there anything obvious that stands out here? Thanks, Andrew
Most Urgent - html:select tag
Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep
RE: Most Urgent - html:select tag
Short answer: html:select property=designId html:options collection=designs property=id labelProperty=name/ /html:select Long answer can be found at http://jakarta.apache.org Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep
Re: Most Urgent - html:select tag
Hi Sandeep --Hope this helps html:select property=facCd html:options collection=FACILITY property=facCd labelProperty=facDes / /html:select From: s k m [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Date: 24 Aug 2001 19:09:43 - Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: RE: Most Urgent - html:select tag
Hi jay... Thank you for your urgent reply. i'm trying out , but confused. will u please, send one example? sandeep On Sat, 25 Aug 2001 Jay Patel wrote : Short answer: html:select property=designId html:options collection=designs property=id labelProperty=name/ /html:select Long answer can be found at http://jakarta.apache.org Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep
Re: Re: Most Urgent - html:select tag
Hi Supriya.. thank you.. will u please send me one example on it? how to iterate it? Sandeep On Sat, 25 Aug 2001 SUPRIYA MISRA wrote : Hi Sandeep --Hope this helps html:select property=facCd html:options collection=FACILITY property=facCd labelProperty=facDes / /html:select From: s k m [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Date: 24 Aug 2001 19:09:43 - Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep - _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: RE: Most Urgent - html:select tag
From the subscription.jsp of the struts-example: %-- In real life, these would be loaded from a database --% % java.util.ArrayList list = new java.util.ArrayList(); list.add(new org.apache.struts.webapp.example.LabelValueBean(IMAP Protocol, imap)); list.add(new org.apache.struts.webapp.example.LabelValueBean(POP3 Protocol, pop3)); pageContext.setAttribute(serverTypes, list); % html:select property=type html:options collection=serverTypes property=value labelProperty=label/ /html:select Iteration is done by the tag, so don't worry. Each element of the collection will be looked up, from each object in the collection, two properties will be looked up; namely value and label ( in above example ). You may have different properties that you may want to look-up. Previous example I sent you *was* a real code I am using. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:24 PM To: [EMAIL PROTECTED] Subject: Re: RE: Most Urgent - html:select tag Hi jay... Thank you for your urgent reply. i'm trying out , but confused. will u please, send one example? sandeep On Sat, 25 Aug 2001 Jay Patel wrote : Short answer: html:select property=designId html:options collection=designs property=id labelProperty=name/ /html:select Long answer can be found at http://jakarta.apache.org Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep
Re: RE: RE: Most Urgent - html:select tag
Hi Jay, this will add only text which will be displyed in drop down box. how do I set values for it? i ve hash table from which i want to keep keys as values and hashtable values as displyed text in drop down box. Sandeep On Sat, 25 Aug 2001 Jay Patel wrote : From the subscription.jsp of the struts-example: %-- In real life, these would be loaded from a database --% % java.util.ArrayList list = new java.util.ArrayList(); list.add(new org.apache.struts.webapp.example.LabelVal- ueBean(IMAP Protocol, imap)); list.add(new org.apache.struts.webapp.example.LabelVal- ueBean(POP3 Protocol, pop3)); pageContext.setAttribute(serverTypes, list); % html:select property=type html:options collection=serverTypes property=value labelProperty=label/ /html:select Iteration is done by the tag, so don't worry. Each element of the collection will be looked up, from each object in the collection, two properties will be looked up; namely value and label ( in above example ). You may have different properties that you may want to look-up. Previous example I sent you *was* a real code I am using. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:24 PM To: [EMAIL PROTECTED] Subject: Re: RE: Most Urgent - html:select tag Hi jay... Thank you for your urgent reply. i'm trying out , but confused. will u please, send one example? sandeep On Sat, 25 Aug 2001 Jay Patel wrote : Short answer: html:select property=designId html:options collection=designs property=id labelProperty=name/ /html:select Long answer can be found at http://jakarta.apache.org Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep
RE: RE: RE: Most Urgent - html:select tag
You are seeing that behavior is because Hashtable returns a Collection of Values when values() is invoked. It would be easier if you just had a bean that contained key and value information and have that bean in a Collection. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:41 PM To: [EMAIL PROTECTED] Subject: Re: RE: RE: Most Urgent - html:select tag Hi Jay, this will add only text which will be displyed in drop down box. how do I set values for it? i ve hash table from which i want to keep keys as values and hashtable values as displyed text in drop down box. Sandeep On Sat, 25 Aug 2001 Jay Patel wrote : From the subscription.jsp of the struts-example: %-- In real life, these would be loaded from a database --% % java.util.ArrayList list = new java.util.ArrayList(); list.add(new org.apache.struts.webapp.example.LabelVal- ueBean(IMAP Protocol, imap)); list.add(new org.apache.struts.webapp.example.LabelVal- ueBean(POP3 Protocol, pop3)); pageContext.setAttribute(serverTypes, list); % html:select property=type html:options collection=serverTypes property=value labelProperty=label/ /html:select Iteration is done by the tag, so don't worry. Each element of the collection will be looked up, from each object in the collection, two properties will be looked up; namely value and label ( in above example ). You may have different properties that you may want to look-up. Previous example I sent you *was* a real code I am using. Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:24 PM To: [EMAIL PROTECTED] Subject: Re: RE: Most Urgent - html:select tag Hi jay... Thank you for your urgent reply. i'm trying out , but confused. will u please, send one example? sandeep On Sat, 25 Aug 2001 Jay Patel wrote : Short answer: html:select property=designId html:options collection=designs property=id labelProperty=name/ /html:select Long answer can be found at http://jakarta.apache.org Jay Patel 972-701-9773 972-849-0373 Mobile [EMAIL PROTECTED] -Original Message- From: s k m [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 2:10 PM To: [EMAIL PROTECTED] Subject: Most Urgent - html:select tag Hi all... Please, inform me how to implement html:select tag? I'm stuck up there. Please, help. Sandeep
R:use JSP variable as a value of property in html:select ... tag
Title: R:use JSP variable as a value of property in html:select ... tag i think tha you should change .tld file adding the follow rtexprvaluetrue/rtexprvalue bye MaxL -- Da: someil[SMTP:[EMAIL PROTECTED]] Risposta a: [EMAIL PROTECTED] Inviato: mercoledì 30 maggio 2001 14.42 A: [EMAIL PROTECTED] Oggetto: use JSP variable as a value of property in html:select ... tag Hi, I would like use an expression such as : html:select property=%= var% size=1 but I can't do this. The error obtained is : Attribute value should be quoted So, I tried : html:select property=%= var% size=1 then it results a new error : Attribute % has no value that is the problem? How can I consider a JSP variable for an attribute value? Thanks for your response ... - Cyril -
RE: use JSP variable as a value of property in html:select... tag
Thanks for your help but I have found the solution. Variable var came from a bean and there was a problem in this bean constructor. So my variable didn't have value. - Cyril - -Message d'origine- De : Martin Cooper [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 31 mai 2001 06:21 À : [EMAIL PROTECTED] Objet : Re: use JSP variable as a value of property in html:select... tag I think you just need a space on each side of 'var'. Try this: html:select property=%= var % size=1 Hope this helps. -- Martin Cooper - Original Message - From: someil [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 30, 2001 5:42 AM Subject: use JSP variable as a value of property in html:select ... tag Hi, I would like use an expression such as : html:select property=%= var% size=1 but I can't do this. The error obtained is : Attribute value should be quoted So, I tried : html:select property=%= var% size=1 then it results a new error : Attribute % has no value that is the problem? How can I consider a JSP variable for an attribute value? Thanks for your response ... - Cyril -
use JSP variable as a value of property in html:select ... tag
Hi, I would like use an expression such as : html:select property=%= var% size=1 but I can't do this. The error obtained is : Attribute value should be quoted So, I tried : html:select property=%= var% size=1 then it results a new error : Attribute % has no value that is the problem? How can I consider a JSP variable for an attribute value? Thanks for your response ... - Cyril -
RE: use JSP variable as a value of property in html:select ... tag
any change with : html:select property='%= var%' size=1 there is still an error : Attribute % has no value - Cyril - -Message d'origine- De : Mikkel Bruun [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 30 mai 2001 14:58 À : '[EMAIL PROTECTED]' Objet : SV: use JSP variable as a value of property in html:select ... tag use single qoutes '' Mikkel -Oprindelig meddelelse- Fra: someil [mailto:[EMAIL PROTECTED]] Sendt: 30 May 2001 14:42 Til: [EMAIL PROTECTED] Emne: use JSP variable as a value of property in html:select ... tag Hi, I would like use an expression such as : html:select property=%= var% size=1 but I can't do this. The error obtained is : Attribute value should be quoted So, I tried : html:select property=%= var% size=1 then it results a new error : Attribute % has no value that is the problem? How can I consider a JSP variable for an attribute value? Thanks for your response ... - Cyril -
Re: use JSP variable as a value of property in html:select... tag
I think you just need a space on each side of 'var'. Try this: html:select property=%= var % size=1 Hope this helps. -- Martin Cooper - Original Message - From: someil [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 30, 2001 5:42 AM Subject: use JSP variable as a value of property in html:select ... tag Hi, I would like use an expression such as : html:select property=%= var% size=1 but I can't do this. The error obtained is : Attribute value should be quoted So, I tried : html:select property=%= var% size=1 then it results a new error : Attribute % has no value that is the problem? How can I consider a JSP variable for an attribute value? Thanks for your response ... - Cyril -