null in headless client

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

null in headless client

Postby Harjo » Mon Feb 20, 2006 1:25 pm

I am using this in a jsp-page

Code: Select all
<td>unitprice</td><td><input type="text" name="unitprice" value="<%=servoy_hc.getDataProviderValue(null,"unitprice")%>"></td>


when the unitprice is not filled in yet, I get an annoying: null
in this field.

How can I prevent this? I want that the fields become empty, instead of showing: null
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby IT2Be » Mon Feb 20, 2006 1:44 pm

Unlike with javascript you really have to check for a null value
Code: Select all
value != null
. By capturing the null value you can set the value/field to what you want...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby Harjo » Mon Feb 20, 2006 2:19 pm

Can you give me an complete example how to to this in jsp?
I can't get it to work!
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 6 guests