Hi
In some cases, extval wraps renders but that has a side effect: all
renderers annotated with @ListenerFor are not registered properly. That
means h:outputScript / h:outputStylesheet stop working and there are not
relocated anymore.
So if you have a page like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
>
<h:head>
</h:head>
<h:body>
<h:form id="mainForm">
<h:panelGrid columns="2">
<h:outputLabel for="outname" value="Name: " />
<h:inputText id="outname" value="#{helloWorld.name}"/>
<h:outputLabel for="inname" value="Please enter your name" />
<h:inputText id="inname" value="#{helloWorld.name}"/>
<h:commandButton id="button1" type="button" value="Ajax Update">
<f:ajax execute="mainForm" render="outname"/>
</h:commandButton>
<h:commandButton id="button2" value="Normal Submit"/>
<h:messages showDetail="true" showSummary="false"/>
</h:panelGrid>
</h:form>
</h:body>
</html>
With extval on the classpath, the script to be added on <head> by f:ajax tag
handler is not relocated. Reproduce it is very easy, just add to a existing
example this jars:
<dependency>
<groupId>org.apache.myfaces.extensions.validator</groupId>
<artifactId>myfaces-extval-core</artifactId>
<version>2.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.extensions.validator.validation-modules</groupId>
<artifactId>myfaces-extval-bean-validation</artifactId>
<version>2.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.extensions.validator.validation-modules</groupId>
<artifactId>myfaces-extval-property-validation</artifactId>
<version>2.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.2.GA</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<type>jar</type>
</dependency>
The solution could be create some wrapper for Application object that takes
into account this case on ExtVal.
regards,
Leonardo Uribe