[
https://issues.apache.org/jira/browse/EXTVAL-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718368#action_12718368
]
Gerhard Petracek commented on EXTVAL-45:
----------------------------------------
hi,
is that a new behaviour? i've successfully tested extval with a4j in the past.
if there is a ClassCastException, you can use the generic-support module of
extval.
anyway, you don't need to patch this impl. - just register a custom
RenderKitWrapperFactory which creates an a4j aware renderkit.
e.g.:
public class StartupListener extends AbstractStartupListener
{
protected void init()
{
ExtValContext.getContext().getFactoryFinder().getFactory(FactoryNames.RENDERKIT_WRAPPER_FACTORY,
AbstractRenderKitWrapperFactory.class).addRenderKitWrapperFactory(new
AbstractRenderKitWrapperFactory()
{
protected RenderKit createWrapper(RenderKit renderKit)
{
//return your custom renderkit
}
});
}
}
would you mind to add your code and donate it as extval add-on at os890?
(due to the a4j dependency)
thx & regards,
gerhard
> Richfaces ajax and RendererWrapper
> ----------------------------------
>
> Key: EXTVAL-45
> URL: https://issues.apache.org/jira/browse/EXTVAL-45
> Project: MyFaces Extensions Validator
> Issue Type: Improvement
> Reporter: Stefan Meyer
>
> I had to override EtvalRenderKit to make A4J-Ajax and Extval play nice.
> ExtValRenderKit wraps any Renderer. A4J relies on the root renderer to be of
> type AjaxViewRootRenderer. Here is my patch:
> @Override
> public Renderer getRenderer(final String family, final String
> rendererType)
> {
> Renderer renderer = wrapped.getRenderer(family, rendererType);
> if (renderer != null)
> {
> // dont wrap the ajax view renderer
> if (renderer instanceof AjaxViewRootRenderer)
> {
> return renderer;
> }
> else
> {
> return renderer instanceof
> ExtValRendererWrapper ? renderer : createWrapper(renderer);
> }
> }
> if (this.logger.isWarnEnabled())
> {
> this.logger.warn("no renderer found for family " +
> family + " and type " + rendererType);
> }
> return renderer;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.