HI,

i want to delete multiple records at a time using check boxes check by user.i 
have done for single record delete at a 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


here,main requirements are

1.getting recordids of checked.(in my code ticketids i have for each record in 
hidden format. i m using that id for record deletion.but multiple ids how to 
pass at a time)

2.how to handle those ids for deletion fo those records at a time.

the code i have posted working very fine for single record deletion

________________________________
The contents of this e-mail and any attachment(s) may contain confidential or 
privileged information for the intended recipient(s). Unintended recipients are 
prohibited from taking action on the basis of information in this e-mail and 
using or disseminating the information, and must notify the sender and delete 
it from their system. L&T Infotech will not accept responsibility or liability 
for the accuracy or completeness of, or the presence of any virus or disabling 
code in this e-mail"
*************************************************************************
 This email and attachments have been scanned for
 potential proprietary or sensitive information leakage.
 Websense Data Security, Protecting Your Information from the Inside Out.
 www.websense.com
 *************************************************************************

Reply via email to