File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp taglib prepopulation, repopulation on error

 
B Webb
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this appears to be Struts-specific, it has been moved to the Struts forum.
 
B Webb
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic