Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a null problem with a bean:define

Status
Not open for further replies.

grahamcoleman23

Programmer
May 25, 2004
1
GB
Ok I'm a bit of a beginner at this. I'm trying to use a bean:define something like this:-
<bean:define id="currentCost" property="currentcost" name="slForm" type="java.lang.Double"/>

I'm getting a "Define tag cannot set a null value' " error in the browser. I realise this is as the define needs to be wrapped in a logic tag, but I'm having problems getting this to work.

I've tried this :-

<logic:present name="slForm">
<bean:define id="currentCost" property="currentcost" name="slForm" type="java.lang.Double"/>
</logic:present>

still no joy, any ideas!
 
The problem looks like its currentcost thats bombing you, not slForm.

You probably need to check to make sure current cost is valid, something like

Code:
<logic:notMatch name="slForm" property="currentcost" value=null>
..define here..
</logic:notMatch>

I did not try that but something like that should work, test the property, not just the name.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top