如何使用文本字段的值设置单选按钮的itemValue

时间:2014-05-19 12:53:56

标签: jsf jsf-2 radio-button selectoneradio

我有以下单选按钮方案:

O picked up
O sent to ordering person
O sent to owner
O sent to support group : "here is a text field where to specify the address"

相应的代码是:

<h:selectOneRadio value="#{detailModel.afterObject.deliveryAddress}">
    <f:selectItem id="pickedUp" itemValue="picked up" itemLabel="#{msg.subscriptionFormFieldDeliveryAddressPickedUp}"/>
    <f:selectItem id="send2OrderingPerson" itemValue="send 2 ordering person" itemLabel="#{msg.subscriptionFormFieldDeliveryAddressSend2OrderingPerson}"/>
    <f:selectItem id="send2SubscrOwner" itemValue="send 2 subscription owner" itemLabel="#{msg.subscriptionFormFieldDeliveryAddressSend2SubscrOwner}"/>
    <f:selectItem id="send2SupportGroup" itemValue="here should go the content of deliveryAddress1" itemLabel="#{msg.subscriptionFormFieldDeliveryAddressSend2SupportGroup}"/>
    <td>
        <h:inputText id="deliveryAddress1" value="#{detailModel.afterObject.deliveryAddress}"/>
    </td>
</h:selectOneRadio>

我不知道这是否是我真正想要的,但无论如何我想知道是否/如何复制/参考&#34;将文本字段的值转换为单选按钮的itemValue

0 个答案:

没有答案