Here is the first experiment I did today. 

in the new-recipe.xhtml:


  | ...
  | <s:link value="Add an ingredient" 
action="#{ingredientManager.startAddAnIngredient(recipeManager.recipe)}" />
  | ...
  | <s:button value="Cancel Creating New Recipe" 
action="#{recipeManager.cancelNewRecipe}" />
  | ...
  | 

in the pages.xhtml, at first it was like below. It prevented the "Cancel 
Creating New Recipe" button redirecting to /home.xhtml:


  | <page view-id="/new-recipe.xhtml">
  |   <navigation 
from-action="#{ingredientManager.startAddAnIngredient(recipeManager.recipe)}">
  |     <redirect view-id="/new-recipe.xhtml" />
  |   </navigation>
  | </page>
  | 
  | <page view-id="/new-recipe.xhtml">
  | 
  |     <navigation from-action="#{recipeManager.cancelNewRecipe}">
  | 
  |       <redirect view-id="/home.xhtml" />
  | 
  |     </navigation>
  | 
  | </page>
  | 
  | 
  | 
  | 
  | 

When I modified the code in page.xhtml like below (disabled the first block), 
the "Cancel..." button worked! And, the "Add an ingredient" link worked 
correctly too, even if I commented the first block out.

  | <!--
  | <page view-id="/new-recipe.xhtml">
  |   <navigation 
from-action="#{ingredientManager.startAddAnIngredient(recipeManager.recipe)}">
  |     <redirect view-id="/new-recipe.xhtml" />
  |   </navigation>
  | </page>
  | -->
  | 
  | <page view-id="/new-recipe.xhtml">
  |     <navigation from-action="#{recipeManager.cancelNewRecipe}">
  |       <redirect view-id="/home.xhtml" />
  |     </navigation>
  | </page>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061048#4061048

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061048
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to