[JBoss Seam] - Seam Custom Validation and Ajax4JSF v1.1.1
by rhardy5014
Hi,
I am using JBOSS 4.2.0 and Seam 1.2.1GA. I have a web application which performs some ajax-based validation of form elements using custom seam (hibernate) validators e.g.
<s:decorate id="messageFullTextDecoration">
| <h:inputText styleClass="#{invalid?'invalidField searchInput':'searchInput'}"
| value="#{searchManager.messageSearch.fullText}">
| <s:validate/>
| <a4j:support event="onblur"
| reRender="messageFullTextDecoration"
| eventsQueue="generalEventQueue"
| oncomplete="releaseAjax();"/>
| </h:inputText>
| </s:decorate>
With a seam (hibernate) custom validator attached to the property in the seam backing bean as shown below:
@FullText
| private String fullText = null;
This all works fine when I was using Ajax4JSF V1.1.0 and Richfaces 3.0.0
I decided to try out the new version of rich faces (3.0.1), which comes with Ajax4JSF v1.1.1.
In upgrading, I did not perform ANY other actions other than to replace the old jar files for a4j and richfaces with the new ones, rebuild and redeploy my project.
After redeployment, the onblur event still creates an ajax request, but the custom validation seems to be not even called.
I have also found that if I add ajaxSingle="true" to the a4j:support tag, then the validation works as expected.
e.g.
<s:decorate id="messageFullTextDecoration">
| <h:inputText styleClass="#{invalid?'invalidField searchInput':'searchInput'}"
| value="#{searchManager.messageSearch.fullText}">
| <s:validate/>
| <a4j:support event="onblur"
| reRender="messageFullTextDecoration"
| eventsQueue="generalEventQueue"
| ajaxSingle="true"
| oncomplete="releaseAjax();"/>
| </h:inputText>
| </s:decorate>
But, when I submit the whole form, by clicking on an a4j:commandButton, again, the validation is not performed.
Can anyone help? Are there some other actions I need to perform when upgrading to this version of a4j?
Thanks,
Richard.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055970#4055970
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055970
18Â years, 10Â months
[JBoss Seam] - Re: Which view handler JBoss 4.2 needs for facelets ?
by mailmustu
hi Pete,
Thanks for the quick reply.
I get a "java.lang.UnsupportedOperationException" in both cases.
Can you please tell me which jars "should be there" and "should not be there" (to avoid duplicate references) in the EAR.
Also what changes my web.xml and faces-config.xml files need to use these view handlers.
here is the exception snippet:
| 06:49:12,132 INFO [TomcatDeployer] deploy, ctxPath=/FpRegistration, warUrl=.../tmp/deploy/tmp34553FpRegistration.ear-contents/FpRegistration-exp.war/
| 06:49:12,960 ERROR [STDERR] java.lang.UnsupportedOperationException
| 06:49:12,960 ERROR [STDERR] at com.sun.faces.config.ConfigureListener$InitFacesContext.getViewRoot(ConfigureListener.java:1690)
| 06:49:12,960 ERROR [STDERR] at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:113)
| 06:49:12,960 ERROR [STDERR] at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277)
| 06:49:12,960 ERROR [STDERR] at com.sun.faces.util.Util.createInstance(Util.java:477)
|
| 06:49:13,101 ERROR [[/FpRegistration]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
| javax.faces.FacesException: java.lang.UnsupportedOperationException
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:408)
| at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
|
Thanks,
Mustafa
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055968#4055968
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055968
18Â years, 10Â months
[JBoss Portal] - log4j classcastexception with alfresco WAR
by advaittrivedi
Hi,
I have alfresco war deployed. When I start server it gives following exception:
=========================================
16:03:29,799 ERROR [STDERR] log4j:ERROR Could not create level [TRACE]. Reported error follows.
16:03:29,799 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.XLevel
16:03:29,799 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parseLevel(DOMConfigurator.java:512)
16:03:29,799 ERROR [STDERR] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:428)
....
16:03:29,846 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "o
rg.apache.log4j.spi.ErrorHandler" variable.
16:03:29,846 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by
16:03:29,846 ERROR [STDERR] log4j:ERROR [WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
java.net.FactoryURLClassLoader@19f768f
] whereas object of type
16:03:29,846 ERROR [STDERR] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.se
rver.NoAnnotationURLClassLoader@1de3f2d].
16:03:29,924 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported error follows.
16:03:29,924 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender
....
================================================
I dont have either log4j.jar or commons-logging.jar in alfresco/WEB-INF/lib.
I also tried adding this to WEB-INF/jboss-web.xml:
<?xml version="1.0"?>
<jboss-web>
<class-loading java2ClassLoadingCompliance="true">
<loader-repository>
com.example:loader=alfresco.war
<loader-repository-config>java2ParentDelegation=true</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
as well as this:
<?xml version="1.0"?>
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
com.example:loader=alfresco.war
<loader-repository-config>java2ParentDelegation=true</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
But to no avail, same exceptions still persist.
Thanks & Regards,
Advait Trivedi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055958#4055958
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055958
18Â years, 10Â months