Menu

Column Title with Checkbox

Help
mancien
2008-01-07
2012-10-09
  • mancien

    mancien - 2008-01-07

    Hello,

    I'm new to DisplayTag, and I tried to use a checkbox in a column title like that :

    <display:table name="listmodel" uid="row" pagesize="10" requestURI="list.do">
    <display:column title="<input type='checkbox' name='selectall'/>">
    <input type="checkbox" name="selectedIds" value="${row.mappingId}"/>
    </display:column>
    <display:column title="Payment" property="payment"/>
    <display:column title="Qty" property="quantity" />
    </display:table>

    And I've got this error message from jasper (org.apache.jasper.JasperException):

    The value of attribute "title" associated with an element type "display:column" must not contain the '<' character.'

    Any help is welcome,

    Thanks.

     
    • mancien

      mancien - 2008-01-07

      Thanks very much Ed,

      the first solution works very well,

      Regards,

      mancien.

       
    • Ed Webb

      Ed Webb - 2008-01-07

      <display:column title="<input type='checkbox' name='selectall'/>">

      Of course you can't do that. You can't do that with any jsp tags.

      Have you tried replacing the < and > with &lt; and &gt; ?

      <display:column title="&lt;input type='checkbox' name='selectall'/&gt;">

      Alternatively you can use the titleKey attribute...

      <display:column titleKey="column.select.all">

      ... and place the html code in your resource bundle.

      column.select.all=<input type='checkbox' name='selectall'/>

      Ed!

       

Log in to post a comment.

MongoDB Logo MongoDB