【问题标题】:Conditional radio button in webobjectswebobjects中的条件单选按钮
【发布时间】:2014-08-02 00:26:37
【问题描述】:

我有以下单选按钮代码:

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 和 C

<webobject name=A></webobject>

<webobject name=B></webobject>

<webobject name=C></webobject>

问题是:

我想在用户选择 RadioButton1 时显示 Web 对象 A,在选择 RadioButton2 时显示 B,在选择 3 时显示 C。

我对单选按钮应用什么条件以及如何应用?

【问题讨论】:

  • Tad 可能是正确的,但我必须澄清一下。您是在询问如何在用户选择其中一个单选按钮并点击表单提交按钮时显示正确的内容,还是希望在用户单击其中一个单选按钮时向用户显示某些内容?跨度>

标签: java html webobjects


【解决方案1】:

您没有使用 Project Wonder 有什么原因吗?

听起来您需要一个 AjaxObserveField 来观察按钮并触发更新。这需要 Wonder!

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

有一些 Ajax 示例真的很有帮助。

此链接可能有助于安装 Wonder:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-11-13
    • 2013-08-24
    • 2018-10-03
    • 1970-01-01
    • 2021-09-03
    • 2012-11-17
    • 2011-02-11
    • 2016-12-09
    相关资源
    最近更新 更多