1 Reply Latest reply on Oct 1, 2007 9:31 AM by Olivier Thierry

    Page flow and facelet templates

    Olivier Thierry Apprentice


      In a Seam application, I use JPDL to define pageflows. All pages of my application use facelet templates. All transitions defined in my pageflow work well, but I have a problem with links defined in my template, for example in a header : they throw a "Illegal navigation" error. What I understood from this message is that you can't go to a transition that is not modeled in JPDL. So I guess I should model it in my JPDL. But when you model your page flow with JPDL, you can't guess which links will exist in the template ! And just imagine you add a new link in the template, does it mean you have to change all your pageflows ? So is there a way to prevent Seam (or JBPM engine ; I don't know exactly if it's a Seam or JBPM problem) from checking navigation for some links ?

      A piece of my JPDL pageflow definition :

      <page name="confirmationDemandeur" view-id="/confirmationDemandeur.xhtml">
       <transition name="suivant" to="choixMotif"></transition>
       <transition name="changerDemandeur" to="choixDemandeur"></transition>

      The corresponding JSF page :

      <html xmlns:s="http://jboss.com/products/seam/taglib"
      <ui:composition template="templates/template.xhtml">
      <ui:define name="body">
       <h:messages globalOnly="true" styleClass="message"/>
       <rich:panel >
       <f:facet name="header">Demande d'absence - Demandeur</f:facet>
       <p>Choisissez le demandeur</p>
       <h:outputText value="#{demandeAbsence.matriculeDemandeur}" />
       <h:outputText value="#{demandeAbsence.infosDemandeur}" />
       <h:commandButton id="cmdAutreDemandeur" value="Autre demandeur" action="changerDemandeur" />
       <h:commandButton id="cmdContinuer" value="Continuer" action="suivant" />

      The template.xhtml template :

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      <html xmlns="http://www.w3.org/1999/xhtml"
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
       <link href="css/theme.css" rel="stylesheet" type="text/css" />
       <ui:include src="menu.xhtml" />
       <div class="body">
       <ui:insert name="body"/>

      The menu.xhtml :

       <s:link view="/home" value="Accueil" />

      The problem deals with the /home link.

      I work with Seam 2.0.0.CR1 and JBPM 3.2.2
      Any help appreciated ;)
      Thanks in advance

        • 1. Re: Page flow and facelet templates
          Olivier Thierry Apprentice

          I found a solution, but it am not fully happy with it.
          I added propagation="none" attribute to s:link.

          Something like this :

          <s:link view="/home" value="Accueil" propagation="none" />

          The problem with this is that it keeps conversations opened, while I'd like them to be close.

          I tried with propagation="end".

          <s:link view="/home" value="Accueil" propagation="end" />

          But I have to click the link twice to go to home page :
          - The first click ends the conversation
          - The second click redirects to the home page.

          Anybody knows why it works this way ?

          BTW, since it's not a JBPM issue but a Seam issue, could anyone move this post to Seam forum ?