Funtion of type="service-multi"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Funtion of type="service-multi"

Alex D. Fleming-2
Hi,

What is the function of type="service-multi" in so many controller.xml files
???
For eg :
<event type="service-multi" path=""
invoke="updateProductCategoryToCategory"/>

Please reply me ASAP.

--
Regards
Alex D. Fleming
Reply | Threaded
Open this post in threaded view
|

Re: Funtion of type="service-multi"

cjhowe
in a type="servie"
when you submit a form

fieldA
fieldB
fieldC

it gets to the services's context as fieldA, fieldB,
fieldC

lets say you have a form with mutliple sets of data

fieldA_o_1
fieldB_o_1
fieldC_o_1
fieldA_o_2
fieldB_o_2
fieldC_o_2
fieldA_o_3
fieldB_o_3
fieldC_o_3

type="service-multi" will simply take the first set

fieldA_o_1
fieldB_o_1
fieldC_o_1

strip off the _o_1 and send it to your service, wait
for it to finish and send the second set
fieldA_o_2
fieldB_o_2
fieldC_o_2

strip off the _o_2 and send that to your service, etc

if you find a ftl file that calls one of the URIs that
call a service-multi, it should be pretty clear what
the other parameters are.

--- "Alex D. Fleming" <[hidden email]>
wrote:

> Hi,
>
> What is the function of type="service-multi" in so
> many controller.xml files
> ???
> For eg :
> <event type="service-multi" path=""
> invoke="updateProductCategoryToCategory"/>
>
> Please reply me ASAP.
>
> --
> Regards
> Alex D. Fleming
>

Reply | Threaded
Open this post in threaded view
|

Re: Funtion of type="service-multi"

Alex D. Fleming-2
Thank You Chris.
It was really excellent explanation.

On 11/25/06, Chris Howe <[hidden email]> wrote:

>
> in a type="servie"
> when you submit a form
>
> fieldA
> fieldB
> fieldC
>
> it gets to the services's context as fieldA, fieldB,
> fieldC
>
> lets say you have a form with mutliple sets of data
>
> fieldA_o_1
> fieldB_o_1
> fieldC_o_1
> fieldA_o_2
> fieldB_o_2
> fieldC_o_2
> fieldA_o_3
> fieldB_o_3
> fieldC_o_3
>
> type="service-multi" will simply take the first set
>
> fieldA_o_1
> fieldB_o_1
> fieldC_o_1
>
> strip off the _o_1 and send it to your service, wait
> for it to finish and send the second set
> fieldA_o_2
> fieldB_o_2
> fieldC_o_2
>
> strip off the _o_2 and send that to your service, etc
>
> if you find a ftl file that calls one of the URIs that
> call a service-multi, it should be pretty clear what
> the other parameters are.
>
> --- "Alex D. Fleming" <[hidden email]>
> wrote:
>
> > Hi,
> >
> > What is the function of type="service-multi" in so
> > many controller.xml files
> > ???
> > For eg :
> > <event type="service-multi" path=""
> > invoke="updateProductCategoryToCategory"/>
> >
> > Please reply me ASAP.
> >
> > --
> > Regards
> > Alex D. Fleming
> >




--
Regards
Alex D. Fleming
Reply | Threaded
Open this post in threaded view
|

Re: Funtion of type="service-multi"

Jacopo Cappellato
In reply to this post by Alex D. Fleming-2
Hi Alex, all,

Alex D. Fleming wrote:

> Hi,
>
> What is the function of type="service-multi" in so many controller.xml
> files
> ???
> For eg :
> <event type="service-multi" path=""
> invoke="updateProductCategoryToCategory"/>
>
> Please reply me ASAP.
>

This kind of questions should be posted to the user list, the dev list
is intended for the discussions about the development around the
official OFBiz trunk. There you'll get a better chance to get a quick
response (even if in this occasion you already got an excellent response
from Chris).
Personal opinion/preference: if possible, try to limit the requests for
an urgent response to the really urgent situations (for example... well
I can't think of a good example of this now, but *maybe* there are a few).

Thanks,

Jacopo

Reply | Threaded
Open this post in threaded view
|

Re: Funtion of type="service-multi"

madhu
In reply to this post by cjhowe
i want to delete multiple records at a time using check boxes check by user.i have done for single record delete ata at time.
code for single record delete  

In form :

<form name="ListBookings" type="multi" use-row-submit="true" title="Selected Monument" separate-columns="true"  paginate-target="Book_E_Ticket1"
                 list-name="TicketDetails">
                <actions>
                       
                         <script location="component://eticket/webapp/eticket/WEB-INF/actions/TicketBookingView.groovy"/> 
                </actions>
               
          <field name="ticketId">
                        <display-entity entity-name="TicketBookingDetails" description="${ticketId}"/>
                        <hidden/>
                </field>
                <field name="check"><check></check>
                </field>
                <field name="monumentName">
                        <display/>
                </field>
                <field name="date_visit">
                        <display/>
                </field>
               
                <field name="_rowSubmit" title="${uiLabelMap.CommonSelect}">
                        <hidden value="Y"/>
                </field>
               
                <field name="deleteLink" title="Delete" widget-style="buttontext">
        <hyperlink target="deleteTicket" description="${uiLabelMap.CommonDelete}" also-hidden="false"  confirmation-message ="Are You Sure">
        <parameter param-name="ticketId"/>
      </hyperlink>
    </field>
   
               
        </form>

in controller.xml :

<request-map uri="deleteTicket"><security https="true" auth="false"/>
                <event type="simple" invoke="deleteTicket" path="component://eticket/script/org/ofbiz/eticket/EbookingServices.xml"/>
                <response name="success" type="view" value="booketicket"/><response name="error" type="view" value="booketicket"/></request-map>



simple method to delete single record :

 <simple-method method-name="deleteTicket" short-description="Delete Ticket">
                <entity-one entity-name="TicketBookingDetails" value-field="lookedUpValue"/>
                <remove-value value-field="lookedUpValue"/>
                <set field="_event_message_" value="Successfully Deleted!!"/>     
        </simple-method>

now hot to use this type="service-multi" option to delete multiple records at a time.i want to check wat are all the records are checked and then i have to delete all at a time using single button click

pls do needful urgent
Reply | Threaded
Open this post in threaded view
|

Re: Funtion of type="service-multi"

Ankit Jain-2
In the controller.xml entry change event type="simple" to "service-multi"

<event type="service-multi" invoke="deleteTicket"
path="component://eticket/script/org/ofbiz/eticket/EbookingServices.xml"/>


And Please ask these types questions on User Mailing
List([hidden email]) only.


Regards,
Ankit Jain



On Thu, May 10, 2012 at 12:06 PM, madhu <[hidden email]> wrote:
> <event type="simple" invoke="deleteTicket"
> path="component://eticket/script/org/ofbiz/eticket/EbookingServices.xml"/>
Reply | Threaded
Open this post in threaded view
|

Re: Funtion of type="service-multi"

madhu
thanx ankit.
but if use directly <event type="service-multi" >to my code,how the checked records are handled and how the ids of those checked records will be sent at a time and deleted by using my simple methos.that method can delete one record only at a time na. and i am passing one ticketid only.if u see my code (form) carefully, ihave delete button option for each record.  i want a single delete button to delete al lthe records.in that controller request how to deal this "service-multi" to handle all checked recordsids.

pls see my code and understand my requirement .help me out

thanx ankit for ur reply