5 Replies Latest reply on Apr 28, 2008 5:17 PM by Diego Coronel

    cant understand before-redirect=false

    Diego Coronel Apprentice

      Hi,


      Im ending conversation using before redirect false, but its not working, im always in same conversation, my problem: i have a search page and one page to insert, when my insert page return sucesso i want to end conversation using before redirect false to show my success message and redirect to my search page, but im in same conversation and when a click on button to go to insert page my objects are still there, and when i use before redirect true it works, but i cant show any success message because my objects are detroied, is it normal ? what should i do ?


      my seach page xml:



      <page xmlns="http://jboss.com/products/seam/pages"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:s="http://jboss.com/products/seam/taglib"
            xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
            view-id="/face/almoxarifado/cadastro_tipomaterial/pesquisar.seam"
            login-required="true">
           
           <restrict>#{s:hasRole('mod_almoxarifado.tipoMaterial')}</restrict>
              <begin-conversation join="true" flush-mode="MANUAL" />
              <navigation>
                <rule if-outcome="inserir">
                     <redirect view-id="/face/almoxarifado/cadastro_tipomaterial/inserir.seam"/>
                </rule>
                <rule if-outcome="editar">
                     <redirect view-id="/face/almoxarifado/cadastro_tipomaterial/editar.seam"/>
                </rule>
           </navigation>
      </page>



      and my insert page xml:



      <page xmlns="http://jboss.com/products/seam/pages"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:s="http://jboss.com/products/seam/taglib"
            xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
            view-id="/face/almoxarifado/cadastro_tipomaterial/inserir.seam"
            login-required="true">
         
         <restrict>#{s:hasRole('mod_almoxarifado.tipoMaterial')}</restrict>
              <navigation>          
                <rule if-outcome="cancel">
                     <end-conversation before-redirect="true"/>
                     <redirect view-id="/face/almoxarifado/cadastro_tipomaterial/pesquisar.seam"/>
                </rule>
                <rule if-outcome="sucesso">
                     <end-conversation before-redirect="false"/>
                     <redirect view-id="/face/almoxarifado/cadastro_tipomaterial/pesquisar.seam"/>
                </rule>
                <rule if-outcome="editar_acesso">               
                     <redirect view-id="/face/almoxarifado/cadastro_tipomaterial/editar_acesso.seam"/>
                </rule>
           </navigation>     
      </page>




      ty, sry about english