On Wed, Sep 10, 2008 at 3:25 PM, salomoko wrote:
>
> All,
>
> I'm having a hardtime wrapping my head around this, how would you add
> different form controls in a view depending on
> a certain configuration in Coldspring.xml? I've setup a simple config
> bean, and depending on an option, I generate
> different form controls...

You could use an object that you give the view, which reads the
configuration settings, and does stuff.

Basically a renderer of sorts.  Inject the config object, and then
give your render to the view.

There's a lot of ways, and it depends on what you're after as to
what's best for you, probably.

> And also, Im creating this actionpack with everything involved (views,
> controllers, models), I've noticed
> on the couple actionpacks I've reviewed, most don't have views...

The new ones in MG3 do.  There are a couple of features about MG3 that
make this much easier to do.  template paths (or whatever their
called) being one of them.

Are you aiming strictly at MG?  If not, you can code your "views"
yourself, in your model, and then the actionpack will be more
portable.

Basically, using a renderer of sorts.  Heh.  Same answer to both
questions, in the end.

YMMV

-- 
Freedom would be not to choose between black and white but to abjure
such prescribed choices.
Theodor Adorno

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---

Reply via email to