当前位置: 代码迷 >> Java Web开发 >> extreme Table不能生成checkbox呢解决思路
  详细解决方案

extreme Table不能生成checkbox呢解决思路

热度:1903   发布时间:2016-04-10 23:40:45.0
extreme Table不能生成checkbox呢
extreme Table怎么不能生成checkbox呢?使用alias=“checkbox”也不行,谁知道,急求!
checkbox extreme?Table

------解决方案--------------------

<form id="presForm" action="<c:url value="selectedPresidentsListedController.run"/>" method="post">

 Enter your name: 
 <input 
  type="text" 
  name="userName" 
  style="font-family:verdana,arial,helvetica,sans-serif;font-size:11px;"
  value="<c:out value="${param.userName}"/>"
  /> 

  <ec:table 
    items="presidents"
    action="${pageContext.request.contextPath}/selectedPresidentsController.run"  
    view="compact"
    imagePath="${pageContext.request.contextPath}/images/table/compact/*.gif"
    rowsDisplayed="8"
    autoIncludeParameters="false"
    form="presForm"
    >
    <ec:exportPdf 
        fileName="output.pdf" 
        tooltip="Export PDF" 
        headerColor="black" 
        headerBackgroundColor="#b6c2da" 
        headerTitle="Presidents"
        />
    <ec:row>
      <ec:column 
          alias="checkbox"
          title=" " 
          width="5px" 
          filterable="false" 
          sortable="false" 
          viewsAllowed="compact"
          cell="selectedPresident"
          />
      <ec:column property="fullName" title="Name"/>
      <ec:column property="nickName" />
      <ec:column property="term" />
    </ec:row>
  </ec:table>
 
  <input
      type="button"
      name="sel"
      class="button"
      value="List Selected Presidents"
      onclick="document.forms.presForm.submit();"
      />
 
    <script type="text/javascript">
    function setPresidentState(chkbx) {
     //make sure that always know the state of the checkbox
     if (chkbx.checked) {
      eval('document.forms.presForm.chkbx_' + chkbx.name).value='SELECTED';
     } else {
      eval('document.forms.presForm.chkbx_' + chkbx.name).value='UNSELECTED';
     }
    }
    </script> 

</form>
  相关解决方案