我在获取与单选按钮(表中的一列)关联的值时遇到问题。它没有返回实际的
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>
尝试下面的代码
<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>