I am trying to implement the http://developer.yahoo.com/yui/imagecropper/ for tapestry. Maybe someone is willing to help me / at the end, i will post the full (working code!)
The problem: i am not able to run the example as provided on yahoo with tapestry. alerting with alert(imgCrop) in my add Script method shows me that the variable is loaded, but i dont see a square on my picture for cropping. My pic is loaded but without the cropping square. The yahoo doc says that the two commands should be enough: yui.jpg var imgCrop = new YAHOO.widget.ImageCropper('crop1'); JAVA @Import( library = { "context:plugins/jscropper/yahoo-dom-event.js", "context:plugins/jscropper/dragdrop-min.js", "context:plugins/jscropper/element-min.js", "context:plugins/jscropper/resize-min.js", "context:plugins/jscropper/imagecropper-min.js" }) public class JSCropper { @Property @Persist private String tempImageName; void afterRender(){ if(tempImageName != null){ javaScriptSupport.addScript("var imgCrop = new YAHOO.widget.ImageCropper('cropper_image'); alert(imgCrop);"); } } } TML <t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" xmlns:p="tapestry:parameter"> <t:if test="tempImageName"> <t:form t:id="imageEditForm"> <div style="float:left"> /img/temp/${tempImageName} </div> <div style="clear:left;"></div> </t:form> </t:if> </t:container> TML PAGE WHERE I AM IMPLEMENTING THE PLUGIN <t:plugins.jscropper t:id="jscropper" /> -- View this message in context: http://tapestry.1045711.n5.nabble.com/image-cropper-tp5713738p5713740.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org