Hi,
We have a web application which is built over java 1.5,tomcat 5.5 and
struts 1.2 and MySQl.
Recently we have added a class, which does some formatting to all the
string object in Action Form beans.
What i would like to do is, when ever there is request submitted by the
user to the
Hi Amol,
maybe You can use Filter? It's not exactly what You want, no form i.e.
but maybe it will do.
You can define one in web.xml like
web-app
!-- Filter parameters using unicode --
filter
filter-nameCharacter Encoding UTF-8/filter-name
Amol Londhe wrote:
What i would like to do is, when ever there is request submitted by the
user to the webapplication, i would like to pass the ActionForm object
to this class method, do the formatting of the String objects and
then pass this Action form to the actual action in my webapp.
I have been hours at this, going crazy. I am setting up Dynamicly sized form.
struts-config.xml
-
form-bean name=dynamicHashmapForm
type=org.apache.struts.validator.DynaValidatorForm
form-property name=fields type=java.util.HashMap /
/form-bean
Ok, this is embarrassing, of course HashMap doesnt guarantee the
order, TreeMap did the trick, sorry :)
Oleg
On 10/14/05, Oleg [EMAIL PROTECTED] wrote:
I have been hours at this, going crazy. I am setting up Dynamicly sized form.
struts-config.xml
-
From: Oleg [EMAIL PROTECTED]
I have been hours at this, going crazy. I am setting up Dynamicly sized
form.
form-bean name=dynamicHashmapForm
type=org.apache.struts.validator.DynaValidatorForm
form-property name=fields type=java.util.HashMap /
/form-bean
FYI, as of JDK 1.4.2 (maybe before, but at least that version at the
latest) you have LinkedHashMap and LinkedHashSet as well. LinkedHashMap
would fit the bill as well I think, without having to create a
dependency on Commons Collections.
Frank
Wendy Smoak wrote:
From: Oleg [EMAIL
I am setting up Dynamically sized form with scope=request so my
bean consists of 2 TreeMaps, one to display (fields objects: name,
type,...) and one to receive values from the form(values Strings). The
problem is that when form submitted I can only get one value as a
String and not String[] if
Please, Help I'm stuck since two days ago with this.
It's the exception, when I try to open a jsp from de browser:
The exception:
--
(util.RequestUtils
The NPE is thrown on this line:
obj = formBeanClass().newInstance();
in the FormBeanConfig -- this indicates that the class you specified by
the type attribute cannot be found -- check for typos and how you are
building your deployment as well.
-Bill Siggelkow
Matias Surdi wrote:
Does anyone know how to do this or why it does not work?
Both these methods would be called from an action class.
Function void useMyForm(ActionForm form){
SomeFormClass myForm = new SomeFormClass();
myForm.setName(Blah);
myForm.setAge(289);
etc...
form = myForm;
}
When I get to the jsp
Try the Bean.populate() method. This will make copying from different beans
much easier.
-Original Message-
From: Lucero, Dennis M [mailto:[EMAIL PROTECTED]
Sent: Friday, August 20, 2004 5:53 PM
To: [EMAIL PROTECTED]
Subject: form problem
Does anyone know how to do this or why it does
- you need to
store it the same way.
http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/action/
Niall
- Original Message -
From: Lucero, Dennis M [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 21, 2004 1:52 AM
Subject: form problem
Does
To: Struts Users Mailing List
Subject: Re: form problem
Struts creates and stores the ActionForm in request or session scope. If
you
create a new form to replace the one automatically created by Struts,
you
also need to store it under the appropriate key in either the session
or
request.
Look
14 matches
Mail list logo