[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3251) ValidateAllRendererBase not robust enough for dynamic components
by Richard Kennard (JIRA)
ValidateAllRendererBase not robust enough for dynamic components
----------------------------------------------------------------
Key: JBSEAM-3251
URL: https://jira.jboss.org/jira/browse/JBSEAM-3251
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.1.0.A1, 2.0.3.CR1, 2.0.2.SP1
Environment: Any
Reporter: Richard Kennard
Priority: Minor
org.jboss.seam.ui.renderkit.ValidateAllRendererBase has two minor problems (with easy fixes) that stop it working with highly dynamic components:
1. doEncodeChildren attaches its ModelValidators before calling renderChildren. This misses any subcomponents the children may themselves dynamically create during their encodeBegin phase. Moving renderChildren down fixes this
2. A ModelValidator is only attached if the component has no existing Validators. This seems a bit of a blunt instrument. Presumably the idea is to stop attaching multiple ModelValidators. If the component happens to have, say, a LengthValidator that shouldn't stop ModelValidator entirely.
I have attached an updated ValidateAllRendererBase. It does not break any existing unit tests.
Disclaimer: my vested interest in this is because of Metawidget (http://www.metawidget.org).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3421) Update support for Wicket to 1.4
by Martijn Lindhout (JIRA)
Update support for Wicket to 1.4
--------------------------------
Key: JBSEAM-3421
URL: https://jira.jboss.org/jira/browse/JBSEAM-3421
Project: Seam
Issue Type: Feature Request
Components: Wicket
Affects Versions: 2.1.0.BETA1
Reporter: Martijn Lindhout
When using Wicket 1.4-m3, I got this exception:
12:31:27,650 ERROR [[/jobiq]] Exception starting filter Seam Filter
java.lang.NoSuchMethodError: org.jboss.seam.wicket.SeamWebApplication.addComponentOnBeforeRenderListener(Lorg/apache/wicket/application/IComponentOnBeforeRenderListener;)V
at org.jboss.seam.wicket.SeamWebApplication.initializeSeamStatusMessages(SeamWebApplication.java:143)
at org.jboss.seam.wicket.SeamWebApplication.init(SeamWebApplication.java:123)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:561)
at org.jboss.seam.wicket.web.WicketFilterInstantiator$1.init(WicketFilterInstantiator.java:80)
at org.jboss.seam.web.WicketFilter.init(WicketFilter.java:94)
at org.jboss.seam.servlet.SeamFilter.init(SeamFilter.java:97)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
It seams that this method is split up in addPreComponentOnBeforeRenderListener and addPostComponentOnBeforeRenderListener
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1583) seam:component intercept uses Seam standard rules by default
by Magnus Heino (JIRA)
seam:component intercept uses Seam standard rules by default
------------------------------------------------------------
Key: JBSEAM-1583
URL: http://jira.jboss.com/jira/browse/JBSEAM-1583
Project: JBoss Seam
Issue Type: Bug
Components: Spring
Affects Versions: 2.0.0.BETA1
Reporter: Magnus Heino
>From spring-seam-2.0.xsd, intercept:
Determines whether Seam interceptors should be wrapped around a bean, by overriding Seam's default rules.
Seldom do you want the seam interceptors wrapped around a sprig singleton. Auto will use choose no
interception for a singleton and use Seam standard rules otherwise.
Looking at the code, I can't find anything about this "no interception for a singleton" default.
This bean
<bean id="processRepository" class="se.lantmateriet.wfl.dataaccess.WsProcessRepository">
<constructor-arg value="http://localhost/avtal/avtalservice.asmx"/>
<seam:component/>
</bean>
fails like this:
12:45:35,203 DEBUG [ProxyUtils] Creating proxy for Spring Seam component 'processRepository' using class: se.lantmateriet.wfl.dataaccess.WsProcessRepository
12:45:35,282 INFO [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@8c2d94: defining beans [org.jboss.seam.ioc.spring.seamComponentPostProcessor,processRepository]; root of factory hierarchy
12:45:35,297 ERROR [[/wfl-seam]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processRepository' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.jboss.seam.InstantiationException: Could not instantiate Seam component: processRepository
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:430)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:255)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:252)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:689)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:358)
at org.jboss.seam.ioc.spring.ContextLoader.startupContextLoader(ContextLoader.java:64)
at org.jboss.seam.ioc.spring.ContextLoader.create(ContextLoader.java:43)
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:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
at org.jboss.seam.Component.callComponentMethod(Component.java:1957)
at org.jboss.seam.Component.callCreateMethod(Component.java:1880)
at org.jboss.seam.Component.newInstance(Component.java:1859)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:98)
at org.jboss.seam.init.Initialization.init(Initialization.java:508)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: processRepository
at org.jboss.seam.Component.newInstance(Component.java:1853)
at org.jboss.seam.Component.getInstance(Component.java:1756)
at org.jboss.seam.Component.getInstance(Component.java:1735)
at org.jboss.seam.Component.getInstance(Component.java:1729)
at org.jboss.seam.ioc.spring.SeamComponentPostProcessor.postProcessAfterInitialization(SeamComponentPostProcessor.java:49)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:314)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1184)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:255)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:252)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:689)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:358)
at org.jboss.seam.ioc.spring.ContextLoader.startupContextLoader(ContextLoader.java:64)
at org.jboss.seam.ioc.spring.ContextLoader.create(ContextLoader.java:43)
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:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
at org.jboss.seam.Component.callComponentMethod(Component.java:1957)
at org.jboss.seam.Component.callCreateMethod(Component.java:1880)
at org.jboss.seam.Component.newInstance(Component.java:1859)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:98)
at org.jboss.seam.init.Initialization.init(Initialization.java:508)
Caused by: java.lang.InstantiationException: se.lantmateriet.wfl.dataaccess.WsProcessRepository_$$_javassist_0
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.seam.ioc.ProxyUtils.enhance(ProxyUtils.java:71)
at org.jboss.seam.ioc.IoCComponent.instantiateJavaBean(IoCComponent.java:94)
at org.jboss.seam.Component.instantiate(Component.java:1154)
at org.jboss.seam.Component.newInstance(Component.java:1849)
at org.jboss.seam.Component.getInstance(Component.java:1756)
at org.jboss.seam.Component.getInstance(Component.java:1735)
at org.jboss.seam.Component.getInstance(Component.java:1729)
at org.jboss.seam.ioc.spring.SeamComponentPostProcessor.postProcessAfterInitialization(SeamComponentPostProcessor.java:49)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:314)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1184)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:255)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:252)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:689)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:358)
at org.jboss.seam.ioc.spring.ContextLoader.startupContextLoader(ContextLoader.java:64)
at org.jboss.seam.ioc.spring.ContextLoader.create(ContextLoader.java:43)
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:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
at org.jboss.seam.Component.callComponentMethod(Component.java:1957)
at org.jboss.seam.Component.callCreateMethod(Component.java:1880)
If I change <seam:component/> to <seam:component intercept="false"/> everything works.
1. Default for stateless spring beans seems to be true since seam standard rules are applied if intercept is null, that is not defined. bug?
2. Why would I want to use intercept="true" anyway? What interceptors will be added?
3. Why is it failing with intercept="true"?
--
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
14 years