Primefaces Diagram element is not dragable when added dynamicly

UI Components for JSF
Post Reply
zatan007
Posts: 1
Joined: 16 Apr 2017, 08:49

08 Feb 2018, 20:22

Hello

I create an action of right click on the panel and display contextmenu.
And after click on the contextmenu, I add the element to the model.

After add first element, it was fine. It is still can be dragged.

But somehow, after add the 2nd element. All of the elements cannot be dragged anymore.

This my code when adding to the model of the diagram.

Code: Select all

Element newElement = new Element(
					new TestElement(Integer.toString(this.x)+","+Integer.toString(this.y)), 
					Integer.toString(this.x)+"px", 
					Integer.toString(this.y)+"px") ;
newElement.setDraggable(true);
model.addElement(newElement);
Can someone help please ?

Thank you in advance.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 45 guests