s1: html:select.../ and its selected option's label

2010-02-19 Thread farmer2008
Hi, The selected option's value can be retrieved via the property attribute in html:select tag . Is there a way to retrieve the selected option's label via html:select tag or html:optionsCollection tag? Thanks. -- View this message in context:

s1: java.lang.NoClassDefFoundError MessageResources

2009-01-21 Thread farmer2008
Hi, I have a Java class as a model which has a method taking a MessageResources as a parameter and returning a String loaded from a properties file using the MessageResources. The model is created in Action.execute(). The project can be compiled but when running it, we get

Struts 1: how to use different parameter names from html field names

2008-12-21 Thread farmer2008
Hi, My html form uses get method to send data to server to do a search. html:form action=/searchresult.do method=get City: html:text property=city/br/br/ ... html:submit value=Search/ /html:form So in the result page, the url will be .../searchresult.do?city= Since

Re: Struts 1: how to use different parameter names from html field names

2008-12-21 Thread farmer2008
Thanks Dave for your quick response. It's worth an effort as a web page quite possibly won't work properly if its query string is longer than 255 characters. JavaScript can achieve it but it's not a good choice because clients may diable it. Struts 1 render name attribute of text field from

Re: Struts 1: how to use different parameter names from html field names

2008-12-21 Thread farmer2008
Thanks Dave. I'll take your suggestions and re-consider how to do it. newton.dave wrote: It's worth an effort as a web page quite possibly won't work properly if its query string is longer than 255 characters. It's not that I don't understand the problem, I just don't see it being much

S1: interceptor plugin

2008-12-11 Thread farmer2008
Hi, http://struts.sourceforge.net/saif/index.html SAIF says it only supports struts 1.1 but in its requirements section it says it requires struts 1.1 or greater. I tried using it in struts 1.3.5 but failed. Has anyone use the plugin in struts 1.3.5? I'm using struts 1.3.5. Is there any other

Re: s1: get Class object

2008-11-19 Thread farmer2008
? Thanks. Mead Lai wrote: Do you create an object In the struts Action? or others, i.e formBean? On Wed, Nov 19, 2008 at 1:16 AM, farmer2008 [EMAIL PROTECTED] wrote: In my project with struts 1.3.5, Class object can only be created via anInstance.getClass(). If I use Class.forName

s1: get Class object

2008-11-18 Thread farmer2008
In my project with struts 1.3.5, Class object can only be created via anInstance.getClass(). If I use Class.forName(...) or .class, I get java.lang.NoClassDefFoundError: class name. Is it a struts issue? Is there a way we still can use .class syntax to get a Class object? Thanks. -- View this

struts 1: access locale in view

2008-11-15 Thread farmer2008
Struts 1.3.5 stores Locale under Globals.LOCALE_KEY in session scope. Since the key contains dot ., it's not working using ${sessionScope.Globals.LOCALE_KEY}. If we want to access current Locale in view, what way should we take except using %= session.getAttribute(...)%? Thanks. -- View this

struts 1.3.5: hwo to let user input before the validation

2008-11-12 Thread farmer2008
Hi all, I'm learning validator framework in struts 1.3.5. My first page contains a required field and now I'm facing a problem. Before the page is rendered, it fails to pass the validation so it always displays an error message. How to tell struts 1 to give user a chance to input data before