Re: Struts2 crud application gone wrong

2009-04-21 Thread Burton Rhodes
Can't you just add a parameter to the redirect action in you xml file? That way you can 'pass' the sampleString to the redirect action and can display it upon rendering the jsp. On 4/20/09, Bhaarat Sharma wrote: > yeah it is a redirectAction :( so now i know why the value for the string is > not

Re: Struts2 crud application gone wrong

2009-04-20 Thread Bhaarat Sharma
yeah it is a redirectAction :( so now i know why the value for the string is not there. Any workarounds to this issue? One I thought of is to set an attribute and retrieve it in the jsp page? Thanks On Mon, Apr 20, 2009 at 3:57 PM, Dave Newton wrote: > If it's a "redirectAction" then the acti

Re: Struts2 crud application gone wrong

2009-04-20 Thread Dave Newton
If it's a "redirectAction" then the action will be re-instantiated. Dave Bhaarat Sharma wrote: sorry about the typo. as i was trying to give an example and not just copy paste the code I made a mistake. This is what I have in my jsp page. I have verified whether it is because of a typograph

Re: Struts2 crud application gone wrong

2009-04-20 Thread Bhaarat Sharma
I just debugged the code and it seems like the doSave method is called when 'Submit' is hit on the edit page. However, since the doSave is returning Success and based on struts.xml it will redirect to action index then the prepare method for EmployeeAction class is called again and at this time sa

Re: Struts2 crud application gone wrong

2009-04-20 Thread Bhaarat Sharma
sorry about the typo. as i was trying to give an example and not just copy paste the code I made a mistake. This is what I have in my jsp page. I have verified whether it is because of a typographical error but it is not. And since you are saying it cant be because I am just calling a particula

Re: Struts2 crud application gone wrong

2009-04-20 Thread Dave Newton
Bhaarat Sharma wrote: What I wanted to do was that when user edits something and comes back to the listing page, they see a message on top saying id XXX has been modified. However, I think this is not possible because a method name is mentioned in struts.xml. Is that correct? No. to try it o

Struts2 crud application gone wrong

2009-04-20 Thread Bhaarat Sharma
hi guys, i was using the example crud application ( http://struts.apache.org/2.0.14/docs/crud-demo-i.html) as the skeleton for a CRUD like module in my site. But I've ran into a dead end. in this sample applications the package is like this: /WEB-IN