You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Ingo Wolfmayr <in...@wolfix.at> on 2020/10/14 09:42:47 UTC
Use of services in list-form
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
AW: Use of services in list-form
Posted by Ingo Wolfmayr <in...@wolfix.at>.
Hi Deepak,
thanks that works.
Best regards,
Ingo
-----Ursprüngliche Nachricht-----
Von: Deepak Dixit <de...@hotwax.co>
Gesendet: Mittwoch, 14. Oktober 2020 13:22
An: user@ofbiz.apache.org
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: deepak.dixit@hotwax.co
*www.hotwax.co <http://www.hotwax.co/>*
On Wed, Oct 14, 2020 at 3:12 PM Ingo Wolfmayr <in...@wolfix.at>
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
>
Re: Use of services in list-form
Posted by Deepak Dixit <de...@hotwax.co>.
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: deepak.dixit@hotwax.co
*www.hotwax.co <http://www.hotwax.co/>*
On Wed, Oct 14, 2020 at 3:12 PM Ingo Wolfmayr <in...@wolfix.at>
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
>