[JBoss Seam] - h:selectOneMenu and Ajax4jsf problem
by felixk2
Hi,
I'm trying to change a rich:dataTable based on which dropdown item is selected. Here is my drop down:
<h:selectOneMenu value="#{customerList.selectedReseller}">
| <a4j:support event="onchange" reRender="resultTableDiv" />
| <s:selectItems value="#{resellerList.resultList}" var="reseller" label="#{reseller.reseller}" noSelectionLabel="Select..."/>
| <s:convertEntity />
| </h:selectOneMenu>
My Bean:
@Stateful
| @Name("customerList")
| public class CustomerListAction implements CustomerList
| {
| private Reseller selectedReseller;
| private List<Customer> customerListByReseller;
|
| @PersistenceContext
| private EntityManager em;
|
| @Logger
| private Log log;
|
| @In
| private FacesMessages facesMessages;
|
| @Create
| public void getCustomerByResellerId()
| {
| try
| {
| customerListByReseller = em.createQuery("select customer from Customer customer where reseller=:reseller")
| .setParameter("reseller", selectedReseller).getResultList();
| }
| catch(Exception e)
| {
| log.error("An error occured: ", e);
| }
| }
|
| @Destroy @Remove
| public void destroy()
| {
| }
|
| public void setSelectedReseller(Reseller selectedReseller)
| {
| this.selectedReseller = selectedReseller;
| }
|
| public Reseller getSelectedReseller()
| {
| return selectedReseller;
| }
|
| public void setCustomerListByReseller(List<Customer> customerListByReseller)
| {
| this.customerListByReseller = customerListByReseller;
| }
|
| public List<Customer> getCustomerListByReseller()
| {
| return customerListByReseller;
| }
| }
The rerender works fine. I can see the a4j rerendering because the datatable is hitting my "getCustomerByResellerId()" method (I see hibernate querying the database). Problem is with selectedReseller. It keeps coming back as Null. So the h:selectOneMenu doesn't place the selected Item into selectedReseller.
Anyone see anything wrong with this and why this wouldn't work?
Thank you very much,
Felix
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115741#4115741
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115741
17 years
[Beginners Corner] - NullPointerException in org.apache.myfaces.portlet.MyFacesGe
by gpuser
Hi,
I am getting the following error on the server which I am not getting from the local setup. Can anyone please help me out as I am stuck with this issue on the server and not able to proceed -
Exception in FacesServlet
java.lang.NullPointerException
at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:392)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:265)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)
at org.jboss.portal.portlet.container.PortletContainer.invokeRender(PortletContainer.java:518)
at org.jboss.portal.portlet.container.PortletContainer.dispatch(PortletContainer.java:434)
at org.jboss.portal.portlet.container.PortletContainerInvoker$1.dispatch(PortletContainerInvoker.java:144)
at org.jboss.portal.portlet.invocation.PortletInvocation.dispatch(PortletInvocation.java:223)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:141)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:85)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_4827075286966232824.invokeNext(TransactionInterceptor$invokeNotSupported_4827075286966232824.java)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_4827075286966232824.invokeNext(TransactionInterceptor$invokeNotSupported_4827075286966232824.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:50)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:51)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.ModesInterceptor.invoke(ModesInterceptor.java:60)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:46)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:55)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchronizationInterceptor.java:77)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$InvokeNextCommand.execute(ContextDispatcherInterceptor.java:141)
at sun.reflect.GeneratedMethodAccessor3281.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.portal.server.servlet.CommandServlet.doGet(CommandServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:539)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.jboss.portal.portlet.impl.spi.AbstractRequestContext.include(AbstractRequestContext.java:194)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.include(ContextDispatcherInterceptor.java:69)
at org.jboss.portal.server.servlet.CommandServlet.include(CommandServlet.java:79)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:75)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:49)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:65)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.ValveInterceptor.invoke(ValveInterceptor.java:57)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
at org.jboss.portal.portlet.container.PortletContainerInvoker.invoke(PortletContainerInvoker.java:115)
at sun.reflect.GeneratedMethodAccessor333.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy59.invoke(Unknown Source)
at org.jboss.portal.portlet.state.producer.StatefulPortletInvoker.invoke(StatefulPortletInvoker.java:250)
at sun.reflect.GeneratedMethodAccessor332.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.j
2007-12-27 10:07:20,323 INFO [STDOUT] ava:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy61.invoke(Unknown Source)
at org.jboss.portal.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:140)
at org.jboss.portal.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:156)
at sun.reflect.GeneratedMethodAccessor331.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy63.invoke(Unknown Source)
at org.jboss.portal.portlet.test.TestPortletInvoker$1.dispatch(TestPortletInvoker.java:62)
at org.jboss.portal.portlet.invocation.PortletInvocation.dispatch(PortletInvocation.java:223)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:141)
at org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor.invoke(PortalSessionSynchronizationInterceptor.java:86)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:128)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.model.instance.InstanceSecurityInterceptor.invoke(InstanceSecurityInterceptor.java:78)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
at org.jboss.portal.portlet.test.TestPortletInvoker.invoke(TestPortletInvoker.java:122)
at sun.reflect.GeneratedMethodAccessor329.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy45.invoke(Unknown Source)
at org.jboss.portal.core.impl.model.instance.InstanceImpl.invoke(InstanceImpl.java:274)
at org.jboss.portal.core.command.RenderWindowCommand.execute(RenderWindowCommand.java:109)
at org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:84)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:141)
at org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:168)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at com.ge.portal.aspects.LoggingInterceptor.invoke(LoggingInterceptor.java:146)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.PageNavigationInterceptor.invoke(PageNavigationInterceptor.java:103)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:79)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:59)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
at org.jboss.portal.core.command.CommandContext.execute(CommandContext.java:102)
at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:92)
at org.jboss.portal.core.command.CommandContext.chain(CommandContext.java:148)
at org.jboss.portal.core.command.MarkupCommand.renderPortletWindow(MarkupCommand.java:466)
at org.jboss.portal.core.command.RenderPageCommand.renderFragments(RenderPageCommand.java:78)
at org.jboss.portal.core.command.MarkupCommand.execute(MarkupCommand.java:343)
at org.jboss.portal.core.command.ControllerCommand.dispatch(ControllerCommand.java:84)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:141)
at org.jboss.portal.core.aspects.controller.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:168)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at com.ge.portal.aspects.LoggingInterceptor.invoke(LoggingInterceptor.java:146)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.PageNavigationInterceptor.invoke(PageNavigationInterceptor.java:103)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:79)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:59)
at org.jboss.portal.core.command.CommandInterceptor.invoke(CommandInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:171)
at org.jboss.portal.core.command.CommandContext.execute(CommandContext.java:102)
at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:92)
at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:153)
at org.jboss.portal.core.command.ExecutionContext.execute(ExecutionContext.java:79)
at org.jboss.portal.core.CoreController.handle(CoreController.java:130)
at sun.reflect.GeneratedMethodAccessor363.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Ref
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115740#4115740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115740
17 years
[Beginners Corner] - How JAR files are loaded from EAR file
by isthisusernameavailable
Hello,
I have a question about how JAR files are deployed from within a single EAR file. This is using the clustered JBoss 4.2.2 AS.
My app is deployed as an EAR file that contains B.jar and C.jar. B.jar contains a @Stateless B class that @Depends upon class C in C.jar, which is marked as a JBoss @Service. So the C service should start first, and then that can be injected into class B via the @EJB annotation.
When I deploy this EAR file, C fails to start before B is created despite the @Depends annotation, so B fail to start properly. If I move classes B and C inside the same JAR, or if I rename C.jar to A.jar, it works fine, so it seems that JBoss is loading the JAR files from within the EAR in alphabetical order.
Is there a way to specify the order in which the JARs from my EAR are loaded? Possibly in the application.xml file?
Thanks in advance,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115739#4115739
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115739
17 years