Jen, it is standard practice for an ActionForm to contain only string
properties. The reason is if validation fails, you want to return the text
as-is as it was inputted. Once you have successfuly validated the ActionForm,
then copy your form properties into your model object.
Caroline Jen <[EM
Caroline Jen wrote:
The Java "types" of the properties in my form bean
sometimes are not the same as those of the data fields
in my database.
The request.getParameter(); always return a String. I
can use the copyProperties() method of the BeanUtils
to convert all the String(s) read from the web
The Java "types" of the properties in my form bean
sometimes are not the same as those of the data fields
in my database.
The request.getParameter(); always return a String. I
can use the copyProperties() method of the BeanUtils
to convert all the String(s) read from the web page to
proper Java "
>From: "Sean Schofield" <[EMAIL PROTECTED]>
>
> I am writing an application that is using MyFaces tree2 to allow the
> user to navigate to a more detailed view of the item they click on. I
> just wanted some feedback on the following strategy:
>
> The node in the tree has an action method that
[EMAIL PROTECTED] wrote:
I am trying to display error message in JSp page using the following:
The code in my validate method is:
errors.add("invalidDate", new ActionMessage( endDate + " must be greater
than " + startDate ));
return errors;
Any clue whats wrong?
Couple things:
1) Try usin
Don Vawter wrote:
I am setting the attribute in the Action class
Check to make sure you don't have redirect="true" set for the action
mapping. Otherwise, everything request-related is lost.
- Scott
-
To unsubscribe, e-mail:
Don, see my last sentence: request attributes disappear after one request. You
will have to set it on every request if you need it. Or, set it in the session.
-
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
I am setting the attribute in the Action class
On Jun 17, 2006, at 6:10 PM, Paul Benedict wrote:
Don,
Request parameters and request attributes are not the same thing.
Parameters come from the user's HTTP request, attributes come from
the server's internal context handling. Think of the la
Don,
Request parameters and request attributes are not the same thing. Parameters
come from the user's HTTP request, attributes come from the server's internal
context handling. Think of the latter as extra information that pertains to
processing the request.
Also, request-scope values disappe
I have been trying to use a request parameter in an included tiles
file (navigation.jsp)
String foo = (String) request.getAttribute("menu_item");
this sets the value correctly the first time the page is hit but
subsequent calls do not use the new value of the variable.
What am I doing wrong
I am writing an application that is using MyFaces tree2 to allow the
user to navigate to a more detailed view of the item they click on. I
just wanted some feedback on the following strategy:
The node in the tree has an action method that puts the selected
node's id into the request as a paramet
This is driving me crazy. On a form I have another button(other than
the main submit) that is supposed to open a popup window which will
display an Excel doc. I have some javascript which I'll show that
changes the form's target for the popup. The Action dispatch method
called returns excel (using
Hi All,
I 'm newbie to struts.i'm using* validation.xml* to validate the
form fields and displaying the validation errors using . this
is fine for displaying all the errors in the same location. but i want to
display the corresponding messages near to the each text box.
Example:
Hi,
To display the error message in ur jsp you have to do 2 things.
1. you are getting the errror message with the property key. so that you have
to have a form field with the specified property id name
2. This is by default usage. you have to give the properties key id at the time
of creating
I am trying to display error message in JSp page using the following:
The code in my validate method is:
errors.add("invalidDate", new ActionMessage( endDate + " must be greater
than " + startDate ));
return errors;
Any clue whats wrong?
regards,
Pankaj
15 matches
Mail list logo