Re: ParameterInterceptor problem

2009-07-16 Thread Say Jon
Thanks Robert for your inputs. Well I'm sure that Struts does initialize all null objects along the object chain if they are null, because for 90% of the time, this works. I do not explicitly initialize objects along the object chain in my code. For most of the time, Struts detects that it is null

Re: ParameterInterceptor problem

2009-07-16 Thread Robert Graf-Waczenski
Say Jon schrieb: public void prepare() throws Exception { super.prepare(); BaseEntity model = null; if (getId() != null) { model = (BaseEntity) session.get(getEmbeddedModelKey() + getId()); if (model == null) model = service.retrieve(modelClass, getId()); } if (model == null && !(this inst

Re: ParameterInterceptor problem

2009-07-16 Thread Say Jon
Hi Robert, Thanks for the reply. I'm heartened that Struts 2 have a live community that can help with issues. Firstly, yes you are right that I'm using a ModelDriven. I have a super class ModelDrivenAction which my other action classes extend from. public void prepare() throws Exception { super.

Re: ParameterInterceptor problem

2009-07-15 Thread Robert Graf-Waczenski
Even though you are pretty vague in what you write below, i have a few pointers for you: 1) Check (and tell us) if you designed your action implements the ModelDriven interface (guessed from you talking about getModel() below) 2) Maybe your getModel() returns an improperly initialized instance

Re: ParameterInterceptor

2007-09-20 Thread cilquirm
I'm not sure I follow this 100%. Are you saying that a single null propery being passed into the setter of your model caused a whole new model object to be created? So you have : firstName, lastName, and address1 address1 was read-only ( disabled or whatever you want to call it ). your actio

Re: ParameterInterceptor

2007-09-20 Thread Adam Hardy
[EMAIL PROTECTED] on 20/09/07 12:55, wrote: I had a strange experience last night! My web page parms were being set onto my action's model until a null property was encountered. It seems one of the web page fields was set to readonly and was not passed as a request parm. The null property resu

Re: ParameterInterceptor

2007-06-12 Thread stanlick
Basically trying to identify the permutations under which parameters get mapped. My Action contains a bean private Foo foo and contains getters/setters. Foo has a property bar. My web page is passing the parameter Foo.bar and the Action is finding getFoo using Foo rather than foo! Is this desi

Re: ParameterInterceptor

2007-06-07 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > For example, in the MailReader demo, the web page names > are not prefixed with the bean name in the Action > class, yet it seems to be working! What specifically are you referring to? I don't recall there being anything unusual about how MailReader is set up, excep

RE: ParameterInterceptor

2007-06-07 Thread Hartrich, James CTR USTRANSCOM J6
Try name=foo.bar rather than name=Foo.bar in your jsp. The how and why is out of my scope. Hope this helps. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 07, 2007 3:35 PM To: Struts Users Mailing List Subject: ParameterInterceptor I think I jus