You have to set the properties of the formbean to the appropriate value during your action. Then in the JSP the corresponding option will be selected. This means the JSP should be accessed first by an action, not by a direct call to the JSP. Set up an action mapping for it. There is of course a quick and dirty work-around - you could just set the value of the property in the formbean with code in the declaration or the reset(). [ November 27, 2002: Message edited by: Adam Hardy ]
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Joined: Nov 04, 2000
Hi Adam The JSP is being accessed by a action and not being invoked directly. The properties in the form bean match the form field attribute name in JSP. I have been succesful in making one drop down value preselected using this solution. I am just wondering where I am going wrong ? Thanks Ravindra
Joined: Oct 09, 2001
Well, how are you initialising the formbean properties? This should be done in the formbean reset() method or alternatively on declaration of the property member variables, if they're fixed.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com