Hello, I am trying to use the Preparable but having some problems while the page is being rendered. I will try my best to explain the problem, please ask if you need more information as i might not be able to accurately explain the problem as i am pretty new to struts2.
Scenario: User should be able to create the EmailDistributionList and create email Addresses under it. My first attempt is to be able to create the Group Itself . So i introduced an action which implements Preparable interface. The Action provides 1.) List of currently avaialable groups- displayed as dropdown on the screen. 2.) has a group id based on which it tries to decide whether to load data from the databse or not. e.g. if the user lands for the first time on the page there would be no id in the rquest hence the id would not have any data in it. it is similar to the CRUD example on struts website. Creation and saving of the group went ok, the problem occured when i load the data from the databse and try to display it on the screen. i have defined just one action in struts.xml to accomplish this. when the user arrives for the first time through the menu item which is of course a get request , the user is provided with list of available groups and a blank description field (since it does not have any id in the request). When the user changes selection in the drop down i do a post to the same action which binds the id to group id field in the action. It works ok as far as it has the id in the request and loads the data from the databse and stuff. but as soon as it reaches the screen and when it tries to extract data out of the domain it wipes out the fields from the group domain, e.g. If the Group had id name and description, and i try to display the description on the page like <s:textarea name="group.description"/> the page shows nothing in it even though the id was passed to the action and logger statements show that the group has the description on the server side. I used <s:debug/> tag to see more information but even in that information it shows that the description is blank. I am trying to solve this problem for a long time but have been unsuccessful in resolving it, your help would be greatly appreciated. Thanks Manish. -- View this message in context: http://www.nabble.com/Preparable-Question-tp16559041p16559041.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]