OverviewSince 3.0 The <ace:draggable> tag gives another component the capability to be dragged.
Getting StartedThe component we want to make draggable is specified as the value of the for attribute. <h:graphicImage id="sampleImage" value="#{bean.imagePath}" /> <ace:draggable for="sampleImage" /> Alernatively, the for value can be omitted and the parent component will be made draggable. <h:graphicImage id="sampleImage" value="#{bean.imagePath}"> <ace:draggable /> </h:graphicImage> Attributes
for Id of the component that will have the draggable capabilities. helper Specifies whether to move the original node or a clone of it. Possible values are 'original' and 'clone' (default is 'original'). opacity Specifies the opacity for the helper node during dragging. Values can range from 0.00 to 1.00. scope Keyword of this draggable component. This draggable will only be allowed to be dropped on droppables with the same keyword. axis Used to restrict the drag movement of this item to an axis. Possible values are 'x', 'y' or null for no restriction (default is null). containment Id of the parent component whose boundaries should restrict the movement of this draggable. Event Listeners
Client Behavior Events
JavaScript APIsICEfaces 3.xThe client side component object is exposed through the global variable name specified in the widgetVar attribute. ICEfaces 4+The "widgetVar" attribute on the ACE components has been removed in ICEfaces 4 and in its place a new "ice.ace.instance()" client JavaScript object lookup API has been introduced. The reason for this change is to enable lazy-initialization of the ACE component JavaScript objects to improve runtime performance and reduce browser memory use. var widget = ice.ace.instance('frm:componentId);
Keyboard and ARIA supportAt the moment, there is no keyboard and ARIA suppport. Known IssuesWhen using either of dragStartListener or the start ajax event, it is advised not to make significant updates to the component being dragged, since this may cause a dynamic update and replacement of the entire markup of the component in the client. Thus, if the user is still dragging the component, they may lose the handle of it when this update occurs. There is no problem updating components that are inside the component being dragged. There is also no problem updating components that are outside of the component being dragged, as long as they don't cause a full form update if the component being dragged is inside such form. If this scenario should occur, it is very likely that it can be avoided by making certain changes on the facelet. Other ResourcesNone. |
Draggable
© Copyright 2021 ICEsoft Technologies Canada Corp.