Re: Action chaining not forwarding ModelDriven model properties

2018-03-03 Thread Yasser Zamani
On 2/28/2018 3:47 PM, shahzad.ismail@ wrote: > I've debugged it a bit and able to figure out that, initially, at the start > of action1, request.getParamater("modelprop") is null then I set modelprop in > the action1 method which makes mymodel.modelprop == "something" and > request.getAttribut

Re: Action chaining not forwarding ModelDriven model properties

2018-03-01 Thread Lukasz Lenart
t; action3 --> jsp2 > > So it must be type="chain" for action1 --> action2 and action2 --> action3 as > I need to pass ModelDriven model as well as some action member variables, > some of them are non-strings. All 3 actions are chaining to different methods >

Action chaining not forwarding ModelDriven model properties

2018-02-28 Thread shahzad . ismail
Hi, I'm migrating an app from Struts 1 to Struts 2 (Tomcat v8 and Struts 2.5.14.1). There is a scenario in which mapping goes like: jsp1 --> action1 --> action2 --> action3 --> jsp2 So it must be type="chain" for action1 --> action2 and action2 --> action3 as I

Re: ModelDriven and ParamsPrepareParams

2014-05-18 Thread Antonio Sánchez
most recommended one: 1. Define a custom interceptor stack MPPP (ModelParamsPrepareParams), so model is instantiated before first params. 1.1. I have read [1] than moving ModelDriven would not be enough, but a MPPMP is required. Is this right? 2. [my preferred one] Define a (redundant) id property i

Re: ModelDriven and ParamsPrepareParams

2014-05-16 Thread Lukasz Lenart
custom interceptor stack MPPP (ModelParamsPrepareParams), so > model is instantiated before first params. > > 1.1. I have read [1] than moving ModelDriven would not be enough, but a > MPPMP is required. Is this right? > > 2. [my preferred one] Define a (redundant) id property in t

ModelDriven and ParamsPrepareParams

2014-05-14 Thread Antonio Sánchez
custom interceptor stack MPPP (ModelParamsPrepareParams), so model is instantiated before first params. 1.1. I have read [1] than moving ModelDriven would not be enough, but a MPPMP is required. Is this right? 2. [my preferred one] Define a (redundant) id property in the action and use it in

Re: TextProvider, Validation and ModelDriven

2013-09-16 Thread Lukasz Lenart
Christoph Nenning : >> > when an application uses a custom TextProvider it seems not to be used > for >> > validation errors. And if an Action is ModelDriven it behaves > different >> > again. >> > >> > Here is a sample app for that: >> > http

Re: TextProvider, Validation and ModelDriven

2013-09-16 Thread Christoph Nenning
> > when an application uses a custom TextProvider it seems not to be used for > > validation errors. And if an Action is ModelDriven it behaves different > > again. > > > > Here is a sample app for that: > > https://github.com/wolpi/struts2-samples/tree/ma

Re: TextProvider, Validation and ModelDriven

2013-09-14 Thread Lukasz Lenart
2013/9/13 Christoph Nenning : > when an application uses a custom TextProvider it seems not to be used for > validation errors. And if an Action is ModelDriven it behaves different > again. > > Here is a sample app for that: > https://github.com/wolpi/struts2-samples/tree/mast

TextProvider, Validation and ModelDriven

2013-09-13 Thread Christoph Nenning
Dear List, when an application uses a custom TextProvider it seems not to be used for validation errors. And if an Action is ModelDriven it behaves different again. Here is a sample app for that: https://github.com/wolpi/struts2-samples/tree/master/modeldriven-and-textprovider This sample

Re: conversionError interceptor is causing ModelDriven to fail

2013-07-26 Thread Sreekanth S. Nair
r : >> > Hi, >> > conversionError interceptor in the interceptor stack breaking the >> > ModelDriven, can't able to bind Model which have custom object >> association >> >> My magic ball is broken to

Re: conversionError interceptor is causing ModelDriven to fail

2013-07-26 Thread Sreekanth S. Nair
air : > > Hi, > > conversionError interceptor in the interceptor stack breaking the > > ModelDriven, can't able to bind Model which have custom object > association > > My magic ball is broken today and I cannot do any magic, sorry, shop > is closed ;-) >

Re: conversionError interceptor is causing ModelDriven to fail

2013-07-26 Thread Lukasz Lenart
2013/7/26 Sreekanth S. Nair : > Hi, > conversionError interceptor in the interceptor stack breaking the > ModelDriven, can't able to bind Model which have custom object association My magic ball is broken today and I cannot do any magic, sorry, shop is closed ;-) Regards -

conversionError interceptor is causing ModelDriven to fail

2013-07-25 Thread Sreekanth S. Nair
Hi, conversionError interceptor in the interceptor stack breaking the ModelDriven, can't able to bind Model which have custom object association

Re: JSon, includeProperties and modelDriven

2012-08-10 Thread hasegawa
thanks a lot -- View this message in context: http://struts.1045723.n5.nabble.com/JSon-includeProperties-and-modelDriven-tp5537859p5710397.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe

RE: JSon, includeProperties and modelDriven

2012-04-04 Thread Matthieu.Marc
rizio Cucchiara Envoyé : jeudi 8 mars 2012 16:39 À : Struts Users Mailing List Objet : Re: JSon, includeProperties and modelDriven Hi Matthieu, I have experienced the same issue today, referencing to the action element should fix the problem. So try to add the follow line: a

Re: JSon, includeProperties and modelDriven

2012-03-08 Thread Maurizio Cucchiara
Hi Matthieu, I have experienced the same issue today, referencing to the action element should fix the problem. So try to add the follow line: action ^day, events, events\[\d+\], events\[\d+\].id, Twitter :http://www.twitter.com/m_cucchia

JSon, includeProperties and modelDriven

2012-03-05 Thread Matthieu.Marc
extends baseAction implements ModelDriven, Preparable { public String getDay(){ return day; }; public myModel getModels(){return ...;}; } The JSON is working for events\[\d+\].id : getModels().getEvents().get(i).getId(); But not working for day : getDay() is not called. I

RE: JSON & ModelDriven

2011-06-03 Thread CRANFORD, CHRIS
d with the current authentication type state specified (LDAP vs Local Database). But I suppose I could remove the ModelDriven interface implementation and reference the User bean directly for that to get JSON to serialize the action rather than the model unless there is a way to revert back via a p

RE: JSON & ModelDriven

2011-06-01 Thread Martin Gainty
model is somehwhat analogous to the legacy struts1 formbean action contains processing artifacts (such as public String execute()) ModelDriven more closely represents a large bean which can be serialized/deserialized as JSON ResultType (application/json content-type) what does Action contain

JSON & ModelDriven

2011-06-01 Thread CRANFORD, CHRIS
>From what I have read; it appears that for an action that implements the ModelDriven interface that the JSON result type is going to attempt to serialized the model object to the JSON stream rather than the action. Is there anyway to override this so that the action is what is returned inst

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread Chris Pratt
e of a property member that has been initialized in > either prepare() or the execute() or entry point method calls > themselves. > > -Chris > > -Original Message- > From: Eric Lentz [mailto:eric.le...@sherwin.com] > Sent: Thursday, May 19, 2011 1:22 PM > To: Struts

Re: Struts2 Validation w/ModelDriven

2011-05-19 Thread Dave Newton
On Thu, May 19, 2011 at 3:55 PM, CRANFORD, CHRIS wrote: > The framework will call getModel() multiple times before your validate() > and execute() methods are invoked; and so by adding the create/lookup > logic to getModel(); you would then have to wrap that block of code > around a null check so t

Re: Struts2 Validation w/ModelDriven

2011-05-19 Thread Dave Newton
On Thu, May 19, 2011 at 2:22 PM, Eric Lentz wrote: > I'm curious. If you are using ModelDriven, then why do you load your model > in prepare()? Why not in getModel? That'd mean you'd need the "did I already load the model?" code in getModel(), wouldn't it?

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread CRANFORD, CHRIS
ion w/ModelDriven I'm curious. If you are using ModelDriven, then why do you load your model in prepare()? Why not in getModel? I don't think behavior will be any different though since that interceptor is on the same side of the st

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread Eric Lentz
used it before though, so just a thought. It might be applicable? I'm curious. If you are using ModelDriven, then why do you load your model in prepare()? Why not in getModel? I don't think behavior will be any different though since that interceptor is on the same side of the stack as

Re: Struts2 Validation w/ModelDriven

2011-05-19 Thread Aaron Brown
8 AM > To: Struts Users Mailing List > Subject: Re: Struts2 Validation w/ModelDriven > >> So when this error condition is met and the user redirected back to > the > INPUT form; the >> field where they had entered "xyz" is now the original default >> initial

RE: Struts2 Validation w/ModelDriven

2011-05-19 Thread CRANFORD, CHRIS
, May 19, 2011 11:58 AM To: Struts Users Mailing List Subject: Re: Struts2 Validation w/ModelDriven > So when this error condition is met and the user redirected back to the INPUT form; the > field where they had entered "xyz" is now the original default > initialized value.

Re: Struts2 Validation w/ModelDriven

2011-05-19 Thread Eric Lentz
> So when this error condition is met and the user redirected back to the INPUT form; the > field where they had entered "xyz" is now the original default > initialized value. Can't you check the action error and not refresh the model when there is an error?

Struts2 Validation w/ModelDriven

2011-05-19 Thread CRANFORD, CHRIS
When I implement the ModelDriven interface in my Struts2 actions; I follow your typical prepare() method as follows: public void prepare() throws Exception { if(id != null) { model = service.create(/* some parameters */); } else { model = service.lookupById(id); } } When a user

Re: ModelDriven Entity Update

2011-04-26 Thread Eric Lentz
t this is what I do. I suspect that there is a better (more Struts standard) place to put the object instead of the session? - Eric From: "CRANFORD, CHRIS" To: "Struts Users Mailing List" Date: 04/25/2011 11:52 PM Subject: ModelDriven Entity Update In a form; I

ModelDriven Entity Update

2011-04-25 Thread CRANFORD, CHRIS
In a form; I have a select box defined as: In the model I have the propertyOfModel annotated as @ManyToOne as follows: @ManyToOne(fetch=FetchType.LAZY) @JoinColumn(name="PROPERTY_ID",nullable=true,insertable=true,updatable=t rue) public PropertyOfModel getPropertyOfModel() { // ... } Now the

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
gt;> Dave et el - >> >> I can only conclude that either something is severely lost in my >> understanding of a Struts2 ModelDriven action coupled with Spring3 and >> Hibernate/JPA.  I have tried numerous configuration changes, >> annotations, etc and nothing has appear

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

2011-03-10 Thread Burton Rhodes
, CHRIS wrote: > Dave et el - > > I can only conclude that either something is severely lost in my > understanding of a Struts2 ModelDriven action coupled with Spring3 and > Hibernate/JPA.  I have tried numerous configuration changes, > annotations, etc and nothing has appeared to av

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

2011-03-10 Thread CRANFORD, CHRIS
Dave et el - I can only conclude that either something is severely lost in my understanding of a Struts2 ModelDriven action coupled with Spring3 and Hibernate/JPA. I have tried numerous configuration changes, annotations, etc and nothing has appeared to avoid allowing dirty data to make it to

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
and one with all collections initialised or somewhere in between. this gives me full control over persistence etc... adam > Subject: ModelDriven & Hibernate Entities > Date: Wed, 9 Mar 2011 11:34:32 -0600 > From: chris.cranf...@setech.com > To: user@struts.apache.org > > I h

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
pare() > 4. Struts copies parameters into the model > 5. Validation/Interceptors fire > 6. Authentication Interceptor detects timed out session, returns LOGIN > 7. User presented with login page > 8. OSIV filter closes, changes from #4 persisted. > > I then created a simple t

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
ssion, returns LOGIN > 7. User presented with login page > 8. OSIV filter closes, changes from #4 persisted. > > I then created a simple test action where I load a persist entity from the > DB in a ModelDriven action, I call the action passing parameters that are > properties on

RE: Re : Re : ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
8. OSIV filter closes, changes from #4 persisted. I then created a simple test action where I load a persist entity from the DB in a ModelDriven action, I call the action passing parameters that are properties on the entity. Then the execute() method does nothing more than return SUCCESS which

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
In your struts mapping file : /error.jsp hope it will help you ____ - Message d'origine De : "CRANFORD, CHRIS" À : Struts Users Mailing List Envoyé le : Mer 9 mars 2011, 12h 34min 32s Objet : ModelDriven

ModelDriven & Hibernate Entities

2011-03-09 Thread CRANFORD, CHRIS
I had started down a path of using the ModelDriven interface from Struts because I find it really helps maintain a class action class without large numbers of get/set methods for screens that contain a lot of form fields. However, I am finding at least with how I have attempted to approach

RE : RE: Multiple field and modelDriven

2011-02-18 Thread Matthieu.Marc
De : Maurizio Cucchiara [maurizio.cucchi...@gmail.com] Date d'envoi : jeudi 17 février 2011 10:41 À : Struts Users Mailing List Objet : Re: RE: Multiple field and modelDriven I'm not sure, maybe type conversion is the answer to your question. Have you already seen this [1]?

Re: RE: Multiple field and modelDriven

2011-02-17 Thread Maurizio Cucchiara
chi...@gmail.com] > Envoyé : jeudi 17 février 2011 10:31 > À : Struts Users Mailing List > Objet : Re: Multiple field and modelDriven > > Pardon, I didn't see model driven stuff. > Have you tryied to change your address field to an array string or a simple collection? > &g

RE: Multiple field and modelDriven

2011-02-17 Thread Matthieu.Marc
hiara [mailto:maurizio.cucchi...@gmail.com] Envoyé : jeudi 17 février 2011 10:31 À : Struts Users Mailing List Objet : Re: Multiple field and modelDriven Pardon, I didn't see model driven stuff. Have you tryied to change your address field to an array string or a simple collection? Maurizio

Re: Multiple field and modelDriven

2011-02-17 Thread Maurizio Cucchiara
gt; > I have made a form in my JSP and an action which is modelDriven with my User class. > > Public class User implements modelDriven{}... > > My question is about multiple field with same id in my JSP. My User class have a field named streetaddresses (which is linked with an active

RE: Multiple field and modelDriven

2011-02-17 Thread Matthieu.Marc
I used the struts 2.2.1.1 version -Message d'origine- De : Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] Envoyé : jeudi 17 février 2011 10:28 À : Struts Users Mailing List Objet : Re: Multiple field and modelDriven Which struts version? Maurizio Cucchiara Il giorno 1

Re: Multiple field and modelDriven

2011-02-17 Thread Maurizio Cucchiara
Which struts version? Maurizio Cucchiara Il giorno 17/feb/2011 09.07, ha scritto: > Hi everybody, > > I have a class named User which contain some information about user . > > I have made a form in my JSP and an action which is modelDriven with my User class. > > Public

Multiple field and modelDriven

2011-02-17 Thread Matthieu.Marc
Hi everybody, I have a class named User which contain some information about user . I have made a form in my JSP and an action which is modelDriven with my User class. Public class User implements modelDriven{}... My question is about multiple field with same id in my JSP. My User class have

Re: Interceptor or preparable/ModelDriven or ActionChain ?

2011-02-14 Thread Barry L. Kline
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/14/2011 11:33 AM, Paweł Wielgus wrote: > Hi Barry, > maybe custom converter will suits your needs? > > http://struts.apache.org/2.2.1.1/docs/type-conversion.html > > Best greetings, > Paweł Wielgus. Thank you very, very much! That looks like

Re: Interceptor or preparable/ModelDriven or ActionChain ?

2011-02-14 Thread Paweł Wielgus
book and from what I can see, my > options look to be: > > 1) Use an interceptor both before and after to do the formatting. > 2) Use the ModelDriven / Preparable interfaces to do the deed > > or because I need to get data from a database prior to a display: > > 3) use Ac

Interceptor or preparable/ModelDriven or ActionChain ?

2011-02-14 Thread Barry L. Kline
, my options look to be: 1) Use an interceptor both before and after to do the formatting. 2) Use the ModelDriven / Preparable interfaces to do the deed or because I need to get data from a database prior to a display: 3) use Action chaining, getting the data first in one Action, then chaining to ano

Struts2 question: ModelDriven +

2011-01-28 Thread Agoston Bejo
Hey there, here's my problem: a) the action: public class SomeAction ... implements ModelDriven { ... public SomeModel getModel() {...} ... } b) the model: public class SomeModel implements Serializable { ... public List> getMessageTypes() { ... } public String getRag

ModelDriven with List

2011-01-27 Thread Jan Fröhlich
Hi After we found a lean solution with ModelDriven in our application to build CRUD functions with simple Objects, I have now a problem with extending it, to be usable with lists. What I want to do is, make the getModel() method in my ModelDriven Action having a return type like List or

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

ModelDriven - Best Practices

2011-01-24 Thread CRANFORD, CHRIS
I recently implemented an action using the ModelDriven interface. Since my Domain Object doesn't contain anything beyond properties that are mapped to columns in the associated table; it made it easy to pass the data between the DAO, Service, and View tiers. o Creation During cre

struts2 modeldriven how ot modify the model object?

2010-07-29 Thread roievil
implements ModelDriven, I use an edit() method to set my Survey object as the model, and i manage to populate my jsp form ok. But when i submit the form my saveOrUpdate() method receives another Survey object as the one i set in edit() !? a new Survey Object that has the 'freq' or &#

RE: Usecases for ModelDriven interface

2009-05-05 Thread Martin Gainty
n 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. > From: unmesh_jo...@hotmail.com > To: user@struts.apach

Usecases for ModelDriven interface

2009-05-05 Thread Unmesh joshi
Hi, I am using struts2 on my current project and find ModelDriven interface very inconvenient. The intent of the interface is documented as, "it helps directly populating domain model". But if the domain model is little more complex than a simple bean, it becomes very inconvinient

Re: how to read JSON data properties from struts2-ModelDriven?

2009-04-02 Thread Nils-Helge Garli Hegvik
s-H [1] - http://cwiki.apache.org/S2PLUGINS/json-plugin.html 2009/4/2 Junhua gao : > > hello, > who can please tell me how to read JSON properties from struts2-ModelDriven? > > > $.getJSON('LicenseeQueryJsonAction',{licenseeID:licenseeid},function(data){)) > >

how to read JSON data properties from struts2-ModelDriven?

2009-04-02 Thread Junhua gao
hello, who can please tell me how to read JSON properties from struts2-ModelDriven? $.getJSON('LicenseeQueryJsonAction',{licenseeID:licenseeid},function(data){)) data is a BEAN (VO), how to read its

Re: jsp page not display data when using ModelDriven---class can get parameter from jsp file

2009-03-31 Thread Junhua gao
chy Barroso > 主题: Re: jsp page not display data when using ModelDriven---class can get > parameter from jsp file > 收件人: "Struts Users Mailing List" > 日期: 2009年4月1日,周三,上午2:19 > The answer is 42. If you explain what > the problem is, the answer might vary. > &

RE: jsp page not display data when using ModelDriven---class can get parameter from jsp file

2009-03-31 Thread Martin Gainty
provided. > Date: Tue, 31 Mar 2009 14:19:48 -0400 > Subject: Re: jsp page not display data when using ModelDriven---class can get > parameter from jsp file > From: musa...@gmail.com > To: user@struts.apache.org > > The answer is 42. If you explain what the problem

Re: jsp page not display data when using ModelDriven---class can get parameter from jsp file

2009-03-31 Thread mitch gorman
the 14th report of this sort of thing?! get with the program, man! > 2009/3/31 Junhua gao : >> public class SortTiersAction extends BaseActionS2 implements >> ModelDriven { >> SortTierService sorttierservice = new SortTierService(); >> private SortTierVO sorttiervo

Re: jsp page not display data when using ModelDriven---class can get parameter from jsp file

2009-03-31 Thread Musachy Barroso
The answer is 42. If you explain what the problem is, the answer might vary. musachy 2009/3/31 Junhua gao : > > public class SortTiersAction extends BaseActionS2 implements ModelDriven { > SortTierService sorttierservice = new SortTierService(); > private SortTierV

jsp page not display data when using ModelDriven---class can get parameter from jsp file

2009-03-31 Thread Junhua gao
public class SortTiersAction extends BaseActionS2 implements ModelDriven { SortTierService sorttierservice = new SortTierService(); private SortTierVO sorttiervo = new SortTierVO(); public void setModel(SortTierVO sorttiervo) { this.sorttiervo = sorttiervo

Setting a List in a ModelDriven action

2009-02-04 Thread Richard Gundersen
Hi I've got a ModelDriven action. The model is an object, say 'Parent' which contains some simple properties, but also a List of 'Children' objects. Rendering the list of Children in a form is easy enough, but I was wondering if there is a nice way to *set* the list bac

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

2008-12-17 Thread Tobias M.
interceptor checks the actionErrors and > fieldErrors and, if any of them is not empty, performs a Hibernate/JPA > session clear. > > Best regards, > > Fabiano Franz > http://fabianofranz.com > http://literar.org > http://pribi.com.br > > -- View this mes

SCOPED-MODELDRIVEN

2008-11-17 Thread wskent
Does anyone have a good example of using the SCOPED-MODELDRIVEN interceptor, or know of a link to a good example? -- View this message in context: http://www.nabble.com/SCOPED-MODELDRIVEN-tp20546954p20546954.html Sent from the Struts - User mailing list archive at Nabble.com

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

ModelDriven interceptor after execute

2008-10-28 Thread Alexander Baetz
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 would be to put the execute code into prepare and use the paramsprepareparams-stack instead of the default-stack. Is th

Re: [S2] ModelDriven: model not pushed on stack?

2008-08-27 Thread Dave Newton
http://struts.apache.org/2.x/docs/editing-the-documentation.html Dave --- On Wed, 8/27/08, Pierre Thibaudeau <[EMAIL PROTECTED]> wrote: > From: Pierre Thibaudeau <[EMAIL PROTECTED]> > Subject: Re: [S2] ModelDriven: model not pushed on stack? > To: "Struts Users Mailin

Re: [S2] ModelDriven: model not pushed on stack?

2008-08-27 Thread Pierre Thibaudeau
2008/8/27 Jeromy Evans <[EMAIL PROTECTED]> > > I vaguely an update or concern recently relating to automatic refreshing > of the model in the ModelDriven interceptor; the interceptor gets the > model and re sets it on the stack when it thinks it should. I followed through yo

Re: [S2] ModelDriven: model not pushed on stack?

2008-08-27 Thread Pierre Thibaudeau
2008/8/27 Jeromy Evans <[EMAIL PROTECTED]> > There is something else at play here. If you put a break-point in the > interceptor it should become clear. > > I vaguely an update or concern recently relating to automatic refreshing of > the model in the ModelDriven interce

Re: [S2] ModelDriven: model not pushed on stack?

2008-08-26 Thread Wes Wannemacher
Action */ > /*/ > public class StillFailingAction extends ActionSupport implements > ModelDriven, Preparable { > private SmallObject obj; > public SmallObject getModel() { return obj; } > public void prepare() { obj = new SmallObject(""); } >

Re: [S2] ModelDriven: model not pushed on stack?

2008-08-26 Thread Pierre Thibaudeau
gAction */ /*/ public class StillFailingAction extends ActionSupport implements ModelDriven, Preparable { private SmallObject obj; public SmallObject getModel() { return obj; } public void prepare() { obj = new SmallObject(""); } public St

Re: [S2] ModelDriven: model not pushed on stack?

2008-08-26 Thread Wes Wannemacher
thod. I am very tempted to > call it a severe bug (for Struts 2.1.2)... > > To make things simple, I produced a test case (see below): two very simple > ModelDriven Action classes. The first one works as expected, and pushes the > Model ("SmallObject") on top of the Value

Re: [S2] ModelDriven: model not pushed on stack?

2008-08-26 Thread Jeromy Evans
There is something else at play here. If you put a break-point in the interceptor it should become clear. I vaguely an update or concern recently relating to automatic refreshing of the model in the ModelDriven interceptor; the interceptor gets the model and re sets it on the stack when it

Re: [S2] ModelDriven: model not pushed on stack?

2008-08-26 Thread Pierre Thibaudeau
haviour centres around the execute() method. I am very tempted to call it a severe bug (for Struts 2.1.2)... To make things simple, I produced a test case (see below): two very simple ModelDriven Action classes. The first one works as expected, and pushes the Model ("SmallObject") on to

[S2] ModelDriven: model not pushed on stack?

2008-08-25 Thread Pierre Thibaudeau
I have successfully used the ModelDriven interface again and again. But suddenly, on my most recent action, the model does not find its way to the top of the stack, and I cannot find where the problem might be. This is what I know about ModelDriven setup: 1) Action must implement ModelDriven

Re: How to resolve list property for ModelDriven Action?

2008-08-12 Thread Dave Newton
--- On Mon, 8/11/08, Haulyn R. Jason wrote: > I mean , I know how to populate data to a select tag, and I > know how to collection data from a select tag, but the problem > is: If the list I want to collection from select tag is not a > simple data type(String), but it's another object, how can I

Re: How to resolve list property for ModelDriven Action?

2008-08-11 Thread Haulyn R. Jason
Dave Newton : Oh. So what are you asking then? How to create a select list? How to use the tag? Dave --- On Mon, 8/11/08, Haulyn R. Jason <[EMAIL PROTECTED]> wrote: From: Haulyn R. Jason <[EMAIL PROTECTED]> Subject: Re: How to resolve list property for ModelDriven Action?

  1   2   >