aspose file tools*
The moose likes Struts and the fly likes html:select error occuring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:select error occuring" Watch "html:select error occuring" New topic
Author

html:select error occuring

John Mazz
Greenhorn

Joined: Oct 05, 2005
Posts: 3
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

Joined: Aug 04, 2004
Posts: 724
It looks as you trying to set some value to property but without value
<bean efine id="usrsttslist" name="UserProfileForm"
property="authUsrSttsDisplayValues"
value="something"/>


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
John Mazz
Greenhorn

Joined: Oct 05, 2005
Posts: 3
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
 
 
subject: html:select error occuring