[JBoss Seam] - DataModelSelection is always the first option after 'unselec
by jjfraney
I'm using jboss 4.2.1 and seam 2.0 beta1. I used seam-gen to initialize the project.
I'm using h:selectOneMenu and s:selectItems in conjunction with @DataModel and @DataModelSelection.
I've been banging my head on this for a while and can't understand it even now. Can anyone please shed light?
The @DataModelSelection variable always contains the first option of the select items no matter what selection was made in the browser.
For example, for the page source result below, no matter what the user selects, the variable marked with @DataModelSelections will ALWAYS have the value of the second option in the list ('location 1')
| <select id="masterAccountSelect:customerName" name="masterAccountSelect:customerName" size="1">
| <option value="org.jboss.seam.ui.NoSelectionConverter.noSelectionValue">Select Customer</option>
| <option value="0">(xxx) location 1</option>
| <option value="1">(yyy) location 2</option>
| <option value="2">(zzz) location 3</option>
| ...
|
Here is segment of my xhtml:
| <rich:panel>
| <f:facet name="header">Select Master Account</f:facet>
|
| <div class="dialog">
| <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
| <h:outputLabel for="customerName">Customer Name</h:outputLabel>
| <h:selectOneMenu id="customerName" value="#{location}">
| <s:selectItems value="#{allLocations}"
| var="loc" label="(#{loc.loginSid}) #{loc.name}" noSelectionLabel="Select Customer" />
| <s:convertEntity/>
| </h:selectOneMenu>
|
| </h:panelGrid>
| <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
| <h:outputLabel for="loginSid">Login SID</h:outputLabel>
| <h:inputText id="loginSid"
| value="#{location.loginSid}"/>
| </h:panelGrid>
| </div>
|
| <div class="actionButtons">
| <h:commandButton value="Select By Name" action="#{mapSubAccountsHelper1.selectLocationByName}"/>
| </div>
| <div class="actionButtons">
| <h:commandButton value="Select By Login SID" action="#{mapSubAccountsHelper1.selectLocationByLoginSid}"/>
| </div>
| </rich:panel>
|
|
Here is segment of my bean:
| @Stateful
| @Name("mapSubAccountsHelper1")
| public class MapSubAccountsHelper1 implements Serializable, MapSubAccountsHelper1Local {
|
| ...
| @DataModel
| private List<Location> allLocations;
|
|
| @DataModelSelection
| private Location location;
|
| ...
|
| public void selectLocationByLoginSid() {
| logger.debug("selectLocationByLoginSid: " + location.getLoginSid());
| ...
|
| }
|
|
| public void selectLocationByName() {
| logger.debug("selectLocationByName: " + location.getName());
| ....
|
| }
|
| ....
|
| @Factory("allLocations")
| @Begin(join=true)
| public void buildAllLocations() {
| .....
| }
|
|
If more information is needed, please let me know.
Thanks,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082996#4082996
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082996
18 years, 7 months
[JBoss jBPM] - Re: Decision node always taking first option
by Arutha
Well, that was the first step I took, and nothing really directly applied.
For example, this guy seems to have the same problem:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=118091
But you suggested to him to search this fine, fine forum. I agree, it's a fine forum. Blue's my fav colour.
Next, I read this post:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=118015
It's how I came up with the workaround, but it still doesn't talk about this problem at all.
Closest thing in description-terms was this one:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=117835
But it talks of troubles in JSF-world, I'm not running a front-end, no JSF/JSP comes to play here. It's a pretty straight-forward process I'm running.
If you know a thread on the forum that I missed, I'd be much obliged if you could paste the URL...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082987#4082987
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082987
18 years, 7 months
[JBoss jBPM] - How do I end an existing process instance immediately?
by Gendis
I have process with subprocess the first node of the process is "processState" that start a subprocess, the first node of the subprocess is state-node. After signal a token point at the state-node. When I call "end()" method of the 'main' process only the subprocess is ended but the 'main' process continue execution. I think it is because of part of code of processInstance end() method:
| // check if this process was started as a subprocess of a super process
| if (superProcessToken!=null) {
| addCascadeProcessInstance(superProcessToken.getProcessInstance());
|
|
| ExecutionContext superExecutionContext = new ExecutionContext(superProcessToken);
| superExecutionContext.setSubProcessInstance(this);
| superProcessToken.signal(superExecutionContext);
| }
|
Whay the signal method from superProcessToken is invoke ??
Is there other method to finish processInstance and all its subprocesses immediately?
P.S. Sorry for my poor english.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082986#4082986
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082986
18 years, 7 months
[EJB/JBoss] - create and finder in one transaction
by cb@gedoplan
Hi There,
we want to port a WebSphere 6 application to JBoss 4.0.4.GA. The application is designed SOA like. I.e., very often within one transaction an order is created in an OrderService and in the same transaction a request is created in the RequestService calling an order finder Method with orderNumber and mandatorId passed through an OrderDTO to the request create method. Unfortunately, the order cannot be found. WebSphere first searches the order in the container before asking the DB. JBoss seams to search first in the DB where the order cannot be found, of course. Probably, the finder would succeed if the create can be done after ejb-create is done, but we must use the configuration option <insert-after-ejb-post-create>true</insert-after-ejb-post-create> because we first have some non-null fields in the order database table. By the way, we use Oracle 9i.
The main exception is
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=cb-nx7010/343, BranchQual=, localId=343] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0, id=f46486c5c0a8026501808ae8cb7e8d6d); - nested throwable: (org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=cb-nx7010/343, BranchQual=, localId=343] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.ejb.EJBException: Update failed. Expected one affected row: rowsAffected=0, id=f46486c5c0a8026501808ae8cb7e8d6d));
Turning on the configuration option <call-logging>true</call-logging> we find that a finder exception occurs in the RequestService where the order is searched by orderNumber and mandatorId:
13:46:44,003 INFO [LogInterceptor] Application Exception in method: public abstract com.wn.pve.ordermgmt.common.entity.Order com.wn.pve.ordermgmt.common.entity.OrderHome.findOrderByOrdernumberAndMandator(java.lang.String,java.lang.String) throws javax.ejb.FinderException
| javax.ejb.ObjectNotFoundException: No such entity!
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:64)
| at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.findEntity(JDBCStoreManager.java:604)
| at org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersistenceManager.java:315)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.findEntity(CachedConnectionInterceptor.java:236)
| at org.jboss.ejb.EntityContainer.findSingleObject(EntityContainer.java:1103)
| at org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:669)
| at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1130)
| at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
| at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:203)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
| at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:105)
| at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
| at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
| at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:43)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:435)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
| at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:145)
| at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
| at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:514)
| at org.jboss.ejb.Container.invoke(Container.java:975)
| at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:359)
| at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:133)
| at $Proxy195.findOrderByOrdernumberAndMandator(Unknown Source)
| at com.wn.pve.ordermgmt.orderservice.logic.requestattachment.PreScope.createRequestForOrderWithScopeAndServiceProvider(PreScope.java:525)
| at com.wn.pve.ordermgmt.orderservice.logic.requestattachment.PreScopeProvisionTransportHandling.createRequestForOrder(PreScopeProvisionTransportHandling.java:49)
| at com.wn.pve.ordermgmt.orderservice.logic.requestattachment.PreScope.create(PreScope.java:330)
| at com.wn.pve.ordermgmt.orderservice.logic.requestattachment.PreScope.adapt(PreScope.java:97)
| at com.wn.pve.ordermgmt.orderservice.logic.requestattachment.OrderRequestAttacher.updateLinkeRequestsForOrder(OrderRequestAttacher.java:94)
| at com.wn.pve.ordermgmt.orderservice.OrderServiceBean.createAdHocOrder(OrderServiceBean.java:568)
| 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:324)
| at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
| at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
| at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
| at org.jboss.ejb.Container.invoke(Container.java:954)
| at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
| at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
| at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:206)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:192)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| at $Proxy445.createAdHocOrder(Unknown Source)
| at com.wn.pve.ordermgmt.delegate.rmi.OrderServiceDelegate.createAdHocOrder(OrderServiceDelegate.java:164)
| at com.wn.pve.wd.ordermgmt.adhoc.AdHocOrderActionImpl.onBtnSaveClicked(AdHocOrderActionImpl.java:315)
| at com.wn.pve.wd.ordermgmt.adhoc.AdHocOrderAction.save_onClick(AdHocOrderAction.java:265)
| 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:324)
| at com.cc.framework.adapter.struts.ActionUtil.handleFormAction(ActionUtil.java:521)
| at com.cc.framework.adapter.struts.FWAction.handleFormAction(FWAction.java:203)
| at com.cc.framework.adapter.struts.ActionUtil.execute(ActionUtil.java:636)
| at com.cc.framework.adapter.struts.FWAction.execute(FWAction.java:268)
| at com.cc.framework.adapter.struts.FWAction.execute(FWAction.java:298)
| at com.cc.framework.adapter.struts.RequestProcessorUtil.processAction(RequestProcessorUtil.java:78)
| at com.cc.framework.adapter.struts.FWRequestProcessor.processActionPerform(FWRequestProcessor.java:90)
| at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
| at com.wn.pve.wd.mcf.MCFRequestProcessor.process(MCFRequestProcessor.java:113)
| at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
| at com.wn.pve.wd.mcf.MCFActionServlet.process(MCFActionServlet.java:69)
| at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| 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 com.wn.pve.wd.mcf.SessionFilter.doFilter(SessionFilter.java:85)
| 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:524)
| 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.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:534)
Thanx for your help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082983#4082983
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082983
18 years, 7 months