Shale And ADF

Just take a look at http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/installation.html

note this has not been tested with trinidad, but you'll surely have the same issues

Do not install ADF with Shale validator, or you'll have the following error whenever you call your JSF page.

java.lang.IllegalStateException: No AdfRenderingContext
        at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:154)
        at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)

If you want client side validation with ADF, just use ADF validators.

Here's an extract from Gary VanMatre explaining this issue : Both ADF and Shale Validator use a custom RenderKit. In Shale Validator's case, it decorates the original so that it can decorate renderers. This is needed because Shale is not a widget library and we are not interested in build a suite of components from the ground up as you will see with ADF. This trick allows us to modify a renderers behavior without rewritting every renderer that is a Input or Command component.

Assuming that ADF has the same validator support as Trinidad, you might rather look at their's which is couple with their components and provides client side validation.

For trinidad : tr:validateRegExp - Validate expression using java regular expression syntax. tr:validateLongRange - Validate that the date entered is within a given range. tr:validateLength - Validate that the date entered is within a given range. tr:validateDoubleRange - Validate that the date entered is within a given range. tr:validateDateTimeRange - Validate that the date entered is within a given range. tr:validateDateRestriction - Validate that the date entered is within a given restriction. tr:validateByteLength - Validate the byte length of strings when encoded.

For ADF : just use the af prefix instead of tr.

ADF and Shale Tiles (or MyFaces Tiles) cannot be used together.

The error is generated whenever the request is dispatched to a tile definition. Note that no error is generated when the request is directly dispatched to the JSP page.

Error Stack Trace :

[31/01/07 12:42:56:953 CET] 0000003c ServletWrappe E   SRVE0068E: Impossible d'appeler la m├ęthode service() sur le servlet /simple.jsp. Exception : java.lang.IllegalStateException: No AdfRenderingContext
        at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:154)

ADF must use its own ViewHandler in order ot render its components. Tiles use its own TilesViewHandler (ShaleTiles and MyFaces Tiles) to dispatch the request to a Tile definition, and short circuits ADFViewHandler.


ShaleAndADF (last edited 2009-09-20 21:52:45 by localhost)