• Export a view

    By Marc Jonkers 1 decade ago

    I'm trying to export data from a viewPanel.

    I tried : data.addNewDynamicData("product", "viewColumn2");

    this works , but this only gives me the first row of the view.
    

    In the pdf template I marked the text field as multiple line.

    How do I go trough the other lines .... ?

     

    • Views

      By Rami Muurimäki 1 decade ago

      I'm afraid that this functionality you're trying to reach is out or reach with this control. The PDF template and the business logic supports only form types of export.

      I studied such a functionality but didn't find a proper solution so this remains in my "todo" list.

      If you're trying just to export the view and its content, you can achieve that using the iText Java library. I think xpages.tv has 1-2 videos which show how.

      • Viewpanel to pdf

        By Marc Jonkers 1 decade ago

        Well , what is possible is for example :

        sessionScope.put("test", "this is the first line \r and this is the second line");

        data.addNewDynamicData("item", "eval:sessionScope.test");

        This will print 2 lines of text on the pdf form in the "item" field. (on the pdf template I marked this text field as multiple line)

        So, if you know how I could store all lines of a column of a view in a scoped variable and add \r in between each line, (as in my example above) it will be possible to export the view to a pdf form.