Just create a Frremarker template to output entities in whatever format
you want.
-Adrian
ARays wrote:
Think XmlFormRenderer.java is the file from which "Export" is getting
appended. This being a core portion of the framework, not sure how to go
forward without touching it. Is there a easy way to use a custom
XMLFormRenderer? The idea is to export GLAccount details for 3rd party
accounting package directly meeting their schema. Would like to keep it
flexible so that in future it can be easily extended to cover more than 1
3rd party package.
- Aray
ARays wrote:
Never mind my previous note.. Was able to get it working with an entry as
below
<field name="MyaccountId" entry-name="glAccountId">
<display></display>
</field>
This outputs with the XML tag using the name supplied. :-)
Almost there, now the last hurdle. The output
<OrganizationGlAccount>
.........
..
</OrganizationGlAccount>
comes enclosed within
<OrganizationGlAccountExport></OrganizationGlAccountExport>
Need to change both of these to look something like
<MyGlAccountExport>
<MyGlAccount>
.........
..
</MyGlAccount>
</MyGlAccountExport>
Continuing to explore and of course amazed at the powerful things that the
framework can do!
- Arays
ARays wrote:
Thanks.. Sure it is readable in excel or similar tools.
My requirement however is to output XML that is directly compatible. For
example , right now the output I get is as below
<OrganizationGlAccount>
<glAccountId>100000</glAccountId>
<glAccountClassId>ASSET</glAccountClassId>
..........
</OrganizationGlAccount>
would instead like to output
<MyGlAccount>
<MyAccountId>100000</MyAccountId>
<MyAccountClassId>ASSET</MyAccountClassId>
..........
</MyGlAccount>
Just changing the tags, that's all.
Right now notice that the related form has
<auto-fields-entity entity-name="GlAccount"
default-field-type="display"/>
Tried using individual field output as below
<field name="accountId" entry-name="glAccountId">
But this loose the XML tags.
Still digging but unsure what am I missing
- Aray
Jacopo Cappellato-4 wrote:
On Jun 11, 2009, at 5:45 PM, ARays wrote:
b) I am able to route it to simple.xml.ftl by simply overwriting the
contents of simple.ftl. Do get an XML output as well. Need to change
the XML
tags though from the ofbiz entity names to target system name tags.
What are
my options? XSLT or map modified names in form or something else?
That XML format should be readable by Excel, if you use it (or similar
tool) you should be able to change/add/remove columns etc...
Jacopo