Jump to content
  • Provide ability to generate ID attributes for HTML elements


    mtaylor
    Assigned User teodord
    CategoryFeature request
    PriorityNormal
    ReproducibilityAlways
    ResolutionFixed
    SeverityMinor
    StatusClosed
    Could you provide a method of generating ID attributes for HTML elements, perhaps using markup property?


    User Feedback

    Recommended Comments

    Hi,

     

    I think you could attach the ID to the elements using a custom property in JRXML, and then you'll have to exploit it using a customized version of the HTML exporter. Note that elements have a property called "key", that might be exploited in the same way.

     

    You could contribute this back to the project as a patch. If you can explain its usefulness a bit, maybe such improvement could make it into the core exporter.

     

    Thank you,

    Teodor

    Link to comment
    Share on other sites

    Sorry, I sent the following via email... I guess it didn't make its way here:

     

    Teodor,

     

    Sorry, haven't had time to work on this at all.

     

    Initially, I was thinking that IDs for all elements would be very useful in

    writing integration tests, we use WebTest:

    http://webtest.canoo.com/webtest/manual/WebTestHome.html

     

    We have chosen a different approach in writing our integration tests, but

    others may benefit in this regard.

     

    In addition, I would think having IDs would provide a lot more flexibility

    in making interactive reports, i.e. Would facilitate the use of

    javascript/Ajax. This is something in our plan, but dates are not clear

    yet.

     

    Thanks for getting back to me.

    /mt

     

     

    Link to comment
    Share on other sites

    Hi,

     

    A new custom property called net.sf.jasperreports.export.html.id is available at element level, to allow specifying the ID attribute value for HTML and XHTML export.

     

    This will be part of the JR 3.7.0 release.

     

    Thank you,

    Teodor

     

    Link to comment
    Share on other sites


×
×
  • Create New...