【发布时间】:2017-02-23 17:55:53
【问题描述】:
我想知道 struts2 <s:checkbox> 是否在引导形式下创建。请看一下我的jsp代码。复选框没有出现。如果我像 input type="checkbox" 这样的正常方式创建一个复选框,它会显示出来,但我必须使用 struts2 标签创建它才能使用 struts2 操作处理表单。
jsp
<s:form action="exportDocumentExport" namespace="/esignmain/documentExport" name="documentExportForm" theme="bootstrap" cssClass="form-vertical">
<%-- Message --%>
<div class="message">
<s:if test="message != null">
<strong style="color:#7F0E11"><s:property value="message"/></strong>
</s:if>
</div>
<s:if test="message == null">
<div class="scrollView11">
<table id="eSignUsers" class="table table-hover">
<thead>
<tr>
<th><s:text name="S.NO"/></th>
<th><s:text name="Document identifier"/></th>
<th><s:text name="Name"/></th>
<th><s:text name="Description"/></th>
<th><s:text name="Active"/></th>
</tr>
</thead>
<tr>
<s:iterator value="documentList" status="status">
<tbody>
<tr>
<td><s:property value="#status.count" /></td>
<td><s:property value="identifier" /></td>
<td><s:property value="name" /></td>
<td><s:property value="description" /></td>
<td><s:property value="active" /></td>
<td><s:checkbox name="checked" fieldValue="%{id}" value="false"/></td>
</tr>
</tbody>
</s:iterator>
</tr>
<tr>
<table class="table table-striped">
<tr>
<h5>Showing <span id="totalRows" class="label label-success"></span> total records</h5>
<s:submit key="Export Document" value="Export Document" type="button" class="btn btn-sm btn-success" name="Export_Document" theme="simple" onclick="return evalGroup()"><span class="glyphicon glyphicon-export"></span> Export</s:submit>
</tr>
</table>
</tr>
</table>
</div>
谢谢
【问题讨论】:
-
发布代码以显示您如何引导复选框
-
请详细说明
-
我已经更新了我的问题。
-
S2 标签只产生标记;除了方便和一些最小的框架集成之外,您没有理由必须使用它们。您可能对github.com/struts-community-plugins/struts2-bootstrap 感兴趣。
标签: html twitter-bootstrap struts2