jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • DisplayTag
  • DISPL-319

table:caption does not work properly

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.1
  • Fix Version/s: 1.3
  • Component/s: HTML Generation
  • Labels:
    None
  • Application server:
    Websphere 5.1

Description

The caption of a table is not rendered correctly in version 1.1. No attributes of the caption tag is rendered. This works in version 1.0. I have debugged the code, and it seems that the ELCaptionTag is released, in which the attributeMap is cleared, before the tableTag has written the html.

So the captionTag is set on the tableTag, but is cleared before it is used by the tableTag for rendering html.

The following code:

<div class="adresse">
   <display:table id="item" name="sessionScope.sessionScopePerson.adresser" sort="list" class="tabell-helskjermbredde">
      <display:setProperty name="basic.msg.empty_list_row">
         <tr>
            <td class="standard_data_tabell_data_venstre" colspan="{0}">
               <fmt:message key="tabell.tomliste" />
            </td>
         </tr>
      </display:setProperty>
      <display:caption class="overskrift">
         <fmt:message key="ord.adresse" />
      </display:caption>
      <display:column titleKey="ord.adresselinje" headerStyleClass="beskrivelse" class="standard_data_tabell_data" sortable="false" property="adresselinje" decorator="no.nav.personkort.web.formatter.CapitalizeDecorator" />
   </display:table>
</div>

renders the following html:

<div class="adresse">
   <table class="tabell-helskjermbredde" id="item">
      <caption class="overskrift">
         Adresse
      </caption>
      <thead>
         <tr>
         <th class="beskrivelse">
            Adresselinje
         </th>
         <tbody>
         <tr>
            <td class="standard_data_tabell_data_venstre" colspan="1">
               Søket ga ingen treff
            </td>
         </tr>
      </tbody>
   </table>
</div>

The class attribut of the captionTag is not rendered at all.

This is a bug, right?
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Java Archive File
    displaytag-1.1-patch-src.jar
    18/Jul/06 9:32 AM
    21 kB
    Kirk Rasmussen
    1. Java Source File
      org/displaytag/.../HtmlTableWriter.java 22 kB
    2. Java Source File
      org/displaytag/tags/CaptionTag.java 6 kB
    3. Java Source File
      org/displaytag/tags/TableTag.java 54 kB
    4. Java Source File
      org/displaytag/.../HtmlAttributeMap.java 2 kB
    Download Zip
    Show
    Java Archive File
    displaytag-1.1-patch-src.jar
    18/Jul/06 9:32 AM
    21 kB
    Kirk Rasmussen

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Bård Dybwad Kristensen added a comment - 05/Apr/06 4:10 AM
Hi

I see that I have posted something wrong in this issue. In the generated html I have submitted, the caption tag has a class attribute. This is of cource wrong. The point of the defect is that this class attribute og the caption tag is NOT rendered. :-)

When is version 1.1.1 due for release? We need this fix in my project :-)
Show
Bård Dybwad Kristensen added a comment - 05/Apr/06 4:10 AM Hi I see that I have posted something wrong in this issue. In the generated html I have submitted, the caption tag has a class attribute. This is of cource wrong. The point of the defect is that this class attribute og the caption tag is NOT rendered. :-) When is version 1.1.1 due for release? We need this fix in my project :-)
Hide
Permalink
Kirk Rasmussen added a comment - 18/Jul/06 9:32 AM
I have attached the patch which fixes this issue. Please migrate this to the main code base.

Thanks
Kirk
Show
Kirk Rasmussen added a comment - 18/Jul/06 9:32 AM I have attached the patch which fixes this issue. Please migrate this to the main code base. Thanks Kirk
Hide
Permalink
Shital added a comment - 31/Oct/06 1:35 PM
I used the patch and still having issues displaying an image on the Caption. It just displays the img verbatim, no HTML translation, so I see the entire <img src="/images/FR_LOGIN4.gif"> in the Caption instead of the image itself. Also, the Style classes do not take effect in Excel. I tried style, class attributes, none of them work.

Is this a known issue? Can you please take a look?

Thanks
Bhanu

TableTag.properties (tried both DecoratesHssf and DefaultHssfExportview no difference in results)
---------------------------

export.excel.include_header=true
#export.excel.class=org.displaytag.export.ExcelHssfView
#export.excel.class=org.displaytag.decorator.hssf.DecoratesHssf
export.excel.class=org.displaytag.export.excel.DefaultHssfExportView


JSP
----------

<display:caption media="excel">


<img src="/images/FR_LOGIN4.gif">

</display:caption>



<display:footer>
Footer
</display:footer>
Show
Shital added a comment - 31/Oct/06 1:35 PM I used the patch and still having issues displaying an image on the Caption. It just displays the img verbatim, no HTML translation, so I see the entire <img src="/images/FR_LOGIN4.gif"> in the Caption instead of the image itself. Also, the Style classes do not take effect in Excel. I tried style, class attributes, none of them work. Is this a known issue? Can you please take a look? Thanks Bhanu TableTag.properties (tried both DecoratesHssf and DefaultHssfExportview no difference in results) --------------------------- export.excel.include_header=true #export.excel.class=org.displaytag.export.ExcelHssfView #export.excel.class=org.displaytag.decorator.hssf.DecoratesHssf export.excel.class=org.displaytag.export.excel.DefaultHssfExportView JSP ---------- <display:caption media="excel"> <img src="/images/FR_LOGIN4.gif"> </display:caption> <display:footer> Footer </display:footer>

People

  • Reporter:
    Bård Dybwad Kristensen
Vote (2)
Watch (2)

Dates

  • Created:
    28/Mar/06 4:57 AM
    Updated:
    01/Nov/10 1:34 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.