Hi Cedric,

I'm trying to fit this in the context of struts' MVClike framework...  Say I
wanted to re-write the Invoice example such that I not only associated the
billing/shipping address information with a tile but also wanted to separate out
the logic so that my 'addressController' would have the responsibility of
populating the appropriate address in InvoiceForm rather than pushing that
responsibility into the editInvoice Action.  Is that feasible?

Then Struts updates the InvoiceForm Action Form from editInvoice.jsp... but
editInvoice would effectively ignore populating addresses choosing rather to allow
the address controller to do that work...  I'm not totally sure if this would
result in a clean implementation but am working on the assumption that it would be
useful to be able to drop tiles in where desired or even swap out tiles with ones
that display the data differently.. and do the same with their respective
controllers.

So as a rather poor example: if my invoice has several addresses and the concept
of a current address I could drop in the single editor for a app that prefers to
show only the current address, or drop in a table-based editor for an app that
wants the ability to edit a set of addresses-- the specific controllers would know
how to get the data into and out of the appropriate parts of the invoice form and
underlying database.

Does this make sense??

Cheers,
Jon

Cedric Dumoulin wrote:

>   Hello,
>
>   Tiles support controller for each individual Tile.
>   This controller's role is to prepare data to be rendered by the tile.
>   Syntax is as follow :
>
>  <definition name="examples.rssChannel.offline.body"
> path="/examples/tiles/rssChannels.jsp"
>      controllerUrl="/examples/controller/rssChannel.do" >
>   ..
>   or
>
>  <definition name="examples.rssChannel.offline.body"
> path="/examples/tiles/rssChannels.jsp"
>      controllerClass="a.class.Name" >
>
>   You can find an example of use in tiles-doc.war or struts-tiles.war :
>
>    *   /examples/rssChannels.jsp
>    *   / test/testController.jsp
>
>   More documentation is needed ;-(
>
>   Cedric
>
> Jon Ferguson wrote:
>
> > Hey guys,
> >
> > I read in the tiles doc that you can associate a controller with each tile.
> > However, I cannot find an example of how this is done.
> >
> > Any pointers?
> >
> > Thanks in advance,
> > Jon
> >
> >   ------------------------------------------------------------------------
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to