此内容没有您所选择的语言版本。

9.2.2. Starting pageflows


We "start" a jPDL-based pageflow by specifying the name of the process definition with a @Begin, @BeginTask or @StartTask annotation:
@Begin(pageflow="numberguess") public void begin() { ... }
Copy to Clipboard Toggle word wrap
Alternatively, we can start a pageflow using pages.xml:
<page> 
  <begin-conversation pageflow="numberguess"/> 
</page>
Copy to Clipboard Toggle word wrap
If we are beginning the pageflow during the RENDER_RESPONSE phase — during a @Factory or @Create method, for example — we consider ourselves already at the rendered page, and use a <start-page> node as the first node in the pageflow, as in the example above.
But if the pageflow is begun as the result of an action listener invocation, the outcome of the action listener determines the first page to be rendered. In this case, we use a <start-state> as the first node in the pageflow, and declare a transition for each possible outcome:
<pageflow-definition name="viewEditDocument">
  <start-state name="start">
    <transition name="documentFound" to="displayDocument"/>
    <transition name="documentNotFound" to="notFound"/>
  </start-state>
    
  <page name="displayDocument" view-id="/document.jsp">
    <transition name="edit" to="editDocument"/>
    <transition name="done" to="main"/>
  </page>
    
  ...
    
  <page name="notFound" view-id="/404.jsp">
    <end-conversation/>
  </page>
    
</pageflow-definition>
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat