{"issue":{"created_at":"2011-11-19T23:43:28Z","state":"open","updated_at":"2011-12-06T21:52:34Z","user":{"gravatar_id":"1ba64a0c896fdc451d754eaefc4b3664","id":292981,"url":"https://api.github.com/users/liftyourgame","login":"liftyourgame","avatar_url":"https://secure.gravatar.com/avatar/1ba64a0c896fdc451d754eaefc4b3664?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":2,"body":"Hi,\r\n\r\nI have a page that allows a user to upload an image via AjaxUpload and then crop it.\r\n\r\nThe upload works fine but when I replace the uploader with my crop component Tapestry complains that there is no FormSupport in the environment.\r\n\r\nHere is my tml:\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<t:layout xmlns:t=\"http://tapestry.apache.org/schema/tapestry_5_3.xsd\"\r\nxmlns:p=\"tapestry:parameter\"\r\n        xmlns:j=\"tapestry-library:jquery\">\r\n\t<h2>Upload Image</h2>\r\n        <br />\r\n    <t:form>\r\n        <t:zone t:id=\"uploadZone\" id=\"uploadZone\">\r\n        <t:errors />\r\n        <!--<input t:type=\"upload\" t:id=\"file\" t:value=\"file\" validate=\"required\" /> <br/>-->\r\n        <j:ajaxupload t:id=\"uploadImage\"\r\n                      t:multiple=\"false\"\r\n                      t:allowedExtensions=\"[jpg, png, gif]\"\r\n                      t:sizeLimit=\"1M\">\r\n            <noscript>\r\n                <p>JavaScript must be activated!</p>\r\n            </noscript>\r\n        </j:ajaxupload>\r\n\r\n        <br/>\r\n\r\n    </t:zone>\r\n    </t:form>\r\n    <t:block t:id=\"uploadResult\">\r\n        <div>\r\n            <h4>Crop Image</h4>\r\n\r\n            <t:if test=\"message\">\r\n                <p>\r\n                    <strong>${message}</strong>\r\n                </p>\r\n            </t:if>\r\n            <t:LygCropImage t:id=\"cropImage\" image=\"prop:getUncroppedImage()\">\r\n\r\n            </t:LygCropImage>\r\n            <p><t:LygSubmit t:id=\"submit\" value=\"literal:Crop Image\"></t:LygSubmit></p>\r\n        </div>\r\n    </t:block>\r\n</t:layout>\r\n```\r\n\r\nRegards,\r\n\r\nGreg\r\n","assignee":{"gravatar_id":"7a15d4add39891269c15f0ce085c8bed","id":555768,"url":"https://api.github.com/users/Gillespie59","login":"Gillespie59","avatar_url":"https://secure.gravatar.com/avatar/7a15d4add39891269c15f0ce085c8bed?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":98,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2290380,"labels":[{"name":"Tapestry5-jQuery Core","color":"02e10c","url":"https://api.github.com/repos/got5/tapestry5-jquery/labels/Tapestry5-jQuery+Core"}],"title":"No form support when replacing a zone inside a form","html_url":"https://github.com/got5/tapestry5-jquery/issues/98","closed_at":null,"url":"https://api.github.com/repos/got5/tapestry5-jquery/issues/98","milestone":{"created_at":"2011-10-12T11:03:21Z","state":"open","due_on":"2011-11-30T08:00:00Z","closed_issues":19,"creator":{"gravatar_id":"7a15d4add39891269c15f0ce085c8bed","id":555768,"url":"https://api.github.com/users/Gillespie59","login":"Gillespie59","avatar_url":"https://secure.gravatar.com/avatar/7a15d4add39891269c15f0ce085c8bed?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":1,"title":"Tapestry5-jQuery 5.3.0","description":"","url":"https://api.github.com/repos/got5/tapestry5-jquery/milestones/1","open_issues":4}},"action":"created","comment":{"created_at":"2011-12-06T21:52:34Z","updated_at":"2011-12-06T21:52:34Z","user":{"gravatar_id":"1ba64a0c896fdc451d754eaefc4b3664","id":292981,"url":"https://api.github.com/users/liftyourgame","login":"liftyourgame","avatar_url":"https://secure.gravatar.com/avatar/1ba64a0c896fdc451d754eaefc4b3664?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Hi Manu,\n\nThis issue turned out to be my own fault.\n\nI forgot that I had a form inside my LygCropImage component.\n\nI'm having a different issue now. The LygCropComponent uses a jQuery \ncomponent\n\nThe problem is that the JavaScript is not being included in the zone \nupdate. This may be a limitation of Zone updates in Tapestry. I can \nupdate my page to include the JavaScript on first render but I can't \nfind a way to trigger the initialization when I return the zone response.\n\nI've attached some of my code.\n\nThanks again for producing such a useful component as tapestry-jquery\n\n\nRegards,\n\nGreg.\n\n\nOn 06/12/11 18:58, Emmanuel DEMEY wrote:\n> Hi\n>\n> Can you give more informations about your issue : what is the LygCropImage ? When you talk about  \"crop component\", do you mean LygCropImage ? Can you send your java class of your page ? and also the files of your \"crop component\" .\n>\n> Thanks.\n>\n> Manu\n>\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/got5/tapestry5-jquery/issues/98#issuecomment-3029737\n<t:container xmlns:t=\"http://tapestry.apache.org/schema/tapestry_5_3.xsd\"\r\n        xmlns:j=\"tapestry-library:jquery\"\r\n        xmlns:p=\"tapestry:parameter\">\r\n\r\n    <t:form t:id=\"cropForm\">\r\n        <input t:id=\"x\" t:type=\"textfield\" value=\"x\"/>\r\n        <input t:id=\"y\" t:type=\"textfield\" value=\"y\"/>\r\n        <input t:id=\"w\" t:type=\"textfield\" value=\"w\"/>\r\n        <input t:id=\"h\" t:type=\"textfield\" value=\"h\"/>\r\n    <table>\r\n        <tr>\r\n            <td>\r\n                <t:lygvisionimage  t:id=\"visionImage\" visionImage=\"image\"/>\r\n            </td>\r\n            <td>\r\n                <div style=\"width:100px;height:100px;overflow:hidden;margin-left:5px;\">\r\n                    <t:lygvisionimage  t:id=\"preview\" visionImage=\"image\"/>\r\n                </div>\r\n            </td>\r\n        </tr>\r\n    </table>\r\n        <t:LygSubmit value=\"literal:Crop\"></t:LygSubmit>\r\n    </t:form>\r\n</t:container>\r\n","id":3039436,"url":"https://api.github.com/repos/got5/tapestry5-jquery/issues/comments/3039436"}}