webobjects中的条件单选按钮

时间:2014-08-01 09:21:12

标签: java html webobjects

我有以下代码用于单选按钮:

的test.html

<table>
    <tr>
       <td>
         <webobject name=RadioButton1></webobject>  &nbsp;
         <webobject name=LocalString1>A</webobject>
       </td>
       <td>
         <webobject name=RadioButton2></webobject>  &nbsp;
         <webobject name=LocalString2>B</webobject>
       </td>
       <td>
         <webobject name=RadioButton3></webobject>  &nbsp;
         <webobject name=LocalString3>C</webobject>
       </td>    
    </tr>
 </table>

Test.wod

RadioButton1: WORadioButton {
    name = "type";
    selection = requestType;
    value = 0;
}


RadioButton2: WORadioButton {
    name = "type";
    selection = requestType;
    value = 1;
}


RadioButton3: WORadioButton {
    name = "type";
    selection = requestType;
    value = 2;
}

我有以下webbjects显示:A,B&amp; ç

<webobject name=A></webobject>

<webobject name=B></webobject>

<webobject name=C></webobject>

问题是:

我想在用户选择RadioButton1时显示web对象A,选择RadioButton2&amp; C选择3时。

我应用于单选按钮的条件是什么?

1 个答案:

答案 0 :(得分:0)

您是否有理由不使用Project Wonder?

听起来你需要一个AjaxObserveField来观看按钮并激活更新。这需要Wonder!

http://wiki.wocommunity.org/dashboard.action

有一些真正有用的Ajax示例。

此链接可能有助于安装奇迹:

http://wiki.wocommunity.org/display/WEB/Project+Wonder+Installation