【问题标题】:Spring Web Flow春季网络流
【发布时间】:2010-12-23 01:39:19
【问题描述】:

如何从 XHTML 页面中的 selectoneMenu 字段中获取或传递流 xml 的值。

【问题讨论】:

  • 更改问题的标题,使其反映真正的问题。

标签: spring spring-webflow


【解决方案1】:

如何从 XHTML 页面中的 selectoneMenu 字段中获取或传递流 xml 的值。

<table>
<tr>
 <td>
   <h:outputLabel
  id="memberListLabel" value="MemberList}"
  for="memberList" styleClass="outputLabel" />
</td>
<td>
  <p:selectOneMenu id="memberList"
  value="#{memberForm.member}"
  tabindex="1"
  style="font-size:11px;float:left;width:159px;" >
<f:selectItem itemValue="" itemLabel="---Select---" />
<f:selectItems value="#{memberList}" itemLabel="--Select--" />
</p:selectOneMenu>
</td>
</tr>
</table>

your action will take care,save the data in flowScope not in xhtml page 

【讨论】:

    【解决方案2】:

    我不确定我是否理解你所说的,但你可以在你的 xhmtl 中做到这一点:

    <selectOneMenu value="#{flowScope.value}">
    ...
    </selectOneMenu>
    

    这会将您的 selectOneMenu 的值存储到您的 flowScope 中。您还可以根据自己的需要尝试其他范围(viewScope、flashScope 等... - 查看 SWF 文档)。

    【讨论】:

      猜你喜欢
      • 2010-12-15
      • 2011-02-21
      • 1970-01-01
      • 1970-01-01
      • 2018-12-30
      • 1970-01-01
      相关资源
      最近更新 更多