OK, business case is the registration of employees' vacations by other colleagues. Of course these may not know all data like organisational units, employeeId and so on. So there is a main JSP offering edit fields for all of this, and two buttons, one to send the complete vacation data (submit) and one to search by partialy entered data for matching colleagues. And returning to the prefilled edit JSP after selectig one search result.
Therefor at two points of my app I use dynamic parameters with html:links.
The list of persons (the search result) is displayed using this:
This works fine and in the PreFillAction I fetch the employee data with the help of the ID and prefill all edit fields ...
Now I wanted to build soemthing similar for the two needed buttons on the EditJSP. One 'fixed' link for the submit and one dynamic with the familyname as param for the SearchAction.
This is basicly like the above:
JSP looks fine and all, but for some totaly not understandable reason the param doesn't reach the Action, it is allways NULL.
I tried retrival from the struts form, from sesssion Param or as simple request param, nothing worked...
[ December 02, 2007: Message edited by: Oliver Thoms ] [ December 03, 2007: Message edited by: Oliver Thoms ]
I am not sure. When you run the app does the link look correct? Like: "http:/<server>/<app>/vacation/search.do?familyname=smith"?
If so then I would look closer at (or post here) the action mapping, the form and the action class.
BTW, it seems like you could get rid of the bean:define tag if you used the paramId attribute of the html:link tag. You could also get rid of your scriptlet in the img tag if you used the html:img tag with the page attribute.
Joined: Nov 21, 2006
Struts config snipplet
The link looks fine on the JSP, but (thanks for the hint) it allready has an empty aram. So my guess: Since the familyname just got entered it is not yet stored in the bean. The form will just be processed when the request is posted. Could it be, that the bean is not yet populated?!
Still tinkering around....
[ December 03, 2007: Message edited by: Oliver Thoms ] [ December 03, 2007: Message edited by: Oliver Thoms ]
Joined: Feb 08, 2006
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
subject: html:link with bean:define param, value gone in action ?!