aspose file tools*
The moose likes Struts and the fly likes jsp taglib prepopulation, repopulation on error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "jsp taglib prepopulation, repopulation on error" Watch "jsp taglib prepopulation, repopulation on error" New topic
Author

jsp taglib prepopulation, repopulation on error

B Webb
Greenhorn

Joined: Sep 30, 2006
Posts: 7
I have a jsp that is used by more than one page definition, which dynamically populates the action for the html:form tag. This way, I can reuse the jsp based on the tile definition for a specific page.

Prepopulating the jsp is easy by creating a form object an prepopulating it, however, if an actionerror is returned from the form class, I dont want to repopulate with initial values, but the values that were entered incorrectly, similar to what would happen if I never prepopulated the form to begin with. The error messages would be displayed along with the incorrect entries. So, I though perhaps I could read and see if an actionerror is null or not, and prepopulate based on its contents, but seems like even if I set in the form bean and read in jsp, the actionerror object always seems to be null. I understand that this is caused by the controller. Is this the case, and is there anything else that could help in indicating to the jsp that this is a prepopulate vs a repopulate, vs. a just give control back to the jsp, using prepopulation on initial jsp visit. Also, setting in the action class of the forwarding jsp is not an option for me, must take place in the jsp or form class of the jsp. Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

Since this appears to be Struts-specific, it has been moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
B Webb
Greenhorn

Joined: Sep 30, 2006
Posts: 7
Thanks for the move...and looks like <logic:messagesPresent> is going to do it....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp taglib prepopulation, repopulation on error
 
Similar Threads
Prepopulating a form
Prepopulating a jsp
Prepopulating a jsp
Prepopulating a DynaActionForm
Prepopulating Radio buttons in JSP