tiles-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: Removing JSP dependencies (TILES-114)
Date Fri, 23 Feb 2007 13:26:03 GMT
2007/2/23, David H. DeWolf <ddewolf@apache.org>:
> Antonio Petrelli wrote:
> > 2007/2/23, David H. DeWolf <ddewolf@apache.org>:
> >> I guess I look at it differently.  What we requires is a request object
> >> and a response object.  In jsp, the page context acts as both.
> >
> > What about using varargs then? I mean using the form:
> > render(Object... contextItems, String definition);
> Maybe . . .though I think it would have to be:
> render(String definition, Object. . .contextItems);

Agreed! I will follow this path then.

> I'm still not convinced that request and response doesn't make sense,
> but since we've already gone with generic objects for request items
> (which I like), I could be convinced that we should make number of
> req/res objects variable as well.

If you think that, for example, FreeMarker needs a request, a response
and a Writer, then probably you will be "more" convinced :-)

> >> I'm not sure how all controllers and view can't comply with that?
> >
> > Mmm... I've got another idea. Think of a TilesContextFactory that
> > cycles through a list of TilesContextFactoryItems (name changeable :-)
> > ), where each of them can recognize only one type of request/response
> > pair, and that return a TilesRequestContext if it recognizes them (or
> > null if not). Suppose that this list can be configurable: I think that
> > we solved all of our problems.
> > Together with varargs we can satisfy all needs.
> Yes, I like this idea very much, though I think it remains an
> implementation choice of the container.  The basic container should
> definitely use this approach.

Agreed. For the moment I will refactor the BasicTilesContextFactory to
work as it works now, but I will open an issue to be sure that will
address it.
All I want to do now is using varargs where needed.

Thank you

View raw message