Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1.GA
    • Fix Version/s: The future
    • Component/s: JSF Integration
    • Labels:
      None
    • Environment:

      JBoss 4.0.4GA

      Description

      Seam does not automatically support Trinidad's dialog feature in terms of propagating long running conversations to the dialog window.

      Forum User dajevtic has provided a custom phase listener and action listener to enable propagation but it requires a specific naming convention for the dialog page. It would be nice to enable support directly using standard Seam notation like the s:conversationPropagation tag or @Begin(join = true)

      Here are the relevant phase listener and action listener

      Phase Listener

      private static final String CONVERSATION_ID_SESSION_PARAMETER = "conversationId";

      private Map createParameterMapForConversationRestore(String conversationId)

      { Map paramterMap = new Hashtable(); paramterMap.put(CONVERSATION_ID_SESSION_PARAMETER, conversationId); return paramterMap; }

      private void restoreConversation(Context context) {
      if (context.isSet(CONVERSATION_ID_SESSION_PARAMETER))

      { String convId = context.get(CONVERSATION_ID_SESSION_PARAMETER).toString(); Manager.instance().restoreConversation(createParameterMapForConversationRestore(convId)); context.remove(CONVERSATION_ID_SESSION_PARAMETER); }

      }

      public void afterPhase(PhaseEvent event) {
      try {
      if (event.getPhaseId().equals(PhaseId.RESTORE_VIEW)) {
      UIViewRoot root = event.getFacesContext().getViewRoot();
      if (root != null) {
      String viewId = root.getViewId();
      if ((viewId != null) && viewId.endsWith("_dlg.jspx"))

      { restoreConversation(Contexts.getSessionContext()); }

      }
      } else

      { log.info("after " + event.getPhaseId()); }

      } catch (Exception e)

      { log.error("Could not restore Seam conversation", e); }

      }

      Action Listener

      public void processAction(ActionEvent actionEvent)
      throws AbortProcessingException {

      if (actionEvent.getComponent() instanceof CoreCommandLink) {
      CoreCommandLink link = (CoreCommandLink)actionEvent.getComponent();
      if (link.isUseWindow())

      { Contexts.getSessionContext().set("conversationId", Manager.instance().getCurrentConversationId()); }

      }
      super.processAction(actionEvent);
      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                smithbstl Brian Smith (Inactive)
              • Votes:
                5 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: