12 Replies Latest reply on Nov 19, 2006 3:14 PM by jerome_082006

    Problems with application-like behaviour project

    raffaele.camanzo

      Hi All,

      I'm currently developing an application-like project using Seam 1.1 beta 1 (CVS ver. 30/10), JBoss 4.0.5, Myfaces and Facelets (I removed everything about Tomahawk because of too many headaches).

      This project provides its services with a tabbed layout (I made a first tryout using Tomahawk tabbed pane component... But too many strange behaviours, waste of time and headaches) allowing the user to open a tab (or give the caption to an already opened) from a menu or from another tab keeping the current state (for example the results of a search) of each of them (it is not reasonable that a search page does not keep track of the last search request if I move on a detail page for a result item and then I move back to the search page).

      To achieve this goal using Seam I want to create a conversation for each tab currently opened. In order to resume the current state (what the user did on it) of the selected tab I tried to create conversations with an explicit ID (Seam should detect that there is a conversation with the same identifier, resume that one and not call again the begin method).

      To check the capability I created a simple project which merely creates a list of links which call the same action (the @Begin method of my conversation with a static id... in this example). I was expecting that the first time Seam creates the conversation and the others refers to it, but this is the result of my tryouts:

      1 - The first, the best possible for my needs and probably what-I-cannot-do tryout:

      The h:commandLink action was a method of a session scoped stateful bean (something like a session handler) with the logics to retrieve the outcome related to the tab-action and, using the page-action model (faces-config.xml + pages.xml), call the begin method of the correct conversation.
      Unfortunately this approach fails because when the Manager tries to set the id of the current conversation, the conversation list is unmodifiable and I get an UnsupportedOperationException; but this is reasonable because Gavin told in more than a post that the conversation is strictly related to the request boundaries and then probably when Seam tries to set the conversation id the request handling is in a state that makes this operation unsafe (even if there is a redirection to a different action handler, and should seem a different request I think that the http request is only one and the redirection is an internal handling of Seam).

      2 ? Not the best? but a good one:

      The h:commandLink action is the begin method of the conversation which handles the tab behaviour, the first time the action is called Seam reads the id, does not find it in the conversations list and creates the conversation with the given identifier (and calls the begin method). If the user clicks the link another time Seam finds the conversation and switches to that one without invoking the begin method. Unfortunately also this approach fails, indeed, Seam throws an exception when I click the link the second time saying to me that is unable to render a view for a null viewId (I like the Seam logics of not to call again the begin method but I hoped that the outcome was stored and passed to the Seam rendering handler to render the same view). Probably I left something and I hope that someone can help me to understand where my logics is wrong and how can I solve this problem, but now? a little bit of code to have a wider vision of the problem:

      Layout.xhtml (the page with the list of links)

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:c="http://java.sun.com/jstl/core">
      
      <f:view>
      
       <head>
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       <title><h:outputText value="#{mainmsg.title}" /></title>
       <link href="css/main.css" rel="stylesheet" type="text/css"/>
       </head>
      
       <body>
      
       <div id="document">
       <div id="header">
       <div id="title"></div>
       <div id="status">
       <ui:insert name=?status? />
       </div>
       </div>
       <div id="container">
       <div>
       <h:form>
       <ul>
       <c:forEach items="#{sessionHandler.contextTabs}" var="contextTab">
       <li>
       <h:commandLink action="#{provaAction.startConversation}">
       <h:outputText value="label" />
       <f:param name="token" value="#{contextTab.token}" />
       <f:param name="conversationPropagation" value="nest" />
       </h:commandLink>
       </li>
       </c:forEach>
       </ul>
       </h:form>
       <ui:insert name="contextmanager" />
       </div>
       </div>
       </div>
      
       </body>
      
      </f:view>
      </html>
      



      ProvaAction.java (the tab handler)

      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.faces.context.FacesContext;
      import javax.faces.event.ActionEvent;
      
      import org.jboss.logging.Logger;
      import org.jboss.seam.annotations.Begin;
      import org.jboss.seam.annotations.Conversational;
      import org.jboss.seam.annotations.Create;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.End;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Out;
      import org.jboss.seam.core.Conversation;
      
      @Stateful
      @Name("provaAction")
      @Conversational
      public class ProvaAction implements Prova {
      
       @Begin(id="mypersonalid", nested=true)
       public String startConversation() {
       FacesContext context = FacesContext.getCurrentInstance();
       String tok = (String) context.getExternalContext().getRequestParameterMap().get("token");
       Logger.getLogger(this.getClass()).info("TOKEN IS: " + tok);
      
      
       Logger.getLogger(this.getClass()).info("CONVERSATION IS: " + Conversation.instance().getId());
       return "prova";
       }
      
       @End
       public String endConversation() {
       // TODO Auto-generated method stub
       return null;
       }
      
       @Remove @Destroy
       public void destroy() {
       // TODO Auto-generated method stub
      
       }
      
      }
      


      exception:
      2006-10-31 12:21:41,797 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
      2006-10-31 12:21:41,797 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.manager
      2006-10-31 12:21:41,797 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.manager
      2006-10-31 12:21:41,797 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.manager
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.core.Manager] Found conversation id in request parameter: mypersonalid
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.core.Manager] Restoring conversation with id: mypersonalid
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(myperson
      alid)
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] committing transaction after phase: RESTORE_VIEW(1)
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:41,798 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] beginning transaction prior to phase: RENDER_RESPONSE(6)
      2006-10-31 12:21:41,799 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:41,799 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing page context
      2006-10-31 12:21:41,799 DEBUG [org.jboss.seam.Component] instantiating Seam component: facesMessages
      2006-10-31 12:21:41,799 DEBUG [org.jboss.seam.Component] initializing new instance of: facesMessages
      2006-10-31 12:21:41,799 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.facesMessages
      2006-10-31 12:21:41,799 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.facesMessages
      2006-10-31 12:21:41,799 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.facesMessages
      2006-10-31 12:21:41,805 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: sessionHandler
      2006-10-31 12:21:41,805 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: sessionHandler
      2006-10-31 12:21:41,805 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
      2006-10-31 12:21:41,806 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.currentTab
      2006-10-31 12:21:41,806 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.currentTab
      2006-10-31 12:21:41,806 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      2006-10-31 12:21:41,809 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: mainmsg
      2006-10-31 12:21:41,809 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: mainmsg
      2006-10-31 12:21:41,809 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
      2006-10-31 12:21:41,810 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: sessionHandler
      2006-10-31 12:21:41,810 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: sessionHandler
      2006-10-31 12:21:41,810 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
      2006-10-31 12:21:41,810 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.currentTab
      2006-10-31 12:21:41,810 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.currentTab
      2006-10-31 12:21:41,810 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      2006-10-31 12:21:41,811 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: sessionHandler
      2006-10-31 12:21:41,811 DEBUG [org.jboss.seam.contexts.Contexts] found in session context: sessionHandler
      2006-10-31 12:21:41,811 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
      2006-10-31 12:21:41,811 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.currentTab
      2006-10-31 12:21:41,811 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.currentTab
      2006-10-31 12:21:41,811 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      2006-10-31 12:21:41,812 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: provaAction
      2006-10-31 12:21:41,812 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: provaAction
      2006-10-31 12:21:41,812 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
      2006-10-31 12:21:41,814 DEBUG [org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor] ++++ LongLivedSessionPropagationIntercep
      tor
      2006-10-31 12:21:41,814 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.currentTab
      2006-10-31 12:21:41,814 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.currentTab
      2006-10-31 12:21:41,814 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.token
      2006-10-31 12:21:41,814 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.token
      2006-10-31 12:21:41,814 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: org.jboss.seam.core.persistenceContexts
      2006-10-31 12:21:41,815 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: conversation
      2006-10-31 12:21:41,815 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: conversation
      2006-10-31 12:21:41,815 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
      2006-10-31 12:21:41,817 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.org.jboss.seam.core.pageParameters
      
      2006-10-31 12:21:41,817 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.org.jboss.seam.core.pageParameter
      s
      2006-10-31 12:21:41,817 DEBUG [org.jboss.seam.core.Manager] Storing conversation state: mypersonalid
      2006-10-31 12:21:41,817 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager.conversat
      ionId
      2006-10-31 12:21:41,817 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager.conversa
      tionId
      2006-10-31 12:21:41,817 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager.conversat
      ionIsLongRunning
      2006-10-31 12:21:41,817 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager.conversa
      tionIsLongRunning
      2006-10-31 12:21:41,825 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:41,825 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] committing transaction after phase: RENDER_RESPONSE(6)
      2006-10-31 12:21:41,825 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:41,825 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying contexts
      2006-10-31 12:21:41,825 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying business process context
      2006-10-31 12:21:41,825 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.BUSINESS_PROCESS
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.BUSINESS_PROCESS
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing session context
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.EVENT
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: cal
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.manager
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: msgs
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: dbb
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: amsg
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: facelets.Encoding
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_
      VIEW
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: mainmsg
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.sun.facelets.legacy.ELCONTEXT
      2006-10-31 12:21:41,826 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.EVENT
      2006-10-31 12:21:41,827 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
      2006-10-31 12:21:41,827 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:41,827 DEBUG [org.jboss.seam.servlet.SeamExceptionFilter] ended request
      2006-10-31 12:21:46,777 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:46,777 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] beginning transaction prior to phase: RESTORE_VIEW(1)
      2006-10-31 12:21:46,777 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:46,777 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
      2006-10-31 12:21:46,788 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.manager
      2006-10-31 12:21:46,789 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.manager
      2006-10-31 12:21:46,789 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager
      2006-10-31 12:21:46,789 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager
      2006-10-31 12:21:46,789 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.manager
      2006-10-31 12:21:46,789 DEBUG [org.jboss.seam.core.Manager] Restoring conversation with id: mypersonalid
      2006-10-31 12:21:46,789 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(4)
      2006-10-31 12:21:46,790 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: provaAction
      2006-10-31 12:21:46,790 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: provaAction
      2006-10-31 12:21:46,790 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to Seam component
      2006-10-31 12:21:46,790 DEBUG [org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor] ++++ LongLivedSessionPropagationIntercep
      tor
      2006-10-31 12:21:46,790 DEBUG [org.jboss.seam.Component] instantiating Seam component: interpolator
      2006-10-31 12:21:46,790 DEBUG [org.jboss.seam.Component] initializing new instance of: interpolator
      2006-10-31 12:21:46,791 ERROR [org.apache.myfaces.application.jsp.JspViewHandlerImpl] ViewId must not be null
      2006-10-31 12:21:46,791 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRep
      ository3@32831c19, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@4660a77c{ url=null ,addedOrder=0}
      2006-10-31 12:21:46,791 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preRemoveVariable.provaAction
      2006-10-31 12:21:46,791 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postRemoveVariable.provaAction
      2006-10-31 12:21:46,791 DEBUG [org.jboss.seam.interceptors.RemoveInterceptor] Stateful component was removed: provaAction
      2006-10-31 12:21:46,795 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.exceptions
      2006-10-31 12:21:46,795 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.exceptions
      2006-10-31 12:21:46,795 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.exceptions
      2006-10-31 12:21:46,795 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.exceptions
      2006-10-31 12:21:46,795 INFO [org.jboss.seam.interceptors.ExceptionInterceptor] no exceptions.xml file found
      2006-10-31 12:21:46,798 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.exceptions
      2006-10-31 12:21:46,799 ERROR [org.jboss.seam.interceptors.ExceptionInterceptor] redirecting to debug page
      javax.ejb.EJBTransactionRolledbackException: java.lang.NullPointerException: ViewId must not be null
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy155.startConversation(Unknown Source)
       at it.finservice.organizer.modules.dummy.components.Prova$$FastClassByCGLIB$$d2bea6d.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:47)
       at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:67)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
       at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
       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:17)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
       at org.jboss.seam.interceptors.AsynchronousInterceptor.invokeAsynchronouslyIfNecessary(AsynchronousInterceptor.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:17)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
       at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:168)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:141)
       at org.jboss.seam.intercept.RootInterceptor.aroundInvoke(RootInterceptor.java:128)
       at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:60)
       at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
       at org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$ed08c757.startConversation(<generated>)
       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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
       at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
       at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
       at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       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.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
       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.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
       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.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.NullPointerException: ViewId must not be null
       at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getViewIdPath(JspViewHandlerImpl.java:281)
       at org.apache.myfaces.application.jsp.JspViewHandlerImpl.getActionURL(JspViewHandlerImpl.java:158)
       at org.jboss.seam.jsf.SeamViewHandler.getActionURL(SeamViewHandler.java:48)
       at com.sun.facelets.FaceletViewHandler.getActionURL(FaceletViewHandler.java:786)
       at org.jboss.seam.core.Manager.redirect(Manager.java:864)
       at org.jboss.seam.core.Manager.redirect(Manager.java:798)
       at org.jboss.seam.core.ConversationEntry.select(ConversationEntry.java:89)
       at org.jboss.seam.interceptors.ConversationInterceptor.getOutcomeForConversationId(ConversationInterceptor.java:94)
       at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:50)
       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:17)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
       at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
       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:17)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
       at org.jboss.seam.interceptors.ConversationalInterceptor.checkConversationForConversationalBean(ConversationalInterceptor.java:81)
       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:17)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
       at org.jboss.seam.interceptors.EventInterceptor.aroundInvoke(EventInterceptor.java:51)
       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:17)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
       at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
       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:17)
       at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:172)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:66)
       at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:168)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:141)
       at org.jboss.seam.intercept.RootInterceptor.aroundInvoke(RootInterceptor.java:128)
       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.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:
      57)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
       ... 84 more
      2006-10-31 12:21:46,802 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.debug.lastException
      2006-10-31 12:21:46,802 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.debug.lastException
      2006-10-31 12:21:46,802 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.debug.phaseId
      2006-10-31 12:21:46,802 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.debug.phaseId
      2006-10-31 12:21:46,802 DEBUG [org.jboss.seam.Component] instantiating Seam component: redirect
      2006-10-31 12:21:46,802 DEBUG [org.jboss.seam.Component] initializing new instance of: redirect
      2006-10-31 12:21:46,803 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.redirect
      2006-10-31 12:21:46,803 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.redirect
      2006-10-31 12:21:46,803 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.redirect
      2006-10-31 12:21:46,803 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRep
      ository3@32831c19, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@36a8a199{ url=null ,addedOrder=0}
      2006-10-31 12:21:46,804 DEBUG [org.jboss.seam.core.Manager] Storing conversation state: mypersonalid
      2006-10-31 12:21:46,804 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager.conversat
      ionId
      2006-10-31 12:21:46,804 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager.conversa
      tionId
      2006-10-31 12:21:46,804 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager.conversat
      ionIsLongRunning
      2006-10-31 12:21:46,804 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager.conversa
      tionIsLongRunning
      2006-10-31 12:21:46,804 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:46,806 DEBUG [org.jboss.seam.Component] instantiating Seam component: resourceBundle
      2006-10-31 12:21:46,806 DEBUG [org.jboss.seam.Component] initializing new instance of: resourceBundle
      2006-10-31 12:21:46,806 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.resourceBundle
      2006-10-31 12:21:46,807 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.resourceBundle
      2006-10-31 12:21:46,807 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.resourceBundle
      2006-10-31 12:21:46,807 DEBUG [org.jboss.seam.Component] instantiating Seam component: locale
      2006-10-31 12:21:46,807 DEBUG [org.jboss.seam.Component] initializing new instance of: locale
      2006-10-31 12:21:46,807 DEBUG [org.jboss.seam.core.ResourceBundle] loaded resource bundle: messages
      2006-10-31 12:21:46,808 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRep
      ository3@32831c19, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@79095fd7{ url=null ,addedOrder=0}
      2006-10-31 12:21:46,809 DEBUG [org.jboss.seam.Component] instantiating Seam component: interpolator
      2006-10-31 12:21:46,809 DEBUG [org.jboss.seam.Component] initializing new instance of: interpolator
      2006-10-31 12:21:46,809 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:46,809 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:46,809 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] rolling back transaction after phase: INVOKE_APPLICATION(5)
      2006-10-31 12:21:46,809 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.Namin
      gContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.core.Manager] Storing conversation state: mypersonalid
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager.conversat
      ionId
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager.conversa
      tionId
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.manager.conversat
      ionIsLongRunning
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.manager.conversa
      tionIsLongRunning
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying contexts
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying business process context
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.BUSINESS_PROCESS
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.BUSINESS_PROCESS
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
      2006-10-31 12:21:46,810 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing session context
      2006-10-31 12:21:46,811 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
      2006-10-31 12:21:46,811 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroyContext.EVENT
      2006-10-31 12:21:46,811 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
      2006-10-31 12:21:46,811 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preDestroy.org.jboss.seam.core.manager
      2006-10-31 12:21:46,811 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.exceptionHandled
      2006-10-31 12:21:46,811 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.sun.facelets.legacy.ELCONTEXT
      2006-10-31 12:21:46,811 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postDestroyContext.EVENT
      2006-10-31 12:21:46,811 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
      


      3 ? Jamiroquai * (-1) = moving without travelling AKA little workaround but same results:

      This solution is exactly the same as the previous one except for the action management.
      Idea: ok, when the conversation is resumed the begin method is not called anymore and the outcome is not set, well, but if the begin method is an actionListener and the action of the commandLink is a static outcome? Fails in the same way?



      Any help is really appreciated!
      Raffaele


        • 1. Re: Problems with application-like behaviour project
          gavin.king

          (1) I don't understand what your code looked like for the first approach. Please post it.

          (2) Seam is throwing an NPE because there is no view id stored in the conversation entry. This is actually a bug in Seam, and I will fix it, but you could probably work around it by specifying page descriptions in pages.xml. However, your solution is still broken, AFAICT, because you are using a constant value as the conversation id in @Begin, which means you could only ever have one conversation at a time.

          (3) I have a funny feeling that you could do what you want to do more easily using the Switcher or ConversationList stuff, but I'm not exactly sure, because I don't completely understand usecase. How exactly does it differ from the kind of thing that we do in the issue tracker example? Is it just that you want to display the list of conversations as tabs? Or does the list of tabs come from somewhere else?

          (4) If you give me a really simplified, stripped down, easy to build and run copy of your project, along with a really good description of what exactly these tabs represent, where they come from, and how you want the conversations to behave, I will figure out a way to do it in Seam and make whatever fixes/changes are needed. But please take time to make sure that I can understand the problem and your code (I don't usually do this!). Email it to gavin.king@jboss.com.

          • 2. Re: Problems with application-like behaviour project
            raffaele.camanzo

            Waiting for an advice I tried another solution, this does not fail, but does not do what I want:
            I modified the conversation generation in order to provide a conversation id as a commandLink parameter (<f:param name="conversationId" value="#{contextTab.token} />), the conversationId value is passed correctly but ignored by Seam.

            layout.xhtml:

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:s="http://jboss.com/products/seam/taglib"
             xmlns:c="http://java.sun.com/jstl/core">
            
            <f:view>
            
             <f:loadBundle basename="main" var="mainmsg" />
             <f:loadBundle basename="messages" var="msgs" />
            
            
             <head>
             <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
             <title><h:outputText value="#{mainmsg.title}" /></title>
             <link href="css/main.css" rel="stylesheet" type="text/css"/>
             </head>
            
             <body>
            
             <div id="document">
             <div id="header">
             <div id="title"></div>
             <div id="status">
             <ui:insert name="status" />
             </div>
             </div>
             <div id="container">
             <div id="leftside">
             </div>
             <div id="rightside">
             <div id="ContextView">
            
             <div id="slidingContext">
             <h:form>
             <ul>
             <c:forEach items="#{sessionHandler.contextTabs}" var="contextTab">
             <li>
             <h:commandLink action="#{provaAction.startConversation}">
             <h:outputText value="label" />
             <f:param name="token" value="#{contextTab.token}" />
             <f:param name="conversationId" value="#{contextTab.token}" />
             </h:commandLink>
             </li>
             </c:forEach>
             </ul>
             </h:form>
             </div>
            
             </div>
             <ui:insert name="contextmanager" />
             </div>
             </div>
             </div>
            
             </body>
            
            </f:view>
            </html>
            


            the ProvaAction.java:

            import javax.ejb.Remove;
            import javax.ejb.Stateful;
            import javax.faces.context.FacesContext;
            import javax.faces.event.ActionEvent;
            
            import org.jboss.logging.Logger;
            import org.jboss.seam.annotations.Begin;
            import org.jboss.seam.annotations.Conversational;
            import org.jboss.seam.annotations.Create;
            import org.jboss.seam.annotations.Destroy;
            import org.jboss.seam.annotations.End;
            import org.jboss.seam.annotations.In;
            import org.jboss.seam.annotations.Name;
            import org.jboss.seam.annotations.Out;
            import org.jboss.seam.annotations.RequestParameter;
            import org.jboss.seam.core.Conversation;
            import org.jboss.seam.core.Manager;
            
            @Stateful
            @Name("provaAction")
            @Conversational
            public class ProvaAction implements Prova {
            
             @RequestParameter(value="token")
             private String tok;
            
             @RequestParameter(value="conversationId")
             private String conv;
            
             @Begin(join=true)
             public String startConversation() {
             FacesContext context = FacesContext.getCurrentInstance();
             String tokz = (String) context.getExternalContext().getRequestParameterMap().get("token");
             Logger.getLogger(this.getClass()).info("TOKEN IS: " + tokz);
             Logger.getLogger(this.getClass()).info("TOKEN FROM REQUEST PARAMETER IS: " + tok);
             Logger.getLogger(this.getClass()).info("CONVERSATION ID PARAMETER IS: " + conv);
            
             Logger.getLogger(this.getClass()).info("CONVERSATION IS: " + Conversation.instance().getId());
             return "prova";
             }
            
             @End
             public String endConversation() {
             // TODO Auto-generated method stub
             return null;
             }
            
             @Remove @Destroy
             public void destroy() {
             // TODO Auto-generated method stub
            
             }
            }
            


            which produces the following output:

            2006-10-31 17:32:46,542 INFO [it.finservice.organizer.modules.dummy.components.ProvaAction] TOKEN IS: token1
            2006-10-31 17:32:46,543 INFO [it.finservice.organizer.modules.dummy.components.ProvaAction] TOKEN FROM REQUEST PARAMETER IS: token1
            2006-10-31 17:32:46,543 INFO [it.finservice.organizer.modules.dummy.components.ProvaAction] CONVERSATION ID PARAMETER IS: token1
            2006-10-31 17:32:46,543 INFO [it.finservice.organizer.modules.dummy.components.ProvaAction] CONVERSATION IS: 4


            Help really appreciated.

            Regards,
            Raffaele

            • 3. Re: Problems with application-like behaviour project
              raffaele.camanzo

              Hi Gavin,

              tomorrow is a national holiday in Italy, I'm already at home and I cannot access to my PC at work (it's turned off... damn!) then I cannot answer to your questions before of thursday, but it will be the first think.

              This post only to say: I really appreciate your advice! Thank you very much.

              Regards,
              Raffaele

              • 4. Re: Problems with application-like behaviour project
                raffaele.camanzo

                Hi Gavin,

                1) The first approach. This solution probably was the result of a complete misunderstanding
                of the Seam capabilities and goals and I report it as a complete misuse of the framework
                and of the tecnologies involved in (Seam + JSF + Myfaces + Tomahawk + Facelets).

                [nobodyShouldDoThis]
                only to give you an idea of the nightmare...
                everything was living in the same XHTML page, no conversations, no navigation rule,
                the tab content was pushed in the tabbedPane using anonymous facelets applied controlling
                directly the JSF UI components through backing beans.
                Result: strange behaviours (like loosing the rendering of the tomahawk tags between a
                call and another) and a very big effort.
                [/nobodyShouldDoThis]


                2) Comparing with the Issue Tracker

                I read the source code of the Issue Tracker demo and I tried to run it, I've seen the behaviour and what I need is quite different (if I well understood the behaviour), but instead of list the differences I prefer to describe to you my needs in the email (I sent it to you before of posting this reply).

                Thank you again

                Raffaele

                • 5. Re: Problems with application-like behaviour project
                  raffaele.camanzo

                  Hi Gavin,

                  I did not receive any feedback from you about the email messages I sent to you, then, I would like to ask you if you received such email messages and if you had the time to put your head on the problem.

                  This post not to be boring, only to have a feedback.

                  Thank you again,
                  Raffaele

                  • 6. Re: Problems with application-like behaviour project
                    gavin.king

                    I have a release (1.1.BETA2) this week and have not had time. It is marked todo in my email client.

                    • 7. Re: Problems with application-like behaviour project
                      raffaele.camanzo

                      Hi Gavin,

                      this post to ask you if you can put your head on this problem, at least to tell me if it is a reasonable approach in Seam (or if there's an already implemented mechanism in Seam that I did not see). I know that you have a lot of things to do and if you think that the approach is reasonable (and you do not have the time to code it) I can put my head on the Seam source and propose you a solution.

                      I'm sorry if I sound boring, but I'm running on my new Seam sport car and I don't want to crash myself on a deadline wall.

                      Thank you!
                      Regards,
                      Raffaele

                      • 8. Re: Problems with application-like behaviour project
                        jerome_082006

                        Hello,

                        We are currently facing the same "issues" : basically, our application consists of a main master/detail view panel in a tabbed pane and we would like to be able to create/edit entities in tabs (of the same tabbed pane).

                        Would it be possible to have one conversation per tab ? and to switch from one another on tab change event ?

                        We are using Seam 1.1 Beta 2 from CVS (11/15) and Icefaces 1.5 (the latest build).

                        Did you manage to get a working solution ?

                        Regards,
                        Jerome.

                        • 9. Re: Problems with application-like behaviour project
                          raffaele.camanzo

                          Hi Jerome,

                          Unfortunately I did not ever put my head on Icefaces then I cannot give a complete answer to your question, anyway, if you need to connect a tab to a conversation and refer to that conversation everytime (but the first when the conversation is created) you select the tab, the solution is straightforward: all you have to do is set an explicit id to the conversation: @Begin(id="") and Seam does this for you (the first time creates the conversation with the given id and everytime you ask for the begin method of such conversation Seam understands that the conversation is already present, gets it and skips the begin method execution).

                          I hope that this answer will be useful for you.

                          Regards,
                          Raffaele

                          • 10. Re: Problems with application-like behaviour project
                            jerome_082006

                            Thank you Raffaele,

                            Your solution seems to be good but I think I am going to use the workspace/conversation switcher.

                            Regards,
                            Jerome.

                            • 11. Re: Problems with application-like behaviour project
                              scosenz

                              Jerome,

                              Could you please tell us how you got Seam 1.1 Beta 2 working with Icefaces 1.5? Were any special steps required?

                              Thanks,
                              Steve

                              • 12. Re: Problems with application-like behaviour project
                                jerome_082006

                                Hi Steve,

                                You just have to be careful with classloader/classpath issues (jar/war files).

                                Hopefully, with the 1.1GA release, Seam and Icefaces integration should be really easy.

                                Regards,
                                Jerome.