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. e.g

RE: Usecases for ModelDriven interface

2009-05-05 Thread Martin Gainty
pour le contenu fourni. From: unmesh_jo...@hotmail.com To: user@struts.apache.org Subject: Usecases for ModelDriven interface Date: Tue, 5 May 2009 17:47:09 + Hi, I am using struts2 on my current project and find ModelDriven interface very inconvenient. The intent

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-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: user@struts.apache.org Sent: Monday, June 11, 2007 8:51 PM Subject: RE: ModelDriven interface After working on this for a while, I

ModelDriven interface

2007-06-09 Thread Matt.Luce
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 by getModel(). If I explicitly declare the getXxx

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 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 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 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 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'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

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. But,

[s2] Making LazyDynaBean work with ModelDriven interface

2006-12-05 Thread Mark Shifman
Some folks may be as pig-headed as me or may need to use LazyDynaBeans as they are translating from struts1 to struts2. After fooling around, I figured it out but it is pretty clear to me this is not the way to go. Below is a simple example. public final class MyAction extends ActionSupport

Re: [s2] Making LazyDynaBean work with ModelDriven interface

2006-12-05 Thread Mark Menard
On 12/5/06 12:25 PM, Mark Shifman [EMAIL PROTECTED] wrote: 2. The textfield seems to get a String[] rather than a String and I don't have any idea how to do it differently. I don¹t know if you can do this because I've never really worked with Struts 1. Can you make the Map in your form a

[s2] LazyDynaBean and ModelDriven interface

2006-12-04 Thread Mark Shifman
Does anybody have an example of using a LazyDynaBean with the ModelDriven interface? http://struts.apache.org/2.x/docs/struts-1-solutions.html implies that it should work. I have a simple action: public final class MyAction extends ActionSupport implements ModelDriven{ private LazyDynaBean

Re: [s2] LazyDynaBean and ModelDriven interface

2006-12-04 Thread Mark Shifman
Mark Shifman wrote: Does anybody have an example of using a LazyDynaBean with the ModelDriven interface? http://struts.apache.org/2.x/docs/struts-1-solutions.html implies that it should work. I have a simple action: public final class MyAction extends ActionSupport implements ModelDriven