2017-02-23 17 views
0

我想知道是否在引导形式下创建struts2 <s:checkbox>。请看看我的jsp代码。复选框不会出现。它显示了如果我创建一个复选框像输入类型=“复选框”的正常方式,但我必须使用struts2标签来创建它,以便能够使用struts2操作来处理表单。可以使用Bootstrap创建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> 

感谢

+0

后的代码,以显示你是如何引导一个复选框 –

+0

请,精心 –

+0

我已经更新了我的问题。 – Mike

回答

1

我猜你想创建一个使用<s:checkbox>

试试这个Bootstrap -styled复选框:

<div class="checkbox"> 
    <label> 
    <s:checkbox name="..."/> 
    Your label here 
    </label> 
</div> 
+0

它不起作用,我已经试过这种方法。 – Mike

+0

@Mike \t定义“它不起作用”。 –

+0

我的意思是我没有看到任何复选框,因为s:复选框标记。 – Mike