Re: BeanUtils, Form Bean and POJO Bean

2006-06-17 Thread Paul Benedict
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

Re: BeanUtils, Form Bean and POJO Bean

2006-06-17 Thread Scott Van Wart
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

BeanUtils, Form Bean and POJO Bean

2006-06-17 Thread Caroline Jen
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 "

Re: [shale] Design question involving ViewController

2006-06-17 Thread Gary VanMatre
>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

Re: JSP does not display error message from validate()

2006-06-17 Thread Scott Van Wart
[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

Re: passing parameters to tiles include files

2006-06-17 Thread Scott Van Wart
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:

Re: passing parameters to tiles include files

2006-06-17 Thread Paul Benedict
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.

Re: passing parameters to tiles include files

2006-06-17 Thread Don Vawter
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

Re: passing parameters to tiles include files

2006-06-17 Thread Paul Benedict
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

passing parameters to tiles include files

2006-06-17 Thread Don Vawter
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

[shale] Design question involving ViewController

2006-06-17 Thread Sean Schofield
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

Help with Excel in new IE popup window - problem when it remains open

2006-06-17 Thread Rick Reumann
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

Help:Validation.xml

2006-06-17 Thread raj raj
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:

Re: JSP does not display error message from validate()

2006-06-17 Thread thamizh arasu
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

JSP does not display error message from validate()

2006-06-17 Thread pankaj . gupta
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