You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Alex D. Fleming" <al...@gmail.com> on 2006/11/24 23:55:58 UTC

Funtion of type="service-multi"

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

Re: Funtion of type="service-multi"

Posted by Jacopo Cappellato <ti...@sastau.it>.
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


Re: Funtion of type="service-multi"

Posted by madhu <ma...@lntinfotech.com>.
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

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Funtion-of-type-service-multi-tp174781p4623038.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Funtion of type="service-multi"

Posted by Ankit Jain <an...@gmail.com>.
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(user@ofbiz.apache.org) only.


Regards,
Ankit Jain



On Thu, May 10, 2012 at 12:06 PM, madhu <ma...@lntinfotech.com> wrote:
> <event type="simple" invoke="deleteTicket"
> path="component://eticket/script/org/ofbiz/eticket/EbookingServices.xml"/>

Re: Funtion of type="service-multi"

Posted by madhu <ma...@lntinfotech.com>.
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 

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Funtion-of-type-service-multi-tp174781p4622639.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Funtion of type="service-multi"

Posted by "Alex D. Fleming" <al...@gmail.com>.
Thank You Chris.
It was really excellent explanation.

On 11/25/06, Chris Howe <cj...@yahoo.com> 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" <al...@gmail.com>
> 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

Re: Funtion of type="service-multi"

Posted by Chris Howe <cj...@yahoo.com>.
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" <al...@gmail.com>
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
>