【发布时间】:2017-04-28 02:32:36
【问题描述】:
<th>
<h:outputText value="Pending Actions" style="font-weight:bold" />
<td colspan="4">
<p:selectOneMenu value="#{selectedValue}" required="true">
<f:selectItem itemValue="#{null}" itemLabel="--Select One--" />
<f:selectItem itemValue="organization1" itemLabel="ORGANIZAION1" />
<f:selectItem itemValue="organization2" itemLabel="ORGANIZAION2" />
<f:selectItem itemValue="organization3" itemLabel="ORGANIZAION3" />
<f:selectItem itemValue="organization4" itemLabel="ORGANIZAION4" />
</p:selectOneMenu>
<h:inputTextarea value="#{casesBean.organization1PendingActionDetails}"/>
</td>
</th>
如上所示,有一个下拉列表让用户选择他们想要分配任务的组织。
在我的数据库中,有列
organization1PendingActionDetails,organization2PendingActionDetails等-
所以我的问题是:
是否可以更改
inputTextarea值 基于从下拉列表中选择的值? 例如:
如果用户选择organization2,那么inputTextarea 将变为value="#{casesBean.organization2PendingActionDetails}"
【问题讨论】:
标签: jsf primefaces