Re: non-Session Object for From Submission
zaxeer schrieb: Hi devs, thanks for your replies i am already doing some thing like this in pageBeginRender public void pageBeginRender(PageEvent event) { if (event.getRequestCycle().isRewinding()) { return; } if(getUSERINFO () == null){ setUSERINFO (new USERINFO("1","ABC","XYZ")); } } but error: "target is null for setProperty(null, "zip", null)" remians there if i persist USERINFO in session its OK, but i think in normal JSP application we need not to persist Whole form content in session, session just need to use for some long retainable info. any idea from you will be helpfull for me. I don't know exactly how AjaxForm works but it might be that it rewinds the form on submission so with that code your USERINFO object won't be set to a non-null value. Also have a look at the client:page persistence scope. That way you can persist the object on the client side as long as the user stays on the same page. Uli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: non-Session Object for From Submission
Hi devs, thanks for your replies i am already doing some thing like this in pageBeginRender public void pageBeginRender(PageEvent event) { if (event.getRequestCycle().isRewinding()) { return; } if(getUSERINFO () == null){ setUSERINFO (new USERINFO("1","ABC","XYZ")); } } but error: "target is null for setProperty(null, "zip", null)" remians there if i persist USERINFO in session its OK, but i think in normal JSP application we need not to persist Whole form content in session, session just need to use for some long retainable info. any idea from you will be helpfull for me. -- View this message in context: http://www.nabble.com/non-Session-Object-for-From-Submission-tf4712531.html#a13487603 Sent from the Tapestry - User mailing list archive at Nabble.com.
Re: non-Session Object for From Submission
Similarly, I use an @InitialValue annotation to set it to a function call, like this: @InitialValue("myDefault") public abstract String getFoo(); public String getMyDefault() { return "Hello"; } -Norman Franke ASD, Inc. On Oct 29, 2007, at 11:53 AM, Andreas Andreou wrote: Well, you can initialize it to a non-null value during pageBeginRender On 10/29/07, zaxeer <[EMAIL PROTECTED]> wrote: hi devs, I have a from which contains some fields: Whole form is reterived by a bean class say USERINFO if i persist this USERINFO getter setter in session, @Persist("session") public abstract USERINFO getUSERINFO (); public abstract void setUSERINFO (USERINFO USERINFO ); it works ok. but if don't persist USERINFO in session , like this public abstract USERINFO getUSERINFO (); public abstract void setUSERINFO (USERINFO USERINFO ); on submitting form (@tacos:AjaxForm) the error occurs like "target is null for setProperty(null, "zip", 2)" (which is USERINFO.zip) i think main class object set to null on submitting. plz help me -- View this message in context: http://www.nabble.com/non-Session- Object-for-From-Submission-tf4712531.html#a13470271 Sent from the Tapestry - User mailing list archive at Nabble.com. -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - 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: non-Session Object for From Submission
Well, you can initialize it to a non-null value during pageBeginRender On 10/29/07, zaxeer <[EMAIL PROTECTED]> wrote: > > hi devs, > > I have a from which contains some fields: Whole form is reterived by a bean > class say USERINFO if i persist this USERINFO getter setter in session, > > @Persist("session") > public abstract USERINFO getUSERINFO (); > public abstract void setUSERINFO (USERINFO USERINFO ); > > it works ok. > > but if don't persist USERINFO in session , like this > > public abstract USERINFO getUSERINFO (); > public abstract void setUSERINFO (USERINFO USERINFO ); > > on submitting form (@tacos:AjaxForm) the error occurs like > > "target is null for setProperty(null, "zip", 2)" > > (which is USERINFO.zip) i think main class object set to null on > submitting. > > plz help me > -- > View this message in context: > http://www.nabble.com/non-Session-Object-for-From-Submission-tf4712531.html#a13470271 > Sent from the Tapestry - User mailing list archive at Nabble.com. > -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
non-Session Object for From Submission
hi devs, I have a from which contains some fields: Whole form is reterived by a bean class say USERINFO if i persist this USERINFO getter setter in session, @Persist("session") public abstract USERINFO getUSERINFO (); public abstract void setUSERINFO (USERINFO USERINFO ); it works ok. but if don't persist USERINFO in session , like this public abstract USERINFO getUSERINFO (); public abstract void setUSERINFO (USERINFO USERINFO ); on submitting form (@tacos:AjaxForm) the error occurs like "target is null for setProperty(null, "zip", 2)" (which is USERINFO.zip) i think main class object set to null on submitting. plz help me -- View this message in context: http://www.nabble.com/non-Session-Object-for-From-Submission-tf4712531.html#a13470271 Sent from the Tapestry - User mailing list archive at Nabble.com.