[
http://jira.jboss.com/jira/browse/JBSEAM-1753?page=all ]
Pete Muir closed JBSEAM-1753.
-----------------------------
Resolution: Done
Yes, you can't inject conversation scoped components into event scoped components
which you bind to. I updated the ref docs to state this.
Problems mixing a4j:support, @In and component binding
------------------------------------------------------
Key: JBSEAM-1753
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1753
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 2.0.0.BETA1
Environment: ajax4jsf 1.1.1, JBoss Seam 1.2.1, Facelets 1.1.11, MyFaces 1.1.6
nightly from 20070614, Tomcat 5.5.23
Reporter: Daniel Wiell
Assigned To: Pete Muir
Priority: Minor
Fix For: 2.1.0.GA
Here is a simple example that shows how to reproduce this:
<?xml version='1.0' encoding='UTF-8'?>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
<head><title>Seam + ajax4jsf + binding</title></head>
<body>
<h:form>
Input:
<h:inputText binding="#{testController.input}"
value="#{testController.value}">
<a4j:support event="onkeyup" reRender="repeater"/>
</h:inputText>
<br/>
Repeat:
<h:outputText id="repeater"
value="#{testController.value}"/>
</h:form>
</body>
</html>
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.core.FacesMessages;
import javax.faces.component.UIInput;
@Name("testController")
public class TestController {
@In
FacesMessages facesMessages;
private UIInput input;
private String value;
public UIInput getInput() { return input; }
public void setInput(UIInput input) { this.input = input; }
public String getValue() { return value; }
public void setValue(String value) { this.value = value; }
}
When entering something in the inputField, the following is thrown:
2007-06-20 08:36:33,260 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/geo].[faces] -
Servlet.service() for servlet faces threw exception
org.jboss.seam.RequiredException: In attribute requires non-null value:
testController.facesMessages
at org.jboss.seam.Component.getValueToInject(Component.java:1919)
at org.jboss.seam.Component.injectAttributes(Component.java:1368)
at org.jboss.seam.Component.inject(Component.java:1195)
at
org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
at TestController_$$_javassist_0.setInput(TestController_$$_javassist_0.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:409)
at org.apache.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:176)
at
org.apache.myfaces.custom.security.SecurityContextPropertyResolver.setValue(SecurityContextPropertyResolver.java:136)
at
com.sun.facelets.el.LegacyELContext$LegacyELResolver.setValue(LegacyELContext.java:201)
at com.sun.el.parser.AstValue.setValue(AstValue.java:113)
at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:246)
at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
at com.sun.facelets.el.LegacyValueBinding.setValue(LegacyValueBinding.java:68)
at
org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:86)
at
org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:57)
at
org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:94)
at
org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:57)
at
org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:96)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
Everything works fine if: the @In annotation is removed or the component binding is
removed
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira