Internal Drag and Drop is managed via Prototype and Seam remoting.
It works rather well since 5.0.
The only real problem is about how HTML elements are declared to be Draggable or a Droptarget.
Currently, we let the xhtml (widget or template) generate small scripts (inline in the page) that declare the HTML elemnst to prototype.
Typically we have things like that :
<script type="text/javascript">
<h:outputText
value="new Draggable('docRef:#
<h:outputText rendered="#{row.data.folder}"
value="Droppables.add('docRefTarget:#{row.data.ref}
', {accept:'cell', onDrop:function(element){moveElement(element,'docRef:#
{row.data.ref}')}, hoverclass:'dropInto'});"/>
</script>
This approach has several issues :
- it's ugly
- it can slow down the browser
- it's not easy to maintain
Rather that changing the whole system (and having compat problems), the idea is to continue use Prototype and the same JS infrastructure, but remove the inline scripts that declare the zones.
So, we will replace the inline scripts by one JQuery call that will gather the required elements and initialize DnD on it.
=> This will remove inline scripts
=> Code will be cleaner and faster
=> We don't break any compat
- depends on
-
NXP-6803 Error in Seam Remoting when server request is sent as chunks
- Resolved