Page methods guidelines ...
Hi! I have been porting a web app to T5 for some weeks now and have some questions on how you folks do! I started fresh with using ... onActivate() as method for preparing data for the template code. Some times onActivate(ctx) + ctx onPassivate(). Actions where handled in onActionFromFoo() or onActionFromBar() methods. Form processing in onSuccess() Fine so far Then I read http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/onactivateandonpassivate/3 that disencourage using onActivate() as the setup methtod. I also just realised that onActivate() is called prior to onSuccess() ... which makes some of code run twice I then thought that ... public void setupRender() ... would be a better place to do my page preparements but then I am not able to navigate to another page. Is onActivate() really such as a bad place do the the preparements? If not how do I distinguish between the case where a form is submitted or a normal page rendering. Thanks in advance, Gunnar Eketrapp
t5: sending json object to an actionlink
Hi, I use jQuery's post to send json objects to an actionlink, but how to convert it back to a json object in the T5 side? I read somewhere we can use json.js to convert first a json to string before sending, but including that json.js always encounter an javascript exception, any idea how? Thanks, -- View this message in context: http://www.nabble.com/t5%3A-sending-json-object-to-an-actionlink-tp25842204p25842204.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
Re: t5: sending json object to an actionlink
org.apache.tapestry5.json, JSONArray, JSONLiteral, JSONObject, JSONString i guess you can recive the json object as a parameter onActivate(JSONObject json) and you also can send it back with ajax to de client -- View this message in context: http://www.nabble.com/t5%3A-sending-json-object-to-an-actionlink-tp25842204p25846521.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
jumploader integration help
Hi all, I have some big questions for today, i found this java applet http://jumploader.com/index.html http://jumploader.com/index.html that is made for uploading multiple photos. Did anyone had any experience with it, and can you share how to integrate it in tapestry. PS it uses multipart -- View this message in context: http://www.nabble.com/jumploader-integration-help-tp25848774p25848774.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
Re: jumploader integration help
I should add that if you search for 'swfupload' in the mailing list there are some threads that might be useful. Daniel blueboy6 wrote: Hi all, I have some big questions for today, i found this java applet http://jumploader.com/index.html http://jumploader.com/index.html that is made for uploading multiple photos. Did anyone had any experience with it, and can you share how to integrate it in tapestry. PS it uses multipart -- View this message in context: http://www.nabble.com/jumploader-integration-help-tp25848774p25849220.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
t5: calling action link from a javascript
Hi, I'm trying to call an actionlink from a javascript, but i'm getting: Remote server closed the connection before sending response header and I never see the pop up dialog in the javascript, any idea how to avoid errors like this? Thanks. A.C. sample code: in java: public String getUpdateItem() { return resources.createActionLink(updateItem, false).toURI() } Object onUpdateItem() { return new TextStreamResponse(text/html, ok); } in javascript: jQuery.post(updateItem(), { item_no : ino }, function(data){ alert(Data Loaded: + data); }); -- View this message in context: http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849523.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
Re: calling action link from a javascript
updateItem()? I think should be ${updateItem()}. DH http://www.gaonline.com.cn - Original Message - From: Angelo Chen angelochen...@yahoo.com.hk To: users@tapestry.apache.org Sent: Monday, October 12, 2009 9:40 AM Subject: t5: calling action link from a javascript Hi, I'm trying to call an actionlink from a javascript, but i'm getting: Remote server closed the connection before sending response header and I never see the pop up dialog in the javascript, any idea how to avoid errors like this? Thanks. A.C. sample code: in java: public String getUpdateItem() { return resources.createActionLink(updateItem, false).toURI() } Object onUpdateItem() { return new TextStreamResponse(text/html, ok); } in javascript: jQuery.post(updateItem(), { item_no : ino }, function(data){ alert(Data Loaded: + data); }); -- View this message in context: http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849523.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
Re: t5: calling action link from a javascript
Are you sure you're javascript is using the correct url? I don't know what your updateItem() JS function does, but generally you need to construct the actionlink url (as you have done) then pass this to the javascript using RenderSupport's addScript() method Toby 2009/10/12 Angelo Chen angelochen...@yahoo.com.hk Hi, I'm trying to call an actionlink from a javascript, but i'm getting: Remote server closed the connection before sending response header and I never see the pop up dialog in the javascript, any idea how to avoid errors like this? Thanks. A.C. sample code: in java: public String getUpdateItem() { return resources.createActionLink(updateItem, false).toURI() } Object onUpdateItem() { return new TextStreamResponse(text/html, ok); } in javascript: jQuery.post(updateItem(), { item_no : ino }, function(data){ alert(Data Loaded: + data); }); -- View this message in context: http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849523.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
Re: jumploader integration help
There's also an excellent commercial tool called Aurigma image uploader ( http://www.aurigma.com ) that I've used with Tapestry in the past. I've actually wrapped this as a T5 component so if you consider using it let me know and I'll send you the code Toby 2009/10/12 Daniel Jones d...@murieston.com I should add that if you search for 'swfupload' in the mailing list there are some threads that might be useful. Daniel blueboy6 wrote: Hi all, I have some big questions for today, i found this java applet http://jumploader.com/index.html http://jumploader.com/index.html that is made for uploading multiple photos. Did anyone had any experience with it, and can you share how to integrate it in tapestry. PS it uses multipart -- View this message in context: http://www.nabble.com/jumploader-integration-help-tp25848774p25849220.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
Re: t5: calling action link from a javascript
Hi Toby, It got called in the firefox but not in safari, here is what I do: in the .tml file: script type=text/javascript function updateItem() { return ${updateItem}; } /script in the .js file: jQuery.post(updateItem(), { item_no : ino }, function(data){ alert(Data Loaded: + data.status), json; }); Toby Hobson-3 wrote: Are you sure you're javascript is using the correct url? I don't know what your updateItem() JS function does, but generally you need to construct the actionlink url (as you have done) then pass this to the javascript using RenderSupport's addScript() method Toby 2009/10/12 Angelo Chen angelochen...@yahoo.com.hk Hi, I'm trying to call an actionlink from a javascript, but i'm getting: Remote server closed the connection before sending response header and I never see the pop up dialog in the javascript, any idea how to avoid errors like this? Thanks. A.C. sample code: in java: public String getUpdateItem() { return resources.createActionLink(updateItem, false).toURI() } Object onUpdateItem() { return new TextStreamResponse(text/html, ok); } in javascript: jQuery.post(updateItem(), { item_no : ino }, function(data){ alert(Data Loaded: + data); }); -- View this message in context: http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849523.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 -- View this message in context: http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849812.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
Using Checkboxe on t:grid or table
Hi, I am new to tapestry so excuses if this question is already been posted. How can I add checkboxes to a form and how can i find out which checkboxes are check in java class ? -- View this message in context: http://www.nabble.com/Using-Checkboxe-on-t%3Agrid-or-table-tp25850459p25850459.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