Re: Struts2: Pre-populate form with values from a session bean

2011-04-13 Thread arin_12
ext: http://struts.1045723.n5.nabble.com/Struts2-Pre-populate-form-with-values-from-a-session-bean-tp3487976p4300972.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsub

Re: Struts2: Pre-populate form with values from a session bean

2008-12-09 Thread Robert Graf-Waczenski
Dave Newton wrote: --- On Tue, 12/9/08, Robert Graf-Waczenski <[EMAIL PROTECTED]> wrote: getmFoo() as getter works just fine here with S2 as it did since almost eight years with S1. Which version of S2? I'll re-check when I get home and follow up. Thanks, Dave --

Re: Struts2: Pre-populate form with values from a session bean

2008-12-09 Thread Dave Newton
--- On Tue, 12/9/08, Robert Graf-Waczenski <[EMAIL PROTECTED]> wrote: > getmFoo() as getter works just fine here with S2 as it did > since almost eight years with S1. Which version of S2? I'll re-check when I get home and follow up. Thanks, Dave -

Re: Struts2: Pre-populate form with values from a session bean

2008-12-09 Thread Robert Graf-Waczenski
Dave Newton wrote: --- On Tue, 12/9/08, Robert Graf-Waczenski wrote: [...] I was guessing in that direction already but wanted a guru to confirm this first, which is what you did. Minus the "guru" part ;) That's our naming spec and we have decided to also use this spec for bean pr

Re: Struts2: Pre-populate form with values from a session bean

2008-12-09 Thread Dave Newton
--- On Tue, 12/9/08, Robert Graf-Waczenski wrote: > [...] I was guessing in that direction already but wanted > a guru to confirm this first, which is what you did. Minus the "guru" part ;) > That's our naming spec and we have decided to also use > this spec for bean property names, hence the ge

Re: Struts2: Pre-populate form with values from a session bean

2008-12-09 Thread Robert Graf-Waczenski
Dave, your comments helped me resolve the issue, see my comments below. Dave Newton wrote: A couple of comments, although with the configuration provided I'm not getting as far as you are. --- On Thu, 12/4/08, Robert Graf-Waczenski wrote: name="com.blah.blurp" ex

Re: Struts2: Pre-populate form with values from a session bean

2008-12-04 Thread Dave Newton
A couple of comments, although with the configuration provided I'm not getting as far as you are. --- On Thu, 12/4/08, Robert Graf-Waczenski wrote: > > name="com.blah.blurp" >extends="struts-default"> > class="com.blah.blurp.actions2.AddAction"> >

Re: Struts2: Pre-populate form with values from a session bean

2008-12-04 Thread Robert Graf-Waczenski
Dave Newton wrote: --- On Thu, 12/4/08, Robert Graf-Waczenski wrote: I'm using Struts 2.0.14, any chance that this is a fixed bug? If it is unknown, i'll go file a bug then. I dunno; I've used this pattern on a few apps (ScopedModelDriven, too) so I'm skeptical it's a bug. Could you p

Re: Struts2: Pre-populate form with values from a session bean

2008-12-04 Thread Dave Newton
--- On Thu, 12/4/08, Robert Graf-Waczenski wrote: > I'm using Struts 2.0.14, any chance that this is a fixed bug? > If it is unknown, i'll go file a bug then. I dunno; I've used this pattern on a few apps (ScopedModelDriven, too) so I'm skeptical it's a bug. Could you post the config for the act

Re: Struts2: Pre-populate form with values from a session bean

2008-12-04 Thread Robert Graf-Waczenski
Dave Newton wrote: --- On Thu, 12/4/08, Robert Graf-Waczenski wrote: The form field is only pre-filled if i explicitly use value="#session...", but with this, [...] If the action implements modelDriven, and the getModel() call returns the session bean under mySessionBeanKey, then yo

Re: Struts2: Pre-populate form with values from a session bean

2008-12-04 Thread Dave Newton
--- On Thu, 12/4/08, Robert Graf-Waczenski wrote: > value="#session.mySessionBeanKey.theValue"/> > > The form field is only pre-filled if i explicitly use > value="#session...", but with this, [...] If the action implements modelDriven, and the getModel() call returns the session bean under myS

Struts2: Pre-populate form with values from a session bean

2008-12-04 Thread Robert Graf-Waczenski
Hi! We were previously using Struts1 session scope form beans to achieve what we feel was rather natural: We frequently have a pattern were a user needs to change some settings in some model bean stored in a persistent storage. With Struts1, we had a jsp with a tag that was bound to an actio

Re: Pre populate form missing values from nested object

2005-01-20 Thread Conrad CRAMPTON PSE 52704
Ok, thanks Hubert - this confirms that I will have to do what I want another way. Cheers Conrad   Conrad CramptonSoftware Solutions ManagerForce Headquarters11 Edinburgh SquareSutton RoadMaidstoneME15 9BZ01622 653283 (ext)19-3283 (internal)07814 011752 (mobile)>>> [EMAIL PROTECTED] 20/01/05 15:36

Re: Pre populate form missing values from nested object

2005-01-20 Thread Hubert Rabago
Our views align on the use of session scoped beans, however, it seems that session scope is what meets your needs. > So this essentially means that nested objects are worthless as you can't > keep reference to child objects that you populate in the middle tier for the > trip around to the UI and

Re: Pre populate form missing values from nested object

2005-01-20 Thread Conrad CRAMPTON PSE 52704
    Conrad CramptonSoftware Solutions ManagerForce Headquarters11 Edinburgh SquareSutton RoadMaidstoneME15 9BZ01622 653283 (ext)19-3283 (internal)07814 011752 (mobile)>>> [EMAIL PROTECTED] 19/01/05 16:07:49 >>> > So the question is this - how do I retain values of nested properties that> aren't r

Re: Pre populate form missing values from nested object

2005-01-19 Thread Hubert Rabago
> So the question is this - how do I retain values of nested properties that > aren't required to be (or cannot be) represented in the jsp? The only values that you'll get when the form is submitted are the values that the form has. If you have values that you want to submit with the form, but do

Pre populate form missing values from nested object

2005-01-19 Thread Conrad CRAMPTON PSE 52704
Hi, The list archive search doesn't appear to work to forgive me if this is a simple and already answered topic.   I have an actionform that has an object as a property - Premises premises, and a jsp that uses . When I use createPremises.jsp all is ok and the values for premises get through to my

Re: Pre-populate form

2004-11-17 Thread Dakota Jack
The ActionForm you specified in your ActionMapping in struts-config.xml under the name attribute, e.g. "logonForm", is available to you in the execute method. Just cast your ActionForm parameter to the particular form you used with the Action, e.g., if you have public ActionForward execute(Action

Re: Pre-populate form

2004-11-17 Thread Wendy Smoak
From: "Roland Carlsson" <[EMAIL PROTECTED]> > When you say that the newinsurance.jsp "just see it" where do you store > "it"? In request.setAttribute() with some key? Session? You don't have to store it anywhere... it's already there. In the 'execute' method signature, you are given a _reference_

Re: SV: Pre-populate form

2004-11-11 Thread Jeff Beal
The framework handles it. Here's a rough sequence of events: 1) The Struts servlet receives a request for /newinsurance.do 2) The request processor consults the mapping information and sees that there should be an InsuranceBean instance in the request 3) It checks the standard request attri

SV: Pre-populate form

2004-11-11 Thread Roland Carlsson
Hi Jeff! When you say that the newinsurance.jsp "just see it" where do you store "it"? In request.setAttribute() with some key? Session? I'm using DynaValidatorBean but I guess that it should work in a simular way. Thanks in advance Roland Carlsson Den 04-11-11 14.14, skrev "Jeff Beal" <[EMAIL

Re: Pre-populate form

2004-11-11 Thread Jeff Beal
Every JSP page in my application is going to have two actions associated with it. One action will always be called prior to displaying the JSP page. The other will be called to process the user's input. In the struts-config, both of these actions are configured with the same form bean. Thus

SV: Pre-populate form

2004-11-11 Thread Roland Carlsson
. > > > Original Message Follows > From: Roland Carlsson <[EMAIL PROTECTED]> > Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Pre-populate form > Date: Thu, 11 Nov 2004

RE: Pre-populate form

2004-11-11 Thread Mark Benussi
. Original Message Follows From: Roland Carlsson <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Pre-populate form Date: Thu, 11 Nov 2004 12:07:38 +0100 Hi! I am looking for a b

Pre-populate form

2004-11-11 Thread Roland Carlsson
Hi! I am looking for a better way to pre-populate my (html)forms when building to allow the users to edit data from a database. I know that I can create an populate a DynaValidatorBean but I don't know where to put it so that I can use it from my (html)from. Thanks in advance Roland Carlsson Ps