ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingo Wolfmayr <ingo.wolfm...@wolfix.at>
Subject AW: Use of services in list-form
Date Wed, 14 Oct 2020 11:52:45 GMT
Hi Deepak,

thanks that works.

Best regards,
Ingo

-----Urspr√ľngliche Nachricht-----
Von: Deepak Dixit <deepak.dixit@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 <ingo.wolfmayr@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
>
Mime
View raw message