Yes, I've already implemented that piece of it. The UrlBuilder implementation can automatically be injected via the @Inject annotation, just like the actionmapper. Right now my ServletUrlBuilder and PortletUrlBuilder use the static UrlHelper and PortletUrlHelper under the hood, but eventually we could move that logic into the builders themselves.
Tom

Don Brown wrote:
Cool, but please, please, please find some way to avoid a static helper class :) BTW, it would be cool if the urlbuilder would be able to automatically discover any other objects that want a shot at the URL building process. See how the TagLibrary or TemplateEngine classes are discovered for examples.

Don

Tom Schneider wrote:
Ok, I had a little time tonight to put together a preliminary design for the URLBuilder. Here's what I have so far for the interface:

URLBuilder
+buildURL(CustomAttributes, ActionMapping) // this method is for when an action, namespace, method, etc. is supplied +buildURL(CustomAttributes, String) // this method is for when the url value itself is provided

My expectation is each builder would use the default ActionMapper under the hood. From an infrastructure standpoint, it would be configured and injected the same as the ActionMapper is.

The custom attributes that I've come up with so far are:
CustomPortletAttributes:
RenderRequest, RenderResponse
windowState
portletUrlType
portletMode

CustomServletAttributes:
HttpServletRequest, HttpServletResponse
encodeParams
includeContext
scheme

I'm not exactly sure how we'll build these up. Either the client code of the builder will have to know how to build each type or we'll need a static helper class that does most of the work. I'll probably be taking a stab at implementation this weekend.
Tom


Patrick Lightbody wrote:
Tom,
How is this coming along? I imagine that some of this work would also relate to the ActionMapper interface, since it does have some responsibilities for rendering out URLs. Keep us posted.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=59916&messageID=119811#119811


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




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




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




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

Reply via email to