Lukasz-
relvant doc located at
http://www.docjar.com/docs/api/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.html
what is the value of property named ReflectionContextState#CREATE_NULL_OBJECTS
?
so coding the constructor fixes the problem in which case your Null object is a 
simple bean as suggested here
If the null property is a simple bean with a no-arg constructor, it will simply 
be created using the ObjectFactory#buildBean(java.lang.Class, java.util.Map)  
method.?
dziekuje
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Thu, 14 Aug 2008 14:19:59 +0200
> From: [EMAIL PROTECTED]
> To: user@struts.apache.org
> Subject: Re: Hibernate UserType and OGNL
> 
> > ( also tried: <s:textfield> key="bid.amount.amount" /> )
> 
> This is correct
> 
> > public Monetary getAmount() { return amount; }
> >
> > and Monetary beeing:
> > public class Monetary implements Serializable{
> >   private final BigDecimal amount;
> >   private final Currency currency;
> >
> >   public Monetary(BigDecimal amount, Currency currency) {
> >       this.amount = amount;
> >       this.currency = currency;
> >   }
> >
> >   public BigDecimal getAmount() { return amount; }
> >   public Currency getCurrency() { return currency; }
> >
> > I am getting either a field error or with "bid.amount.amount" :
> > ERROR [btpool0-2] InstantiatingNullHandler.nullPropertyValue(110) | Could
> > not create and/or set value back on to object
> > java.lang.InstantiationException: com.app.model.Monetary
> 
> Add default constructor to Monetary and will be ok
> 
> 
> Regards
> -- 
> Lukasz
> http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_________________________________________________________________
Get Windows Live and get whatever you need, wherever you are.  Start here.
http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008

Reply via email to