integration between html 5 drag & drop and sap abap http icf services

20
Integration between HTML 5 Drag & Drop and SAP ABAP HTTP ICF Services Alessandro Spadoni & Patrizia Rossi October 8th, 2011 1

Upload: kyros

Post on 11-Jan-2016

32 views

Category:

Documents


4 download

DESCRIPTION

Integration between HTML 5 Drag & Drop and SAP ABAP HTTP ICF Services. Alessandro Spadoni & Patrizia Rossi October 8th, 2011. Overview. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

1

Integration between HTML 5 Drag & Drop and SAP ABAP HTTP ICF

Services

Alessandro Spadoni & Patrizia RossiOctober 8th, 2011

Page 2: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

2

Overview

Html 5 has the ability to create drag & drop events (DnD). The spec defines an event-based mechanism, JavaScript API, and additional markup for declaring that just about any type of element be draggable on a page.

Page 3: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

3

There are number of events which are fired during various stages of the DnD operation: Dragstart

Drag & Drop events

Page 5: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

There are number of events which are fired during various stages of the DnD operation: Dragstart Drag Dragenter

5

Drag & Drop events

Page 7: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

There are number of events which are fired during various stages of the DnD operation: Dragstart Drag Dragenter Dragover Dragleave

7

Drag & Drop events

Page 9: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

There are number of events which are fired during various stages of the DnD operation: Dragstart Drag Dragenter Dragover Dragleave Drop

9

Drag & Drop events

Page 11: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

There are number of events which are fired during various stages of the DnD operation: Dragstart Drag Dragenter Dragover Dragleave Drop Dragend

11

Drag & Drop events

Page 12: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

12

Events Descriptiondragstart Fires when the user starts dragging of the object. The most important property of a dragstart

event object is dataTransfer. The setData() method can be called in response to the dragstart event.

drag Fires every time the mouse is moved while the object is being dragged.

dragenter Fired when the mouse is first moved over the target element while a drag is occurring. A listener for this event should indicate whether a drop is allowed over this location. If there are no listeners, or the listeners perform no operations, then a drop is not allowed by default.

dragover This event is fired as the mouse is moved over an element when a drag is occurring. Much of the time, the operation that occurs during a listener will be the same as the dragenter event.

dragleave This event is fired when the mouse leaves an element while a drag is occurring. Listeners should remove any highlighting or insertion markers used for drop feedback.

drop The drop event is fired on the element where the drop was occurred at the end of the drag operation. A listener would be responsible for retrieving the data being dragged and inserting it at the drop location. The most important property of a drop event object is dataTransfer. The getData() method can be called in response to the drop event.

dragend Fires when the user releases the mouse button while dragging an object.

Drag & Drop events - Summary

Page 13: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

13

Next slide shows a first example of integration between Html 5 and Sap.Given a draggable element of type <table>, we can export his contents (DOM innerHTML) in excel format by calling a Sap SICF Service synchronously submitting an HTML form via POST method.SAP Service parses HTML code as XML using class CL_IXML and our custom class ZCL_HTML_TABLEPARSER. HTTP Response will return a binary Excel as Attachment.

Integration DnD with Sap – Part I

Page 15: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

15

Page 16: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

16

Integration DnD with Sap – Part II

Next slide shows a second example of integration.Dragging an AIRLINE image in a target area: On Drop event we can do an AJAX request to Abap SICF Service.Response is a JSON Object containing SFlights Data.

Page 18: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

18

Page 20: Integration  between HTML 5 Drag &  Drop  and SAP ABAP HTTP ICF Services

20

Thank You!

Alessandro SpadoniSap Netweaver Consultant

Technis Blu S.R.L. [email protected] @alespad

Patrizia RossiSap Netweaver Consultant

Technis Blu S.R.L. [email protected] @patty_1982