Ya, kinda... for how we use model driven we probably should be using the
scoped version, but that's not the case. We have an abstract action that
handles the validation/refreshing/storing of the model in the session. It's
overkill, but it's heavily unit tested and robust, so we continue using it.
You mean like ScopedModelDriven?
I'm a big fan of presenters/decorators most of the time, although I'll
admit I'm also lazy a lot and just use a "real" model and tags :/
Dave
On Mon, Oct 7, 2013 at 5:08 PM, Mike Menzies wrote:
> Hmm.. ya, that makes a lot of sense. I think I will try this ap
Hmm.. ya, that makes a lot of sense. I think I will try this approach going
forward. We sort of bastardize model-driven a little bit by having a layer
that stores and retrieves the model in the session on every request (among
other things)... which in most cases is not needed.
You've given me some
"The" model? "The" model is whatever you want exposed to the view layer;
there's nothing that states it has to be the lowest-level domain object
available--it's just "that which you wish exposed to your rendering".
I don't usually use the built-in validations (for a variety of reasons) so
I'd have
I can see that approach working well. You don't feel that it's misusing
ModelDriven... by not directly returning the model? Also, if you are
validating your model, would adding @VisitorFieldValidator to the domain
getter within the decorator work the same?
On Mon, Oct 7, 2013 at 3:43 PM, Dave Ne
Then I'm not sure I see the point; `ModelDriven` would do the same, but
you'd expose the decorator, not the underlying domain object. I tend
towards the same pattern, but delegate directly to a domain model, so I can
precisely control access (and document) at the view level.
Dave
On Mon, Oct 7,
Yes. That's pretty much exactly what it is.
On Mon, Oct 7, 2013 at 3:35 PM, Dave Newton wrote:
> So it's a presenter/decorator?
>
> Dave
>
>
>
> On Mon, Oct 7, 2013 at 4:26 PM, Mike Menzies wrote:
>
> > Hello,
> >
> > My name is Mike, and I work for a fairly large company that uses Struts 2
>
So it's a presenter/decorator?
Dave
On Mon, Oct 7, 2013 at 4:26 PM, Mike Menzies wrote:
> Hello,
>
> My name is Mike, and I work for a fairly large company that uses Struts 2
> for most of its web apps. Some of these web apps are quite large, and one
> in particular has grown into a monster.
Hello,
My name is Mike, and I work for a fairly large company that uses Struts 2
for most of its web apps. Some of these web apps are quite large, and one
in particular has grown into a monster. In my ongoing efforts to clean up
this project, I have developed what I like to call a JspHelper. Befor