[jsr-314-open] JSF 2.0/Facelets public APIs: ComponentHandler

Andy Schwartz andy.schwartz at ORACLE.COM
Thu Mar 5 11:41:01 EST 2009


Ed Burns wrote On 3/4/2009 10:44 PM ET:
>  Ok, can you prepare a change-bundle for this approach, the "four very
>  small contracts approach", and attach it to issue jsf-spec-public
>  274?

Awesome, thanks for letting me get this in Ed!

I have uploaded the change-bundle to 274 with the following comments:

> The jsf-andy.patch addresses additional requirements raised by Oracle/ADF Faces.
>  ADF Faces needs a way to find child handlers by type.  In particular, ADF Faces
> needs to be able to locate the following types of handlers by type:
>
> - TextHandlers
> - AttributeHandlers
> - FacetHandlers
>
> Previously this was possible using the Facelets 1.1.x
> TagHandler.findNextByType() API and referencing the above handler types.
> However, both findNextByType() and the above handlers have been moved out of the
> public API in JSF 2.0.
>
> One option would be to move findNextByType() and the above handler
> implementations into the public API, but in order to keep the amount of
> implementation in jsf-api small, we instead decided to add the following four
> interfaces:
>
> 1. javax.faces.webapp.pdl.facelets.tag.TextHandler
>
> This interface is identical to Facelets 1.1.x version.  It defines two methods:
>
> - public String getText();
> - public String getText(FaceletContext ctx);
>
>
> 2. javax.faces.webapp.pdl.facelets.tag.AttributeHandler:
>
> This is a new interface that defines a single method:
>
> - public String getAttributeName(FaceletContext ctx);
>
> 3. javax.faces.webapp.pdl.facelets.tag.FacetHandler
>
> This is a new interface that defines a single method:
>
> - public String getFacetName(FaceletContext ctx);
>
> 4. javax.faces.webapp.pdl.facelets.tag.CompositeFacletHandler
>
> This is a new interface that defines a single method:
>
> - public FaceletHandler[] getHandlers();
>
> Note that we decided to introduce #4 as an alternative to introducing a public
> findNextByType(), as CompositeFaceletHandler is sufficient to allow users to
> scan child FaceletHandlers.
>
> The attached patch introduces these new contracts, and also updates the jsf-ri
> accordingly.
>
> Running "ant test.with.container.refresh" passes successfully.
>

Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20090305/eb30d1e0/attachment.html 


More information about the jsr-314-open-mirror mailing list