[JBoss Seam] - Problems Nesting <h:dataTable>
by gzoller
I'm trying to nest <h:dataTable> with <s:link> elements without success. Actually I can render a 2-level nested data table but if I click on the innermost links I get null passed to the action method. Clicking on the top-level links works fine and the expected objects are passed tomy action method. Frustrating!
The rendered nested tables look something like this (everything rendered is a clickable s:link element--bold represents the outer table and regular text the inner nested tables):
| One
| Big Projects
| Small Projects
| Two
| Hot
| Cold
| Three
| Misc
|
A list of trivial Blah objects holds the One/Two/Three. Each Blah also has a list of Bucket objects. This is supposed to simulate a 1-to-m Entity relationship loaded from a database. I also have a stateful session bean, Year, that manages things.
Here's the important clip from my xhtml that renders the tables.
| <h:dataTable id="outerTable"
| var="z"
| value="#{list}">
| <h:column>
| <s:link value="#{outer.name}" action="#{year.selectItem(outer)}"/>
| <h:dataTable id="innerTable"
| var="inner"
| value="#{outer.buckets}">
| <h:column>
| <s:link value="#{inner.name}" action="#{year.selectBucket(inner)}"/>
| </h:column>
| </h:dataTable>
| </h:column>
| </h:dataTable>
|
Here are the important bits from Year.java
| @Stateful
| @Name("year")
| @Scope(ScopeType.SESSION)
| public class YearBean implements Year {
| @DataModel
| private List<Blah> list;
|
| @Create
| public void init() {
| // Create & populate 2-tier data structure simulating loaded Entites
| list = new ArrayList<Blah>();
| List<Bucket> b = new ArrayList<Bucket>();
| b.add( new Bucket("Big Projects"));
| b.add( new Bucket("Small Projects"));
| list.add(new Blah("One",b));
|
| b = new ArrayList<Bucket>();
| b.add( new Bucket("Hot"));
| b.add( new Bucket("Cold"));
| list.add(new Blah("Two",b));
|
| b = new ArrayList<Bucket>();
| b.add( new Bucket("Misc"));
| list.add(new Blah("Three",b));
| }
|
| public String selectBucket(Bucket bucket) {
| if( bucket == null )
| System.out.println("+++>>> Null Bucket Selected! ");
| else
| System.out.println("++++>>> Bucket selected: " + bucket.getName());
| return "bucket";
| }
|
| public String selectItem(Blah blah) {
| if( blah == null )
| System.out.println("+++>>> Null Blah Selected! ");
| else
| System.out.println("++++>>> Blah selected: " + blah.getName());
| return "blah";
| }
|
| }
|
And finally Blah.java and Bucket.java:
| @Name("blah")
| public class Blah {
| private String name;
|
| @DataModel
| private List<Bucket> buckets;
|
| public Blah(){}
|
| public Blah(String name, List<Bucket> buckets) {
| this.name = name;
| this.buckets = buckets;
| }
| public String getName() { return name; }
| public List<Bucket> getBuckets() { return buckets; }
| }
|
|
| @Name("bucket")
| public class Bucket {
| private String name;
|
| public Bucket(){}
|
| public Bucket(String name) {
| this.name = name;
| }
| public String getName() { return name; }
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018347#4018347
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018347
19Â years, 2Â months
[JBoss Seam] - Re: Problem with Hibernate
by syzork
sure
http://localhost:8080/helloworld/home.seam
An Error Occurred:
Cannot get value for expression '#{usuariosList.firstResult}'
Stack trace:
javax.faces.el.EvaluationException: Cannot get value for expression '#{usuariosList.firstResult}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:53)
at org.jboss.seam.pages.Param.getValueFromModel(Param.java:93)
at org.jboss.seam.core.Pages.getPageParameterValue(Pages.java:414)
at org.jboss.seam.core.Pages.getConvertedParameters(Pages.java:390)
at org.jboss.seam.ui.HtmlLink.encodeBegin(HtmlLink.java:123)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI
at org.jboss.seam.core.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:159)
at org.jboss.seam.core.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:76)
at org.jboss.seam.core.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:100)
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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
at org.jboss.seam.Component.callComponentMethod(Component.java:1835)
at org.jboss.seam.Component.unwrap(Component.java:1861)
at org.jboss.seam.Component.getInstance(Component.java:1683)
at org.jboss.seam.Component.getInstance(Component.java:1636)
at org.jboss.seam.Component.getInstance(Component.java:1630)
at org.jboss.seam.framework.Controller.getComponentInstance(Controller.java:257)
at org.jboss.seam.framework.PersistenceController.getPersistenceContext(PersistenceController.java:20)
at org.jboss.seam.framework.EntityQuery.getEntityManager(EntityQuery.java:83)
at org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:28)
at org.jboss.seam.framework.EntityQuery$$FastClassByCGLIB$$225925e6.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:29)
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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:28)
at org.jboss.seam.util.Work.workInTransaction(Work.java:37)
at org.jboss.seam.interceptors.TransactionInterceptor.doInTransactionIfNecessary(TransactionInterceptor.java:23)
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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:145)
at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:80)
at org.jboss.helloworld.UsuariosList$$EnhancerByCGLIB$$8aa74775.validate()
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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
at org.jboss.seam.Component.callComponentMethod(Component.java:1835)
at org.jboss.seam.Component.callCreateMethod(Component.java:1783)
at org.jboss.seam.Component.newInstance(Component.java:1772)
at org.jboss.seam.Component.getInstance(Component.java:1669)
at org.jboss.seam.Component.getInstance(Component.java:1636)
at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574)
at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
... 36 more
Caused by: javax.naming.NameNotFoundException: helloworldEntityManagerFactory not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.seam.core.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:155)
... 122 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018341#4018341
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018341
19Â years, 2Â months
[JBoss jBPM] - Re: JbpmBpelDS not bound
by alex.guizarï¼ jboss.com
Unless jbpm-bpel-ds.xml is removed from jbpm-bpel.sar, the data source gets deployed along the jbpm bpel service.
However, the web application jbpm-bpel.war also gets deployed before the service and, sometimes, even before the data source.
The web app starts the jBPM job executor thread (see the bottom of the stack trace). If the web app is the first to start, The job executor will access the data source before the data source is ready. Note that this is harmless: as you can read from the server log, the thread goes to sleep for a while and then retries:
2007-02-09 14:50:07,590 ERROR [org.jbpm.job.executor.JobExecutorThread] exception in job executor thread. waiting 30000 milliseconds
By the time the thread wakes up, the data source is available already. As jgreiner says, deploying the web app separately prevents the error from showing up.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018329#4018329
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018329
19Â years, 2Â months
[JBoss jBPM] - Re: BPEL Installation - NewBie
by alex.guizarï¼ jboss.com
Try http://localhost:8080/hello/greeter?wsdl to get the WSDL document of the service directly to your browser and confirm the server is running.
A response of "GET not supported" instead of "404 not found" already indicates that the web service is up and running. As Ronald says, SOAP requires the POST method.
The J2EE client (hello-client.jar) is deployed automatically by the ant script before it runs the unit test. You don't need to deploy it manually. If you are running into problems, please post the stack trace and server log and we'll try to help.
anonymous wrote : So, now I want to know which versions of following
|
| jboss
| jdk
| jbpm
| bpel
|
| I should use get working my BPEL hello world example.
The user guide mentions that jBPM BPEL has been tested in JBoss AS 4.0.3.SP1, 4.0.4.GA and 4.0.5.GA in the default configuration.
jdk-1.4.2 and 1.5.0 both work well, provided you endorse the XML APIs as described in the manual.
Regarding jBPM, use the version that comes with the BPEL distribution. Again, the user guide explicitly says that you do not need to download jBPM separately because the required libraries are already provided.
The alpha series of jBPM BPEL used jBPM 3.0.x. The beta series used jBPM 3.1.x, except for the latest beta3 which already uses jBPM 3.2.beta1. Generally, you can replace the jBPM jars provided with the BPEL distribution with any version of the same branch, but only the bundled version has been tested.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018328#4018328
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018328
19Â years, 2Â months