[jira] Created: (OFBIZ-1410) Improved xsl-fo Decorator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
Improved xsl-fo Decorator
-------------------------

                 Key: OFBIZ-1410
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
            Reporter: Adrian Crum
            Priority: Minor
         Attachments: asset_maint.patch, fo_decorator.patch

Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1410:
-------------------------------

    Attachment: asset_maint.patch
                fo_decorator.patch

fo_decorator.patch is the improvement.

asset_maint.patch is a demo of how it is used.


> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543300 ]

Adrian Crum commented on OFBIZ-1410:
------------------------------------

At first glance this might seem to be a duplication of the existing fo-ftl templates. The difference is, this method allows specifying:

1. Different page sizes via the layoutSettings.pageMasters list
2. Style sheets via the layoutSettings.styleSheets list.
3. A default font family via the layoutSettings.defaultFontFamily element

Everything defaults to letter portrait and Helvetica if no parameters are passed.

This could be built out further by adding more page master ftl files.


> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1410:
-------------------------------

    Attachment:     (was: asset_maint.patch)

> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1410:
-------------------------------

    Attachment: asset_maint.patch

> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1410:
-------------------------------

    Attachment: fo_decorator.patch
                asset_maint.patch

Improved patches.

> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543806 ]

Jacopo Cappellato commented on OFBIZ-1410:
------------------------------------------

Adrian,

this looks really interesting.
About the "asset_maint.patch": wouldn't be better to include the basic-header and footer templates in the screen definition instead of using the
<#include "component://common/webcommon/includes/fo/basic-header.ftl"/>
directives?

For example, see the OrderPDF screen definition.

Jacopo


> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543921 ]

Adrian Crum commented on OFBIZ-1410:
------------------------------------

Jacopo,

Including the header and footer templates in the screen definition would be a different way to do it, but I'm not sure how it would be better. As you know, things have to appear in a specific order in FO files, and as far as I can tell, including the header and footer templates in the screen definition would require splitting the single printFixedAssetMaint.fo.ftl file into multiple files. If you know a cleaner way to accomplish that, then please submit a patch - I would like to see it.



> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543928 ]

Jacopo Cappellato commented on OFBIZ-1410:
------------------------------------------

Yes, the idea is to use the decorator pattern (a global decorator) and the screens that use it have to specify the templates for the regions they want to fill (with non default templates) for example header/footer.
I'm not saying that you (or we) should refactor the existing printFixedAssetMaint.fo.ftl (splitting it up into smaller chunks) now... it was just to discuss a (maybe) different approach.

For an example, have a look at the screen definitions for the PDF of the invoice or order (they both share the same decorator).


> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543937 ]

Adrian Crum commented on OFBIZ-1410:
------------------------------------

I agree there could be additional, component-level decorators. I think the fo-ftl templates I created will allow that.

In the asset maintenance case, it was sufficient to have the decorator handle most of the FOP setup, so the developer can concentrate on the body of the report.


> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549461 ]

Jacopo Cappellato commented on OFBIZ-1410:
------------------------------------------

Adrian,

it is an interesting work and I'd say you can commit it.
However, I think that, using as an example the assetMaint report you have provided, it would be nice to specify the header and footer templates in the screen definition instead of specifying them in the ftl template.

Instead of (in the ftl file):

<fo:page-sequence master-reference="letter-portrait">
  <#include "component://common/webcommon/includes/fo/basic-header.ftl"/>
  <#include "component://common/webcommon/includes/fo/basic-footer.ftl"/>
 
we could have (in the screen definition):

<decorator-screen name="GlobalFoDecorator" location="component://common/widget/CommonScreens.xml">
  <decorator-section name="header">
    <platform-specific>
      <html><html-template location="component://common/webcommon/includes/fo/basic-header.ftl"/></html>
    </platform-specific>
  </decorator-section>
  <decorator-section name="footer">
    <platform-specific>
      <html><html-template location="component://common/webcommon/includes/fo/basic-footer.ftl"/></html>
    </platform-specific>
  </decorator-section>
  <decorator-section name="body">
    <platform-specific>
      <html><html-template location="component://assetmaint/webapp/assetmaint/assetmaint/printFixedAssetMaint.fo.ftl"/></html>
    </platform-specific>
  </decorator-section>
</decorator-screen>

Jacopo

> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549467 ]

Adrian Crum commented on OFBIZ-1410:
------------------------------------

Jacopo,

That's a great suggestion, but I don't think it will work. I like the concept though, so, I'll find a way to make it work.


> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549471 ]

Jacopo Cappellato commented on OFBIZ-1410:
------------------------------------------

We did something very similar with the other reports... have a look for example at the definition of the invoice pdf:

component://accounting/widget/AccountingPrintForms.xml#InvoicePDF

Of course we'll have to move some of the xsl-.fo tags (for example the <fo:page-sequence master-reference="letter-portrait"> should be moved out of the printFixedAssetMaint.fo.ftl template)

Jacopo

Another very minor thing you could improve is the extension of the templates: fo.ftl instead of .fo



> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum reassigned OFBIZ-1410:
----------------------------------

    Assignee: Adrian Crum

> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Assignee: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549473 ]

Adrian Crum commented on OFBIZ-1410:
------------------------------------

Yeah, I'm thinking the <fo:page-sequence> tag should be in one of the shared files, and the master-reference attribute could be parameterized. It could default to "letter-portrait" so you would only have to use the parameter when you wanted something different.

I'll change the file extensions.


> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1410) Improved xsl-fo Decorator

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum closed OFBIZ-1410.
------------------------------

    Resolution: Fixed

Fixed in rev 602516.

> Improved xsl-fo Decorator
> -------------------------
>
>                 Key: OFBIZ-1410
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1410
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Adrian Crum
>            Assignee: Adrian Crum
>            Priority: Minor
>         Attachments: asset_maint.patch, asset_maint.patch, fo_decorator.patch, fo_decorator.patch
>
>
> Improved xsl-fo screen widget decorator scheme. Set up to work more like the GlobalDecorator - complete with parameterized elements.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.