That will teach me to trust the specs without actually testing something before 
replying to a question!  (oops)

-----Original Message-----
From: Tim Davidson [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 12:04 PM
To: [EMAIL PROTECTED]
Subject: Re: JSP:Setproperty and empty strings


yeah, the spec is unclear on this point. I have tried this and it doesnt have the 
desired behaviour:
<jsp:SetProperty name="RequestParmBean" property="inputfieldA" value=""/>
This will not set inputfieldA to an empty string. 
Does anyone know why they implemented it in this way?

-----Original Message-----
From: Zerbe John W [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 4:48 PM
To: [EMAIL PROTECTED]
Subject: Re: JSP:Setproperty and empty strings


If I am reading the spec correctly, you can initialize all of your properties 
individually prior to setting them from the request params. I believe that the line 
you quoted from the spec only applies when setting properties from request params.

eg:
<jsp:SetProperty name="RequestParmBean" property="inputfieldA" value=""/>
<jsp:SetProperty name="RequestParmBean" property="inputfieldA" param="inputfieldA"/>

or, assuming an input form the "inputfieldA" and "inputfieldB":
<jsp:SetProperty name="RequestParmBean" property="inputfieldA" value=""/>
<jsp:SetProperty name="RequestParmBean" property="inputfieldB" value=""/>
<jsp:SetProperty name="RequestParmBean" property="*"/>


-----Original Message-----
From: Tim Davidson [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 9:30 AM
To: [EMAIL PROTECTED]
Subject: JSP:Setproperty and empty strings


Hi

 Using <jsp:setProperty...> is is possbible to set empty strings? and if so how?

 I realise the spec says:
  "If the parameter has an empty or null value, the corresponding Bean property is not 
set. "

  but can anyone reccommend a fix?

thanks in advance.

=========================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com


DISCLAIMER:
The information contained in this e-mail may be confidential and is intended solely 
for the use of the named addressee. Access, copying or re-use of the e-mail or any 
information contained therein by any other person is not authorized. If you are not 
the intended recipient please notify us immediately by returning the e-mail to the 
originator.


DISCLAIMER:
The information contained in this e-mail may be confidential and is intended solely 
for the use of the named addressee. Access, copying or re-use of the e-mail or any 
information contained therein by any other person is not authorized. If you are not 
the intended recipient please notify us immediately by returning the e-mail to the 
originator.

=========================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

=========================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com


DISCLAIMER:
The information contained in this e-mail may be confidential and is intended solely 
for the use of the named addressee. Access, copying or re-use of the e-mail or any 
information contained therein by any other person is not authorized. If you are not 
the intended recipient please notify us immediately by returning the e-mail to the 
originator.

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to