Re: ModelDriven and ParamsPrepareParams

2014-05-18 Thread Antonio Sánchez
Thanks! El vie 16 may 2014 11:48:35 CEST, Lukasz Lenart escribió: Number 2 is also my favorite but it quite often depends ... on dev's preferences :D I remember that I wanted solve that case with ParametersInterceptors but there was a problem when and how to instantiate Model . 2014-05-08 9:27

Re: ModelDriven and ParamsPrepareParams

2014-05-16 Thread Lukasz Lenart
Number 2 is also my favorite but it quite often depends ... on dev's preferences :D I remember that I wanted solve that case with ParametersInterceptors but there was a problem when and how to instantiate Model . 2014-05-08 9:27 GMT+02:00 Antonio Sánchez : > Hello. > > I have found problems using

Re: ModelDriven Entity Update

2011-04-26 Thread Eric Lentz
My solution looks like this: public Foo getModel() { foo = (Foo) session.get("Foo"); if (foo == null) { foo = new Foo(); session.put("Foo", foo); } return (foo); } Then,

Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-11 Thread Burton Rhodes
o my business logic with my model, then I > should be ok? > >> -Original Message- >> From: Burton Rhodes [mailto:burtonrho...@gmail.com] >> Sent: Thursday, March 10, 2011 7:49 PM >> To: Struts Users Mailing List >> Subject: Re: RE: Re : Re : ModelDriven & Hi

RE: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-11 Thread CRANFORD, CHRIS
execute() method to my business logic with my model, then I should be ok? > -Original Message- > From: Burton Rhodes [mailto:burtonrho...@gmail.com] > Sent: Thursday, March 10, 2011 7:49 PM > To: Struts Users Mailing List > Subject: Re: RE: Re : Re : ModelDriven & Hibern

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-11 Thread Martin Gainty
à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Thu, 10 Mar 2011 19:39:56 -0600 >

Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread Burton Rhodes
e which I could easily avoid by not >> allowing the framework to modify my persistent entity and force me to >> manage the copy/update of the entity accordingly when applicable. >> >>> -Original Message- >>> From: Dave Newton [mailto:davelnew...@gmail.com] &

Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread Burton Rhodes
CHRIS >> Cc: Struts Users Mailing List; Maurizio Cucchiara >> Subject: Re: RE: Re : Re : ModelDriven & Hibernate Entities >> >> On Thu, Mar 10, 2011 at 11:38 AM, CRANFORD, CHRIS wrote: >> > Yes the plugin is in the app's lib directory. >> >>

RE: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread CRANFORD, CHRIS
entity accordingly when applicable. > -Original Message- > From: Dave Newton [mailto:davelnew...@gmail.com] > Sent: Thursday, March 10, 2011 10:40 AM > To: CRANFORD, CHRIS > Cc: Struts Users Mailing List; Maurizio Cucchiara > Subject: Re: RE: Re : Re : ModelDriven &a

RE: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread CRANFORD, CHRIS
Annotating @Transactional on the action didn't help. > -Original Message- > From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] > Sent: Thursday, March 10, 2011 1:41 AM > To: Struts Users Mailing List > Cc: CRANFORD, CHRIS > Subject: Re: RE: Re : Re :

RE: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread CRANFORD, CHRIS
Oh, learn something new every day :) > -Original Message- > From: Dave Newton [mailto:davelnew...@gmail.com] > Sent: Thursday, March 10, 2011 10:40 AM > To: CRANFORD, CHRIS > Cc: Struts Users Mailing List; Maurizio Cucchiara > Subject: Re: RE: Re : Re : ModelDriven &a

Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread Dave Newton
On Thu, Mar 10, 2011 at 11:38 AM, CRANFORD, CHRIS wrote: > Yes the plugin is in the app's lib directory. Just FYI, that sets the object factory to "spring", so Spring is instantiating your actions. (At least it used to.) Dave -

RE: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread CRANFORD, CHRIS
Dave - Yes the plugin is in the app's lib directory. > -Original Message- > From: Dave Newton [mailto:davelnew...@gmail.com] > Sent: Thursday, March 10, 2011 10:37 AM > To: Struts Users Mailing List > Cc: CRANFORD, CHRIS; Maurizio Cucchiara > Subject: Re: RE

Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread Dave Newton
On Thu, Mar 10, 2011 at 11:32 AM, CRANFORD, CHRIS wrote: > I don't use Spring to instantiate my actions, they're not defined like that. And you're not using the S2 Spring plugin? (Just for the sake of completeness; I'm only marginally following this thread.) Dave

RE: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread CRANFORD, CHRIS
nt: Thursday, March 10, 2011 1:41 AM > To: Struts Users Mailing List > Cc: CRANFORD, CHRIS > Subject: Re: RE: Re : Re : ModelDriven & Hibernate Entities > > It's exactly what I meant (you can leave in your service class too). > The object factory must be spring and your cla

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-10 Thread CRANFORD, CHRIS
e- > From: Martin Gainty [mailto:mgai...@hotmail.com] > Sent: Wednesday, March 09, 2011 9:59 PM > To: Struts Users Mailing List > Subject: RE: Re : Re : ModelDriven & Hibernate Entities > > > osiv filter (should) set flushing to never (now manual) to prevent > accidental wr

RE: ModelDriven & Hibernate Entities

2011-03-10 Thread adam pinder
i dont use the osiv filter i just make sure the DAO object method returns the objects initialised correctly (i.e. all lazy collections that are to be accessed are initialised) for how its going to be used - i might have a DAO method to return the plain object with no collections initialised an

Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Maurizio Cucchiara
2011 00:08, CRANFORD, CHRIS wrote: > In the Struts2 Action rather than my service class? > >> -Original Message- >> From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] >> Sent: Wednesday, March 09, 2011 4:20 PM >> To: Struts Users Mailing List >> Subj

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Martin Gainty
isée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni

RE: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
In the Struts2 Action rather than my service class? > -Original Message- > From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] > Sent: Wednesday, March 09, 2011 4:20 PM > To: Struts Users Mailing List > Subject: Re: RE: Re : Re : ModelDriven & Hibernate Ent

Re: RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Maurizio Cucchiara
Dave Newton [mailto:davelnew...@gmail.com] >> Sent: Wednesday, March 09, 2011 2:16 PM >> To: Struts Users Mailing List >> Subject: Re: Re : Re : ModelDriven & Hibernate Entities >> >> Another reason OSiV filters can be tricky. >> >> Dave >

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
I still think this is related to my @Transactional annotation maybe. > -Original Message- > From: Dave Newton [mailto:davelnew...@gmail.com] > Sent: Wednesday, March 09, 2011 2:16 PM > To: Struts Users Mailing List > Subject: Re: Re : Re : ModelDriven & Hibernate En

Re: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Dave Newton
t; I'd prefer that changes aren't committed unless I explicitly call to do so on > the EntityManager; however I understand Hibernate/JPA's reasons behind why it > works the way it does. > > > >> -Original Message- >> From: François Rouxel [mailto:r

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
> Sent: Wednesday, March 09, 2011 1:35 PM > To: Struts Users Mailing List > Subject: Re: Re : Re : ModelDriven & Hibernate Entities > > It might just be an order of interceptors problem. One of your first > interceptors should be your login check. That should definitely

Re: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Chris Pratt
;s reasons behind > why it works the way it does. > > > > > -Original Message- > > From: François Rouxel [mailto:rouxe...@yahoo.com] > > Sent: Wednesday, March 09, 2011 12:24 PM > > To: Struts Users Mailing List > > Subject: Re : Re : ModelDriven

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
From: François Rouxel [mailto:rouxe...@yahoo.com] > Sent: Wednesday, March 09, 2011 12:24 PM > To: Struts Users Mailing List > Subject: Re : Re : ModelDriven & Hibernate Entities > > Hi Chris, > first, > you might have another pb, because struts2 does not change your model > if

Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread François Rouxel
. fr/ - Message d'origine De : "CRANFORD, CHRIS" À : Struts Users Mailing List Envoyé le : Mer 9 mars 2011, 13h 09min 33s Objet : RE: Re : ModelDriven & Hibernate Entities Francois - While that may work for you, I wouldn't place anyt

Re: Re : ModelDriven & Hibernate Entities

2011-03-09 Thread Dave Newton
On Wed, Mar 9, 2011 at 1:09 PM, CRANFORD, CHRIS wrote: > I wouldn't place anything Hibernate or persistence related in > my JSP pages at all.  In my mind, this breaks the entire > reasoning behind MVC and the view simply there to render data IMO OSiV filters put non-render stuff into the JSP anywa

RE: Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
> -Original Message- > From: François Rouxel [mailto:rouxe...@yahoo.com] > Sent: Wednesday, March 09, 2011 11:43 AM > To: Struts Users Mailing List > Subject: Re : ModelDriven & Hibernate Entities > > same issue > this how I fixed it : (the main idea is to redir

Re : ModelDriven & Hibernate Entities

2011-03-09 Thread François Rouxel
same issue this how I fixed it : (the main idea is to redirect to a jsp if an exception occured, and the jsp rollback) create an error page error.jsp <%@page import="com.rdvcentral.util.persistance.HibernateUtil"%> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib pre

Re: ModelDriven - Best Practices

2011-01-24 Thread Paweł Wielgus
Hi Chris, are You using paramPrepareParams stack? It should work with it like You expect it to. Best greetings, Paweł Wielgus. 2011/1/24 CRANFORD, CHRIS : > I recently implemented an action using the ModelDriven interface.  Since > my Domain Object doesn't contain anything beyond properties that

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2008-12-17 Thread Tobias M.
Hi Fabiano, first of all thank you for your valuable hint. I established an interceptor CommitAwareInterceptor at the top of the interceptor stack. This interceptor is tagging the JPA transaction for RollbackOnly in case of a.) the action is not implementing CommitAware b.) the action is

Re: ModelDriven interceptor after execute

2008-10-28 Thread stanlick
call the setModel at the end of your action? On Tue, Oct 28, 2008 at 4:33 AM, Alexander Baetz <[EMAIL PROTECTED]>wrote: > Hi, > > inside the execute method of an action i'm retrieving an Object. I want the > ModelDriven-Interceptor, to put it on the Stack when execute is done. > One solution woul

Re: ModelDriven action with action property

2008-03-19 Thread Jeromy Evans
Emil.I wrote: Hello i have a textfield with the name="firstName" and a textfield with the name="address.city" etc.. the action is model driven where firstName is the property of model. Since address is a property of action (not property of model) how come address.city does not get set it doesn't

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2008-03-10 Thread Fabiano Franz
ervices >> ECOS Development Team >> [EMAIL PROTECTED] >> 970-226-9290 >> >> Fort Collins Science Center >> US Geological Survey >> 2150 Centre Ave, Building C >> Fort Collins, CO 80526-8116 >> >> >> >> "Al Sutt

Re: ModelDriven vs OGNL assignment?

2007-11-02 Thread Gary Affonso
Dave Newton wrote: --- Gary Affonso <[EMAIL PROTECTED]> wrote: And that does it. Direct model injection. Easy. Technically, no, it's indirected by one level. *All* ModelDriven does is push the model on to the stack so it's available at the top level. AFAIK there's no compelling reason to do

Re: ModelDriven vs OGNL assignment?

2007-11-02 Thread Gary Affonso
Jon Wilmoth wrote: Besides the simplified view references, I've used the level of indirection to allow for a dynamic model on a single action class that implements a number of related actions. In my case the action configuration sets a static property that defines the model property. > The get

Re: ModelDriven vs OGNL assignment?

2007-11-02 Thread Jon Wilmoth
ation uses the action static parameter to determine which model is being requested. - Original Message From: Dave Newton <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Friday, November 2, 2007 9:33:03 AM Subject: Re: ModelDriven vs OGNL assignment? --- Gary Affonso <[E

Re: ModelDriven vs OGNL assignment?

2007-11-02 Thread Dave Newton
--- Gary Affonso <[EMAIL PROTECTED]> wrote: > And that does it. Direct model injection. Easy. Technically, no, it's indirected by one level. *All* ModelDriven does is push the model on to the stack so it's available at the top level. AFAIK there's no compelling reason to do that other than savi

Re: ModelDriven Resource Bundle not working ?

2007-10-09 Thread pilou
well, I am using it in a simple JSP : If I put the key/value in PersonneFilterAction.properties (.properties it works, but not in .properties PersonneFilterBean.properties [EMAIL PROTECTED] Ian Roughley wrote: > > Model properties files are used for supplyi

Re: ModelDriven Resource Bundle not working ?

2007-10-08 Thread Ian Roughley
Model properties files are used for supplying field description and validation messages for a model object. I know it works ;-) but I don't know how you are using it from the code supplied. /Ian Dave Newton wrote: Hmm, in the docs [1] it says that it will search for "ModelDriven's model", a

Re: ModelDriven Resource Bundle not working ?

2007-10-08 Thread Dave Newton
Hmm, in the docs [1] it says that it will search for "ModelDriven's model", although I haven't tried it myself. d. [1] http://struts.apache.org/2.x/docs/localization.html --- Zarar Siddiqi <[EMAIL PROTECTED]> wrote: > I thought you could only specify properties files > for action beans, > not m

Re: ModelDriven Resource Bundle not working ?

2007-10-08 Thread Zarar Siddiqi
I thought you could only specify properties files for action beans, not model ones. So in your case try specifying PersonneFilterAction.properties Zarar On 10/8/07, pilou <[EMAIL PROTECTED]> wrote: > > hi > I noticed that the property bundles named with the Model Bean class name > does not seem

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-02 Thread cilquirm
nt Team > [EMAIL PROTECTED] > 970-226-9290 > > Fort Collins Science Center > US Geological Survey > 2150 Centre Ave, Building C > Fort Collins, CO 80526-8116 > > > > "Al Sutton" <[EMAIL PROTECTED]> > 10/02/2007 12:14 AM > Please respond

Re: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-02 Thread Musachy Barroso
9290 > > Fort Collins Science Center > US Geological Survey > 2150 Centre Ave, Building C > Fort Collins, CO 80526-8116 > > > > "Al Sutton" <[EMAIL PROTECTED]> > 10/02/2007 12:14 AM > Please respond to > "Struts Users Mailing List" >

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-02 Thread Jon_French
uot;Struts Users Mailing List" To "'Struts Users Mailing List'" cc Subject RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED Just a thought, are you actually using transactions? If so why not modify the interceptor to only commit if a SU

RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-01 Thread Al Sutton
October 2007 04:04 To: Struts Users Mailing List Subject: Re: ModelDriven CRUD validation failure still causes JPA update - RESOLVED OK: I've fixed the problem. I'm not sure why this was the case, but here is what was causing the problem: In my ModelDriven action, I had a method

Re: ModelDriven CRUD validation failure still causes JPA update - RESOLVED

2007-10-01 Thread Jon_French
e Ave, Building C Fort Collins, CO 80526-8116 [EMAIL PROTECTED] 10/01/2007 08:29 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update Unfortunately, it app

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
ase respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update Only difference is that I don't use model driven. Is there any setting to tell hibernate to flush the session when c

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
rs Mailing List cc Subject Re: ModelDriven CRUD validation failure still causes JPA update --- [EMAIL PROTECTED] wrote: > That's an interesting idea Dave. I'm using the > paramsPrepareStack. It'll take some investigation to > see if that would fix the issue. Shouldn&#

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Musachy Barroso
ASRC Management Services > ECOS Development Team > [EMAIL PROTECTED] > 970-226-9290 > > Fort Collins Science Center > US Geological Survey > 2150 Centre Ave, Building C > Fort Collins, CO 80526-8116 > > > > "Musachy Barroso" <[EMAIL PROTECTED]>

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
IL PROTECTED]> 10/01/2007 05:10 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update I only use the beanutils.copy solution on a few places, on the other cases I a

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
e Ave, Building C Fort Collins, CO 80526-8116 Piero Sartini <[EMAIL PROTECTED]> 10/01/2007 03:38 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update &

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Musachy Barroso
I only use the beanutils.copy solution on a few places, on the other cases I always load the object model on the prepare() method if the "id" field is set (editing), and then call update or create on the entity manager in my action method. I never got that problem so I'm wondering what is different

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > That's an interesting idea Dave. I'm using the > paramsPrepareStack. It'll take some investigation to > see if that would fix the issue. Shouldn't take much; it might be as simple as adding a validate/defaultWorkFlow up towards the top (although I might try just add

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
cal Survey 2150 Centre Ave, Building C Fort Collins, CO 80526-8116 Dave Newton <[EMAIL PROTECTED]> 10/01/2007 03:32 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: ModelDriven CRUD validation failure still causes JPA update I

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Musachy Barroso
> * instantiate a temporary bean used for the form only: > BeanUtils.copyProperties(tempBean, yourBean); > That's what I do. musachy -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAI

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Piero Sartini
> Since my Model is acquired from the Hibernate session (during the > "prepare()" Action method), it is a transactional persistent instance. > Note this from the hibernate documentation: > > "Transactional persistent instances (ie. objects loaded, saved, created or > queried by the Session) may be

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Dave Newton
CO 80526-8116 > > > > "Musachy Barroso" <[EMAIL PROTECTED]> > 10/01/2007 02:42 PM > Please respond to > "Struts Users Mailing List" > > > To > "Struts Users Mailing List" > cc > > Subject > Re: ModelDrive

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Jon_French
:42 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: ModelDriven CRUD validation failure still causes JPA update If there is a validation error the code on your action shouldn't be executed at all, so you wouldn't hav

Re: ModelDriven CRUD validation failure still causes JPA update

2007-10-01 Thread Musachy Barroso
If there is a validation error the code on your action shouldn't be executed at all, so you wouldn't have this problem. Are you applying the "defaultWorkflow" interceptor to your action? regards musachy On 10/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a ModelDriven action which c

RE: ModelDriven

2007-09-24 Thread Wesley Wannemacher
> > Yikes, what if getModel() is doing actual work, you're > calling it twice for no apparent reason. Wouldn't it be > significantly safer to: > > public String intercept(ActionInvocation invocation) throws > Exception { > Object action = invocation.getAction(); > if (action instan

Re: ModelDriven

2007-09-21 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > So is this 2.0.9 javadoc correct? It's XWork, not S2; not sure which version. > /** > * @return the model to be pushed onto the > ValueStack instead of the > Action itself > */ It also says: /** * ModelDriven Actions provide a model object to be pus

Re: ModelDriven

2007-09-21 Thread stanlick
Yes indeed! The more I look at the code in these interceptors, the more I question the number of times Ctrl-C and Ctrl-V were pressed! Scott On 9/21/07, Chris Pratt <[EMAIL PROTECTED]> wrote: > > > On 9/21/07, Dave Newton <[EMAIL PROTECTED]> wrote: > > > public String intercept(ActionInvocation

Re: ModelDriven

2007-09-21 Thread Chris Pratt
> On 9/21/07, Dave Newton <[EMAIL PROTECTED]> wrote: > > public String intercept(ActionInvocation invocation) > > throws Exception { > > Object action = invocation.getAction(); > > if (action instanceof ModelDriven) { > > ModelDriven modelDriven = (ModelDriven) > > action; > >

Re: ModelDriven

2007-09-21 Thread stanlick
So is this 2.0.9 javadoc correct? public interface ModelDriven { /** * @return the model to be pushed onto the ValueStack instead of the Action itself */ T getModel(); } This sort of sound like the Action IS NOT ALSO on the stack! On 9/21/07, Dave Newton <[EMAIL PROTECTED]>

Re: ModelDriven

2007-09-21 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > Is there anything that ModelDriven does other than > push your model on the top of the stack? public String intercept(ActionInvocation invocation) throws Exception { Object action = invocation.getAction(); if (action instanceof ModelDriven) { ModelDri

Re: ModelDriven vs. getter for business entity in Action

2007-07-31 Thread Laurie Harper
Thorsten Schäfer wrote: I'm currently taking a look at Struts 2 and I particularly like getting rid of ActionForms. As I understand, WebWorks/Struts2 offers two ways to map forms to business domain objects: 1. I can provide a getter method (getDomainObject()) in the action and refer to its proper

Re: ModelDriven interface

2007-06-11 Thread Martin Gainty
by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Matt Luce" <[EMAIL PROTECTED]> To: Sent: Monday, June 11, 2007 8:51 PM Subject: RE: ModelDriven interface After working on this for a while, I beginni

RE: ModelDriven interface

2007-06-11 Thread Matt Luce
After working on this for a while, I beginning to think that that ModelDriven interface is not what I had thought it was. It is certainly not a replacement for the formBeans in Struts 1. I guess I just need to forget most of what I've used in Struts 1 :) Thanks all for your help.

RE: ModelDriven interface

2007-06-09 Thread Matt.Luce
Here is the flow of my tiny app: listAction -> list.jsp -> selectAction -> update.jsp -> updateAction (implements ModelDriven - getModel() returns the object selected in list.jsp stored in session ) Once it gets to update.jsp, the form should show the values of the bean selected on list.jsp. Bu

Re: ModelDriven interface

2007-06-09 Thread Matt.Luce
I'm using the default stack. What I'm trying to do is something very simple, that was incredibly straightforward in Struts 1. What I'm finding is the getModel() method is not getting called when I expect it to. It doesn't get called until after the action has been "hit" once. But that doesn't he

Re: ModelDriven interface

2007-06-09 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > I agree, it should be on the stack, but the values > don't show up. Does anyone have an example of this > that works? I have a ScopedModelDriven example, but it's really, really boring. IIRC there's a ModelDriven example in showcase, but it's even more boring than

Re: ModelDriven interface

2007-06-09 Thread Matt.Luce
I agree, it should be on the stack, but the values don't show up. Does anyone have an example of this that works?

Re: ModelDriven interface

2007-06-09 Thread Matt.Luce
Then why have the modelDriven interface at all? What use is it? Matt Luce Wells Fargo Funds Management, LLC 414.577.7927 414.359.3537 Fax

Re: ModelDriven interface

2007-06-09 Thread Dave Newton
--- Nicolás Pace <[EMAIL PROTECTED]> wrote: > The correct way of populating the values IS > declaring the getters and setters for each object you > want to populate. If you implement ModelDriven then the model object returned should be on the object stack allowing non-qualified access on the form

Re: ModelDriven interface

2007-06-09 Thread Nicolás Pace
On 6/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'm working with Struts 2.0.6 and I'm trying to use the ModelDriven Interface. However, I seem to be having some troubles. My actionClass implements ModelDriven, but the values on the page don't fill with the values of the object returned

Re: ModelDriven & Action

2007-03-21 Thread Ted Husted
The point of ModelDriven is that we don't have to refer to the "parent" or "model" property. We can just refer to the property flat-out, as if it were a property of the Action class. In this case, it might be that the reference should be to child.property, rather than parent.child.property, since

Re: ModelDriven & Action

2007-03-21 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > Does S2 limitthe depth to which Action Domain objects > can be populated? Not as far as I know... I have three-deep fields that work. I *may* (haven't checked in awhile) have left-over null-creation configs, but I don't know if they're (still?) necessary or not. > L