You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Mylonas <ch...@opencsta.org> on 2012/04/05 05:00:36 UTC

tapestry5-jquery dropZone - how to get the draggable item's draggablecontext?

Last message for the day - I promise!!!!

Hi List,

My dragging still isn't working from earlier even though jquery.ui.core is imported but not to worry.  I'm moving on


The example at http://tapestry5-jquery.com/components/docsdraggable#
I'm trying to recreate it as well as test some MarkupWriter stuff but failing.

How does one's getData() get the dropZone's dropped item?

Cheers
Chris

public class Draggable2 {
	
	@Property
	private Draggable draggableItem1;

	@Property
	private Draggable draggableItem2;
	
	
	@Property
	private Zone dropZone ;
	
	@Inject
	private ComponentResources resources ;
	
	public String getData(){
//		return resources.getComponent().getComponentResources().getCompleteId() ; //just returns url
//		return dropZone.getClientId().toString() ; //fails
		return "some sample text";
	}
	
	public Date getNow() {
		return new Date();
	}

	@BeforeRenderTemplate
	void feRender(MarkupWriter writer){
		writer.element("t:jquery.Draggable", "t:id", "chris");
		writer.end();
	}
}


Re: tapestry5-jquery dropZone - how to get the draggable item's draggablecontext?

Posted by Lance Java <la...@googlemail.com>.
Hi Chris,

One of tapestry's principles is static structure and dynamic behaviour (
http://tapestry.apache.org/principles.html).

All components must be defined at compile time and are instantiated/managed
by tapestry