2007/2/23, David H. DeWolf <[EMAIL PROTECTED]>:
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);
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.
Would you rather introduce a TilesRequest and TilesResponse object?
Absolutely not, the problem is not at TilesRequestContext level, but in the original request. Antonio
David Antonio Petrelli wrote: > 2007/2/23, David H. DeWolf <[EMAIL PROTECTED]>: >> Instead of passing retrieving the request and response from the >> pageContext and passing them through, I would use the pageContext as the >> request and response and let the (pluggable) jsp factory recognize it >> and create it's context using it instead of the req/res pair. > > > Hmm... I don't like the idea of using the concept of request/response > to the PageContext. > Moreover, we should provide a way of considering all possible > combinations of controller (I mean servlet, portlet, etc.) and view > (JSP, FreeMarker...) technologies, and the single factory > (TilesContextFactory) can only help with the most common case. > > Antonio >
