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

html:select error occuring

 
John Mazz
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts version 1.1

What I am trying to do :
I have an input page that has required fields and some dropdown boxes that users uses as a pick list. When the struts validator detects that required fields are missing, send the user back to the page he/she just came from and notify them what the need to correct.

Problem I am encountering:
When the validator detects a missing a required field is missing, the following error is thrown on my input page

[ServletException in:/pages/admin/displayUserProfileForm.jsp] Define tag cannot set a null value'


Here is my formbean:





Here is my JSP where the error is occuring:






Here is my STRUTS CONFIG

 
David Ulicny
Ranch Hand
Posts: 724
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks as you trying to set some value to property but without value
<bean efine id="usrsttslist" name="UserProfileForm"
property="authUsrSttsDisplayValues"
value="something"/>
 
John Mazz
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David for your reply!

Here is what Im trying to do...and what my debuger says is going on...(PS Im a newbie so Im guessing that this is a tag/implementaion problem

The define tag is getting a List of values that I want to display and storing them in page scope as "usrsttslist"

My option tag then iterates though this list creating my html output with those values.

when my page is first rendered these values are in my UserProfileForm bean, but when I submit the form to perform an Update (Or when the validator sends the bean back to my JSP), my form bean arives to my action with authUsrSttsDisplayValues = null.

My take on this is that Struts doent know how to put those html option values back in the bean. for that matter I dont know either







here is what my debugger is telling me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic