`
forestkqq
  • 浏览: 205686 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
社区版块
存档分类
最新评论

Seam 问题集:启动对话后,转向别的页面时,显示错误的导航(Illegal navigation)

    博客分类:
  • Seam
阅读更多

问题现象:

 

在启动对话后,比如一个页面流,在对话进行过程中,如果点击导航转向到别的无关页面,比如首页,显示错误:错误的导航(Illegal navigation)。

 

解决方案:

 

 

 

<s:link view="/login.xhtml" value="首页"  propagation="none" />

 

<rich:menuItem submitMode="ajax" value="首页"  action="#{menuapp.doHome}" >

<f:param name="conversationPropagation" value="none"/>

<rich:menuItem/>

 

<h:commandLink action="main" value="Exit">

    <f:param name="conversationPropagation" value="none"/>

</h:commandLink>

 

如果需要结束对话,将 none 修改为 end

 

可参考的解释有:

 

The problem is that jPDL navigation is constrained (by contrast to JSF or Seam navigation which are free form ).

So, with jPDL, the path that your users can follow is represented by a finite graph, with well defined transitions from state to state (a state being either a page or decision).

Each time the jPDL/jBPM engine detects that a user took a path that is not defined in the graph, it triggers an Illegal navigation Exception .

If you provide some kind of escape door for your users (like a cancel button, or back to menu ), you should end the pageflow when the user use it. The key point is to end the conversation : that will end the pageflow as well.

According to the doc, this is done by using <end-conversation> (in your .jpdl.xml file) or by calling an @End method. AFAIK, you could use a s:link to do that. But propagation="none" will not suffice: the conversation will not be propagated thought the link, but will still be active.

 

选自: http://seamframework.org/Community/RichmenuItemAndPropagationParam

 

 

 

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics