RE: Null value

2003-06-10 Thread Jason Meredith

Kandi

Excellent, thank you very much.

Regards

Jason Meredith



|+-->
||  "Kandi Potter"  |
||  <[EMAIL PROTECTED]|
||  GSC.GC.CA>  |
||  |
||  10/06/2003 16:51|
||  Please respond  |
||  to "Struts Users|
||  Mailing List"   |
||  |
|+-->
  
>---|
  |
   |
  |  To: "Struts Users Mailing List" <[EMAIL PROTECTED]>   
  |
  |  cc:   
       |
  |  Subject: RE: Null value   
   |
  
>---|




put these 2 lines in your properties file:
errors.header =
errors.footer =

-Original Message-
From: Jason Meredith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:44 AM
To: Struts Users Mailing List
Subject: Null value



Chaps

In my form actions I validate a number of fields, when an error message is
returned the words "null" appear along side the error message i.e

Null "Please enter your name" Null

Regards

Jason Meredith




***
The e-mail and any attachments are confidential. They may contain
privileged information and are intended for the named addressee(s)
only. If you are not the intended recipient, please notify us
immediately and do not disclose, distribute, or retain this e-mail
or any part of it.

Unless expressly stated, opinions in this e-mail are those of the
individual sender and not of the FIMAT Group. We believe but do not
warrant that this e-mail and any attachments are virus free.
You must therefore take full responsibility for virus checking.
The FIMAT Group reserve the right to monitor e-mail communications
through its networks.

Where this communication constitutes a financial promotion it is issued
and approved by Fimat International Banque S.A. (UK Branch) and is
only intended for persons of a kind described in article 19(5) of the
Financial Services and Markets Act 2000 (Financial Promotion) Order
2001.  This information is not intended to be distributed to UK "Private
Customers" (as defined by the Financial Services Authority).

Fimat International Banque S.A. (UK Branch) whose registered branch
in England is at SG House, 41 Tower Hill, London EC3N 4SG is authorised
by the Commission Bancaire in France and by the UK Financial Services
Authority; regulated by the Financial Services Authority for the conduct of
UK Business and is entered in the Financial Services Authority's register
(Register Number 183415), access to which can be gained via the following
link: www.fsa.gov.uk/register/

Member and a SETS Participant of the London Stock Exchange ("LSE").
Where this communication is confirming an "on exchange" transaction
(as defined by the LSE),the transaction is subject to the rules of the LSE.
Any information, opinions, estimates and forecasts contained in this
document have been arrived at or obtained from public sources believed
to be reliable and in good faith which has not been independently
verified and no warranty, express or implied, is made as to their accuracy,
completeness or correctness.

This document is not an offer to sell or a solicitation to acquire or
dispose
of an interest in financial instruments.

If you have received this transmission in error, please telephone
+44 020 7676 8999 immediately so that we can arrange for its return.
***


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







***
The e-mail and any attachments are confidential. They may contain
privileged information and are intended for the named addressee(s)
only. If you are not the intended recipient, please notify us
immediately and do not disclose, distribute, or retain this e-mail
or any part of it.

Unless expressly stated, opinions in this e-mail are those of the
individual sender and no

RE: Null value

2003-06-10 Thread Kandi Potter
put these 2 lines in your properties file:
errors.header =
errors.footer =

-Original Message-
From: Jason Meredith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 11:44 AM
To: Struts Users Mailing List
Subject: Null value



Chaps

In my form actions I validate a number of fields, when an error message is
returned the words "null" appear along side the error message i.e

Null "Please enter your name" Null

Regards

Jason Meredith




***
The e-mail and any attachments are confidential. They may contain
privileged information and are intended for the named addressee(s)
only. If you are not the intended recipient, please notify us
immediately and do not disclose, distribute, or retain this e-mail
or any part of it.

Unless expressly stated, opinions in this e-mail are those of the
individual sender and not of the FIMAT Group. We believe but do not
warrant that this e-mail and any attachments are virus free. 
You must therefore take full responsibility for virus checking. 
The FIMAT Group reserve the right to monitor e-mail communications
through its networks. 

Where this communication constitutes a financial promotion it is issued
and approved by Fimat International Banque S.A. (UK Branch) and is 
only intended for persons of a kind described in article 19(5) of the
Financial Services and Markets Act 2000 (Financial Promotion) Order
2001.  This information is not intended to be distributed to UK "Private
Customers" (as defined by the Financial Services Authority).

Fimat International Banque S.A. (UK Branch) whose registered branch
in England is at SG House, 41 Tower Hill, London EC3N 4SG is authorised
by the Commission Bancaire in France and by the UK Financial Services
Authority; regulated by the Financial Services Authority for the conduct of
UK Business and is entered in the Financial Services Authority's register
(Register Number 183415), access to which can be gained via the following
link: www.fsa.gov.uk/register/

Member and a SETS Participant of the London Stock Exchange ("LSE").
Where this communication is confirming an "on exchange" transaction
(as defined by the LSE),the transaction is subject to the rules of the LSE.
Any information, opinions, estimates and forecasts contained in this 
document have been arrived at or obtained from public sources believed
to be reliable and in good faith which has not been independently 
verified and no warranty, express or implied, is made as to their accuracy,
completeness or correctness.  

This document is not an offer to sell or a solicitation to acquire or dispose
of an interest in financial instruments. 

If you have received this transmission in error, please telephone
+44 020 7676 8999 immediately so that we can arrange for its return.
***


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: null value for a nested property

2002-03-07 Thread Robert Nocera

David,

I find it's best to use a form bean that is different from your data
object, so that your get methods on your form object can return an empty
string if null instead of actually returning a null value.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: David Boardman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 12:49 PM
To: Struts Users Mailing List
Subject: null value for a nested property

I currently am using an  tag on a form to display the name of
a
state.  The tags looks like:




The problem is that ocassionally the state field on the address bean is
null.  When this occurs the PropertyUtils.getNestedProperty() method
throws
an IllegalArgumentException which causes my jsp to break.  To circumvent
this problem I have written my own tag that extends BaseFieldTag and
overrides the doStartTag() method.  I basically perform the same
functions
as the BaseFieldTag.doStartTag() method, except that instead of the
following call:

Object value = RequestUtils.lookup(pageContext, name, property,
null);

to get the value I catch the IllegalArgumentException and set the return
value to an empty string:

  try{
valueObject = RequestUtils.lookup(pageContext, name,
property, null);
}catch(IllegalArgumentException e){
//This exception indicates that one of the nested properties
returned null
//we want to set the value to null and not throw the
exception
out
//to the jsp
valueObject = "";
}

I am wondering if there is a better way of dealing with this problem.  I
don't like the solution I am using, but I can't think of anything else.
How
about adding an attribute to the form tags that specify how null
property
values should be handled?

Thanks for your help,

Dave


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: