【问题标题】:display tag column as radio button将标签列显示为单选按钮
【发布时间】:2013-07-05 04:49:47
【问题描述】:

我在获取与单选按钮关联的值时遇到问题,该单选按钮是表中的一列。它没有返回实际的conferenceid,而是将我的${conf.conferenceid} 文本返回给对象selectedConference。有人可以帮我我在这里做错了什么。顺便说一句,这段代码在 Glassfish 上工作,最近迁移到 JBoss 并且没有工作。下面是html代码:

<display:table id="conf" name="conferences" requestURI="perConfSearchAction.action" pagesize="10">
    <display:column>
        <input type="radio" name="selectedConference" value="${conf.conferenceId}" onclick="getValue()"/>
    </display:column>
    <display:column property="userName" title="Moderator" sortable="true" />
    <display:column property="passcode" title="Public Pin" sortable="true" />
    <display:column property="moderatorPin" title="Moderator Pin" sortable="true" />                                
    <display:column property="confStartDate" title="Start Date" sortable="true" />                                                                
    <display:column property="confStartTime" title="Start Time" sortable="true" />                                
    <display:column property="confEndDate" title="End Date" sortable="true" />                                
    <display:column property="confEndTime" title="End Time" sortable="true" />                                
    <display:column property="confName" title="Subscription" sortable="true" />
</display:table>

【问题讨论】:

    标签: java jsp struts2 radio-button displaytag


    【解决方案1】:

    试试下面的代码

    <display:table id="conf" name="conferences" requestURI="perConfSearchAction.action" pagesize="10" uid="row">
      <display:column>
         <input type="radio" name="selectedConference" value="<s:property value='%{#attr.row.id}'/>"/>
      </display:column>
    </display:table>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-09
      • 1970-01-01
      • 1970-01-01
      • 2021-10-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多