This is basically the same technique I was outlining.. just implemented using a Tapestry RequestFilter, instead of a normal J2EE Filter. If done properly, there should be no more modifications required within tapestry.

Robert Zeigler wrote:
Not necessarily.
If you intercept the request via a RequestFilter, ordered early, then you can pull the site information out that you want, right (and store it someplace useful that you'll use later on when rendering; like in an ASO). And then you can wrap the original request with a custom implementation that returns the site-less path that tapestry will use to determine which page/component to render. The page to render isn't determined until control flows to the MasterDispatcher, from RequestFilter, so intercepting via RequestFilter should let you do this.

From your other posts, it looks like you've already got the link implementation in place to add the site /back/ into any links generated for the next request. Between the request filter and the link implementation, you should be set...? (Apologies, I haven't been following this conversation very closely, so, if I'm missing something, fill me in).

Robert

On Feb 18, 2009, at 2/1811:02 AM , xfile80303 wrote:


Hi Peter,

But, if I follow you correctly, there will still need to be a class, even if empty, with the desired path as its package for every "site." I'm trying to
make the site a dynamic configuration which does not need the addition of
more pages.

Cheers,

Levi


Peter Stavrinides wrote:

They will all use the same pages and page flow, but will key
off of the site name
Sorry but I don't get this comment? I mean what exactly are you trying to
do?... Tapestry uses composition, so construct components instead of
pages,, embed those components in your pages (just empty containers
really, with different settings, "parameters", you duplicate nothing this
way), set a site parameter in your component according, whose value
corresponds with the containing page (your site /sub-section), and thats
it.

                         component A (shared)
                        /           \
page 1 (@parameter site = A)     page 2 (@parameter site=B)

cheers,
Peter


--
View this message in context: http://n2.nabble.com/-T5--Struggling-With-Concepts-tp2324920p2348095.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to