Thanks BJ Freeman. The pointers were really helpful. Even though I was pretty
close using screenxml with a view entity, figured that the framework is
putting a wrapper tag with Export suffix which is hard to handle without an
xslt or a ftl that can manipulate the Form output xml (I couldn't figure out
how). So, back to basics simply wrote a screen on the same view and an FTL
where I now put the tags element by element as required and everything works
as intended. 

Would still love to fix the limitation of screenxml but perhaps at a later
time when I develop a little more familiarity with the framework. 

Since you referred QB (my requirement is similar though not QB) did you or
anyone try and import from QB to setup initial chart of accounts? I may need
something similar shortly and thinking about the possible approaches. 

Thank again
- Aray 





BJ Freeman wrote:
> 
> I am interfacing to QB but using a different approach, using the content
> component.
> I have created a view entity that marshals the data I want in the
> columns I want.
> I use a the dataresource as journal.QBInterface
> the electronictext
> I have code that selects the rows I want and then exports the xml, in qb
>  xml format.
> 
> you can also look at using the tranforms, or take a look at the
> applications\product\templates\shipment templates for ideas.
> 
> just to let you know there are other ways to accomplish this.
> 
> ARays sent the following on 6/11/2009 11:08 AM:
>> 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
>>>>>
>>>>>
>>>>>  
>>>>>
>>>>
>>>
>> 
> 
> -- 
> BJ Freeman
> http://www.businessesnetwork.com/automation
> http://bjfreeman.elance.com
> http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
> Systems Integrator.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/screenxml----how-does-it-work--tp23983906p24031644.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to