DND containment values?

UI Components for JSF
Post Reply
ltune
Posts: 125
Joined: 20 Jul 2011, 20:25
Contact:

18 Nov 2011, 13:21

Hi,

please help me with drag and drop containment value. I know you can specify "parent"... The documentation is very poor about this:
containment - Constraints dragging within the boundaries of containment element
So obviously a valid name for a containment element is "parent".. Is this supposed to pass some jqeury attribute? Reading the DraggableRenderer and the enum property for draggable settings was neither helpful.

Has someone used this containment with other values, like some id of parent`s partent, etc?

Greets,

Adam
Busy applying primefaces patches to my local repo at /dev/null

ltune
Posts: 125
Joined: 20 Jul 2011, 20:25
Contact:

18 Nov 2011, 13:59

OK, found it finally:
Constrains dragging to within the bounds of the specified element or region. Possible string values: 'parent', 'document', 'window', [x1, y1, x2, y2].
.

In case someone else tries to find any help. [1]


Greets,

Adam

[1] = http://jqueryui.com/demos/draggable/
Busy applying primefaces patches to my local repo at /dev/null

moxprox
Posts: 20
Joined: 15 Sep 2012, 10:40

06 Dec 2013, 16:37

Hi folks,

I had the same problem/question but I tried some stuff in PF 3.5

Worked: #<html id of component> like

Code: Select all

<p:panelGrid id="someID">
// more stuff
</p:panelGrid>

<p:draggable containment="#someID"/>
Worked not: [x1,y1,x2,y2]

Greetings, Mox.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

06 Dec 2013, 16:51

We just passtrough the containment string, so just have a look at the jquery docu
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests