Hello everybody,
I would like to create a form using a service as data provider: This would be the service definition. <service name="exportAcctgBmd" engine="java" location="org.apache.ofbiz.werp.accounting.AccountingServices" invoke="batchExportAcctTransForBmd" auth="true"> <description>Eport accounting transaction for BMD</description> <attribute name="startDate" type="Timestamp" mode="IN" optional="true"/> <attribute name="bmddata" mode="OUT" type="List"/> </service> Here is the form definition: <form name="ExportAcctgBmdCsv" list-name="listIt" target="" type="list" paginate="false"> <actions> <service service-name="exportAcctgBmd" result-map="bmddata" auto-field-map="true"></service> </actions> <field name="belegnr" title="belegnr"><display/></field> </form> What am I missing in order to fill the form with the data from the service? I want to export data as CSV but the result is just showing the header from the field. Best regards, Ingo |
Hi Ingo,
It seems you need to either out `*listIt`* as out param or use the *`result-map-list` *attribute of service tag. Following code should should work *<service name="exportAcctgBmd" engine="java" location="org.apache.ofbiz.werp.accounting.AccountingServices" invoke="batchExportAcctTransForBmd" auth="true"> <description>Eport accounting transaction for BMD</description> <attribute name="startDate" type="Timestamp" mode="IN" optional="true"/> <attribute name="bmddata" mode="OUT" type="List"/></service>Here is the form definition:<form name="ExportAcctgBmdCsv" list-name="bmddata" target="" type="list" paginate="false"> <actions> <service service-name="exportAcctgBmd" result-map="bmddata" result-map-list="bmddata" auto-field-map="true"></service> </actions> <field name="belegnr" title="belegnr"><display/></field></form>* HTH Kind Regards, Deepak Dixit DIRECTOR OF PRODUCT ENGINEERING mobile: +91 9826754548 email: [hidden email] *www.hotwax.co <http://www.hotwax.co/>* On Wed, Oct 14, 2020 at 3:12 PM Ingo Wolfmayr <[hidden email]> wrote: > Hello everybody, > > I would like to create a form using a service as data provider: > > This would be the service definition. > <service name="exportAcctgBmd" engine="java" > location="org.apache.ofbiz.werp.accounting.AccountingServices" > invoke="batchExportAcctTransForBmd" auth="true"> > <description>Eport accounting transaction for BMD</description> > <attribute name="startDate" type="Timestamp" mode="IN" > optional="true"/> > <attribute name="bmddata" mode="OUT" type="List"/> > </service> > > Here is the form definition: > > <form name="ExportAcctgBmdCsv" list-name="listIt" target="" type="list" > paginate="false"> > <actions> > <service service-name="exportAcctgBmd" > result-map="bmddata" auto-field-map="true"></service> > </actions> > <field name="belegnr" title="belegnr"><display/></field> > </form> > > What am I missing in order to fill the form with the data from the > service? I want to export data as CSV but the result is just showing the > header from the field. > > Best regards, > Ingo > |
Hi Deepak,
thanks that works. Best regards, Ingo -----Ursprüngliche Nachricht----- Von: Deepak Dixit <[hidden email]> Gesendet: Mittwoch, 14. Oktober 2020 13:22 An: [hidden email] Betreff: Re: Use of services in list-form Hi Ingo, It seems you need to either out `*listIt`* as out param or use the *`result-map-list` *attribute of service tag. Following code should should work *<service name="exportAcctgBmd" engine="java" location="org.apache.ofbiz.werp.accounting.AccountingServices" invoke="batchExportAcctTransForBmd" auth="true"> <description>Eport accounting transaction for BMD</description> <attribute name="startDate" type="Timestamp" mode="IN" optional="true"/> <attribute name="bmddata" mode="OUT" type="List"/></service>Here is the form definition:<form name="ExportAcctgBmdCsv" list-name="bmddata" target="" type="list" paginate="false"> <actions> <service service-name="exportAcctgBmd" result-map="bmddata" result-map-list="bmddata" auto-field-map="true"></service> </actions> <field name="belegnr" title="belegnr"><display/></field></form>* HTH Kind Regards, Deepak Dixit DIRECTOR OF PRODUCT ENGINEERING mobile: +91 9826754548 email: [hidden email] *www.hotwax.co <http://www.hotwax.co/>* On Wed, Oct 14, 2020 at 3:12 PM Ingo Wolfmayr <[hidden email]> wrote: > Hello everybody, > > I would like to create a form using a service as data provider: > > This would be the service definition. > <service name="exportAcctgBmd" engine="java" > location="org.apache.ofbiz.werp.accounting.AccountingServices" > invoke="batchExportAcctTransForBmd" auth="true"> > <description>Eport accounting transaction for BMD</description> > <attribute name="startDate" type="Timestamp" mode="IN" > optional="true"/> > <attribute name="bmddata" mode="OUT" > type="List"/> </service> > > Here is the form definition: > > <form name="ExportAcctgBmdCsv" list-name="listIt" target="" type="list" > paginate="false"> > <actions> > <service service-name="exportAcctgBmd" > result-map="bmddata" auto-field-map="true"></service> > </actions> > <field name="belegnr" > title="belegnr"><display/></field> > </form> > > What am I missing in order to fill the form with the data from the > service? I want to export data as CSV but the result is just showing > the header from the field. > > Best regards, > Ingo > |
Free forum by Nabble | Edit this page |