Re: How to integrate tacos 4.1 in Tapestry 4.0
Hi, Yep, My current project is using jdk 1.5,Tapestry 4.0 . So I have to restrict to 4.0 version of Tapestry -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-integrate-tacos-4-1-in-Tapestry-4-0-tp4392926p4399734.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: submit context in loop
Hi Paul! Have a look on the defer param of the submit component. I think your submit component should look like: t:submit t:event=RemoveLocation t:context=${location.hashCode()} defer=true/ Best regards, Gerry 2011/5/16 Paul Stanton p...@mapshed.com.au Tapestry 5.1.0.5 Hi all, I'm having a problem with the following code: t:form t:id=locationsForm t:zone=myZone t:loop t:source=locations t:value=location t:encoder=locationEncoder t:textfield t:value=location.name / t:submit t:event=RemoveLocation t:value=remove ${location.hashCode()} t:context=${location.hashCode()} / /t:loop t:submit t:value=save / /t:form Say I end up with the following buttons: input type=submit name=button id=button value=remove 12339020 input type=submit name=button id=button value=remove 2504658 Clicking on either button will only ever trigger the event 'onRemoveLocation' with the context '2504658'. I'm guessing the second submit component is overriding the event handler registered by the first, so they both end up calling the second components event handler. I have tried setting the clientId to something unique but that did not help. I need the remove buttons to submit the same form since the user may update the name of one element and remove the second in the same operation. Advice appreciated, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Portlets and Tapestry-Javascript issues
Sorry for responding so late. I can reproduce the same problem with a very simple .tml without the portlet environment The error happens when adding the core.js script after the body. Then the form validation is broken. Now in my Portal-Pages, the core.js script is added for every tapestry-portlet that has some javascript magic included. Question is whether I can force tapestry NOT to include core.js for certain pages (portlets). Regards Moritz !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; body br/ br/ br/ br/ t:form t:id=myform Integer t:textField value=testValue/ t:submit/ /t:form /body script src=/taptest/assets/4bf3d49e5d3682aa/stack/de/core.js type=text/javascript/ /html The class file for this demo only contains a @Property @Persist private Integer testValue; Am 13.05.2011 um 00:54 schrieb Josh Canfield: I guess it depends on how your portal is rendering the portlets? If it's true that your form works if it's the last thing loaded then you're probably getting some variables trounced as each portlet loads. You could also possibly have element id collisions? Hard to tell without your code. Can you break it down to the simplest portal page that has the problem then post the html that gets generated? By simplest I mean don't include all your form variables just the one that fails etc. Josh On Thu, May 12, 2011 at 1:53 PM, Moritz Gmelin moritz.gme...@gmx.de wrote: Hi, my tapestry/portlets project is advancing quite a bit. I'm currently stuck at a page that contains 3 portlets, each being generate from one tapestry page. One of the portlets contains a form that does some default tapestry javascript form validation (checking whether an integer form really contains an integer value). This validation fails if tapestry includes its javascript default libraries in one of the other portlets. If the other portlets do not contain javascript it works fine. I can also work around this if I move my form portlet to some other location in the page. I think that it always works if the form-containing portlet is the last in the html code of the rendered portal page. Now my question is: can anybody image what is causing these cross-portlet issues? Can I automatically get this fixed my separating the javascript scope on the page? Can I manually disable the tapestry-javascript inclusion in my pages with an annotation? (Then of course I would have to make sure that one of the portlets on the page actually does the inclusion). Thanks for any help Moritz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
More javscript zone events please ...
Hi all, It seems that time and time again for each T5 project (6 out of 7 so far) I find I need to override tapesty.js methods to add additional support for zones. Currently there is only 1 event fired from a zone (Tapestry.ZONE_UPDATED_EVENT), I'd like to suggest/request there be at least 4 events total (3 new ones): 1) ZONE_BEFORE_AJAX_REQUEST_EVENT: This would be fired before the ajax request is sent to the server. Listeners should be able to cancel the ajax request (similiar to the way tapestry allows a form submission to be canceled) 2) ZONE_BEFORE_UPDATE_EVENT: This would be fired after the ajax request returns and just before the zone is updated via the processReply() method. Again, listeners should be able to cancel the update. 3) ZONE_UPDATED_EVENT: already and is listed here for completeness. 4) ZONE_AJAX_REQUEST_ERROR_EVENT: This would be fired if the ajax request errored out for the zone. (includes error data) I think this would cover most if not all use cases. I'd like to hear what Tapestry team and other people think about this idea/suggestion? (If its a valid suggestion/idea I would like to file a JIRA) Thanks, J -- View this message in context: http://tapestry.1045711.n5.nabble.com/More-javscript-zone-events-please-tp4401005p4401005.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: submit context in loop
defer=true This is the right place to look, but the wrong value. True is the default and tells the submit to hold off notifying it's container about it's click until all of the rest of the form elements have been processed. In this case the submit components are getting their context from the loop values. Since the submit is deferred the loop values have changed by the time the notification is made. If you set defer=false then you'll get the notification at the next heartbeat (most likely the end of the loop) and the loop values won't have changed. This seems like a defect. Perhaps submit should be more loop aware and evaluate it's context and store it to the side when the submission is processed. I haven't checked to see if it's already filed. Depending on what you are doing you might consider using an event link, or moving the form inside the loop, so that clicking remove doesn't have to send back all of the information for elements you don't care about... Also, consider this syntax: t:context=[location] When you use ${} for prop bindings you end up converting the value to string unnecessarily. Josh On Mon, May 16, 2011 at 2:48 AM, Gerold Glaser gerold.gla...@gmail.com wrote: Hi Paul! Have a look on the defer param of the submit component. I think your submit component should look like: t:submit t:event=RemoveLocation t:context=${location.hashCode()} defer=true/ Best regards, Gerry 2011/5/16 Paul Stanton p...@mapshed.com.au Tapestry 5.1.0.5 Hi all, I'm having a problem with the following code: t:form t:id=locationsForm t:zone=myZone t:loop t:source=locations t:value=location t:encoder=locationEncoder t:textfield t:value=location.name / t:submit t:event=RemoveLocation t:value=remove ${location.hashCode()} t:context=${location.hashCode()} / /t:loop t:submit t:value=save / /t:form Say I end up with the following buttons: input type=submit name=button id=button value=remove 12339020 input type=submit name=button id=button value=remove 2504658 Clicking on either button will only ever trigger the event 'onRemoveLocation' with the context '2504658'. I'm guessing the second submit component is overriding the event handler registered by the first, so they both end up calling the second components event handler. I have tried setting the clientId to something unique but that did not help. I need the remove buttons to submit the same form since the user may update the name of one element and remove the second in the same operation. Advice appreciated, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: More javscript zone events please ...
On Mon, 16 May 2011 14:06:22 -0300, Joe Klecko buckof...@gmail.com wrote: Hi all, Hi! I think this would cover most if not all use cases. I'd like to hear what Tapestry team and other people think about this idea/suggestion? (If its a valid suggestion/idea I would like to file a JIRA) Please post a JIRA issue. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t:if dose no save its stage in ValidationTracker
If component does not have any interaction with an enclosing Form component, by design. Things become pathologically complicated if it does. 2011/5/15 Василий Жуков vip.del...@gmail.com: Hi everyone, I have some problem with t:if It's my form in Start.tml t:form t:errors/ t:checkbox value=check/ t:if test=check Hello /t:if t:submit/ /t:form It's my Start.java public class Start { @Property private boolean check; @Environmental private ValidationTracker tracker; void pageAttached() { check = true; } Object onValidateForm() { tracker.recordError(onValidateForm); return false; } } After the first render, page shows the checked checkbox and word Hello. if I uncheck the checkbox and press submit, checkbox save you state in ValidationTracker and after post (in render stage) restore it, but t:if dose not save its state in ValidationTracker and in render after post stage test check property from page (and get true). But, in the post stage t:if has false value, not true. Hence, after form post we see unchecked checkbox and word Hello. I think it's wrong. Yes, I can use @Persist on check property, but I need a full page refresh when pressing F5. -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: More javscript zone events please ...
You'll like what's coming in 5.3 then ... I'm working on gradually replacing all the Manager client-side objects with a client-side publish/subscribe event bus. On Mon, May 16, 2011 at 10:41 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Mon, 16 May 2011 14:06:22 -0300, Joe Klecko buckof...@gmail.com wrote: Hi all, Hi! I think this would cover most if not all use cases. I'd like to hear what Tapestry team and other people think about this idea/suggestion? (If its a valid suggestion/idea I would like to file a JIRA) Please post a JIRA issue. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t:if dose no save its stage in ValidationTracker
I have some problem with t:if I think your problem is really with the redirect-after-post paradigm. Yes, I can use @Persist on check property, but I need a full page refresh when pressing F5. Try @Persist(flash). When you read the value it's removed from the session until you store it again. This generally solves the problem. The one place where you might it a snag is if you redirect to a different page after posting the form. In that case the value will remain, you can call ComponentResources#discardPersistentFieldChanges() if you know you're not going to be redirecting to another page. Josh 2011/5/15 Василий Жуков vip.del...@gmail.com: Hi everyone, I have some problem with t:if It's my form in Start.tml t:form t:errors/ t:checkbox value=check/ t:if test=check Hello /t:if t:submit/ /t:form It's my Start.java public class Start { @Property private boolean check; @Environmental private ValidationTracker tracker; void pageAttached() { check = true; } Object onValidateForm() { tracker.recordError(onValidateForm); return false; } } After the first render, page shows the checked checkbox and word Hello. if I uncheck the checkbox and press submit, checkbox save you state in ValidationTracker and after post (in render stage) restore it, but t:if dose not save its state in ValidationTracker and in render after post stage test check property from page (and get true). But, in the post stage t:if has false value, not true. Hence, after form post we see unchecked checkbox and word Hello. I think it's wrong. Yes, I can use @Persist on check property, but I need a full page refresh when pressing F5. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: More javscript zone events please ...
Tapestry 5 has its own seperate bug list (as of about two years ago): TAP5. https://issues.apache.org/jira/browse/TAP5 On Mon, May 16, 2011 at 12:21 PM, Joe Klecko buckof...@gmail.com wrote: Nice! It sounds good Howard, I'm looking forward to T5.3! Here is the jira issue: https://issues.apache.org/jira/browse/TAPESTRY-2778 cheers! -- View this message in context: http://tapestry.1045711.n5.nabble.com/More-javscript-zone-events-please-tp4401005p4401344.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 -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: More javscript zone events please ...
I thought it was weird I didn't T5.2 or T5.3 as version. My apologies, here is the new JIRA: https://issues.apache.org/jira/browse/TAP5-1525 thanks, J -- View this message in context: http://tapestry.1045711.n5.nabble.com/More-javscript-zone-events-please-tp4401005p4401678.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: submit context in loop
thanks guys, defer=false works fine. josh, i do want the other form fields to save their values as part of this operation. cheers, p. On 17/05/2011 3:39 AM, Josh Canfield wrote: defer=true This is the right place to look, but the wrong value. True is the default and tells the submit to hold off notifying it's container about it's click until all of the rest of the form elements have been processed. In this case the submit components are getting their context from the loop values. Since the submit is deferred the loop values have changed by the time the notification is made. If you set defer=false then you'll get the notification at the next heartbeat (most likely the end of the loop) and the loop values won't have changed. This seems like a defect. Perhaps submit should be more loop aware and evaluate it's context and store it to the side when the submission is processed. I haven't checked to see if it's already filed. Depending on what you are doing you might consider using an event link, or moving the form inside the loop, so that clicking remove doesn't have to send back all of the information for elements you don't care about... Also, consider this syntax: t:context=[location] When you use ${} for prop bindings you end up converting the value to string unnecessarily. Josh On Mon, May 16, 2011 at 2:48 AM, Gerold Glasergerold.gla...@gmail.com wrote: Hi Paul! Have a look on the defer param of the submit component. I think your submit component should look like: t:submit t:event=RemoveLocation t:context=${location.hashCode()} defer=true/ Best regards, Gerry 2011/5/16 Paul Stantonp...@mapshed.com.au Tapestry 5.1.0.5 Hi all, I'm having a problem with the following code: t:form t:id=locationsForm t:zone=myZone t:loop t:source=locations t:value=location t:encoder=locationEncoder t:textfield t:value=location.name / t:submit t:event=RemoveLocation t:value=remove ${location.hashCode()} t:context=${location.hashCode()} / /t:loop t:submit t:value=save / /t:form Say I end up with the following buttons: input type=submit name=button id=button value=remove 12339020 input type=submit name=button id=button value=remove 2504658 Clicking on either button will only ever trigger the event 'onRemoveLocation' with the context '2504658'. I'm guessing the second submit component is overriding the event handler registered by the first, so they both end up calling the second components event handler. I have tried setting the clientId to something unique but that did not help. I need the remove buttons to submit the same form since the user may update the name of one element and remove the second in the same operation. Advice appreciated, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
chenillekit version for tap 5.1.0.5
hi all, does chenillekit have documentation regarding version compatibility, and which version of chenillekit-tapestry should I use alongside tapestry 5.1.0.5 ? thanks, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: chenillekit version for tap 5.1.0.5
Ok i've gone with version 1.2.0 and figured out the confusing 'exclusions' required in the pom... is that the most up to date version compatible with T5.1.0.5 ? If so, where can I find the component documentation for this version because I'm getting an exception: Parameter 'translate' of component X is bound to null p. On 17/05/2011 9:27 AM, Paul Stanton wrote: hi all, does chenillekit have documentation regarding version compatibility, and which version of chenillekit-tapestry should I use alongside tapestry 5.1.0.5 ? thanks, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: chenillekit version for tap 5.1.0.5
never mind, my mistake :( On 17/05/2011 10:17 AM, Paul Stanton wrote: Ok i've gone with version 1.2.0 and figured out the confusing 'exclusions' required in the pom... is that the most up to date version compatible with T5.1.0.5 ? If so, where can I find the component documentation for this version because I'm getting an exception: Parameter 'translate' of component X is bound to null p. On 17/05/2011 9:27 AM, Paul Stanton wrote: hi all, does chenillekit have documentation regarding version compatibility, and which version of chenillekit-tapestry should I use alongside tapestry 5.1.0.5 ? thanks, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Logo asset path
Hi, I'm trying to reference a logo in my Layout component. The logo is located in the project under src/main/webapp/layout/images/logo.png After reading http://tapestry.apache.org/tapestry5/guide/assets.html I would have thought that the correct way to reference it from Layout.tml would be: img src=context:layout/images/logo.png/ But this gives a broken link and Chrome reports: GET context:layout/images/logo.png undefined (undefined) Please help. Regards, Greg.
Re: Logo asset path
On Mon, May 16, 2011 at 5:32 PM, Greg Pagendam-Turner g...@liftyourgame.com wrote: I'm trying to reference a logo in my Layout component. The logo is located in the project under src/main/webapp/layout/images/logo.png After reading http://tapestry.apache.org/tapestry5/guide/assets.html I would have thought that the correct way to reference it from Layout.tml would be: img src=context:layout/images/logo.png/ Did you try: img src=${context:layout/images/logo.png}/ ? -Dave - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Logo asset path
Thanks Dave, That works. Perhaps the examples at http://tapestry.apache.org/tapestry5/guide/assets.html should be changed to include ${} Regards, Greg. On 17/05/2011 10:43 AM, David Rees wrote: On Mon, May 16, 2011 at 5:32 PM, Greg Pagendam-Turner g...@liftyourgame.com wrote: I'm trying to reference a logo in my Layout component. The logo is located in the project under src/main/webapp/layout/images/logo.png After reading http://tapestry.apache.org/tapestry5/guide/assets.html I would have thought that the correct way to reference it from Layout.tml would be: img src=context:layout/images/logo.png/ Did you try:img src=${context:layout/images/logo.png}/ ? -Dave - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Logo asset path
On Mon, May 16, 2011 at 5:46 PM, Greg Pagendam-Turner g...@liftyourgame.com wrote: Perhaps the examples at http://tapestry.apache.org/tapestry5/guide/assets.html should be changed to include ${} Latest docs are better than those old docs. http://tapestry.apache.org/assets.html -Dave - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
form validation for async submission
Hi List, In the following example, where does the recordError message go and how do I get the partial render to display the validation messages/recorded errors? tml excerpt: t:zone t:id=myZone t:form t:id=myForm t:zone=myZone t:submit value=submit / /t:form /t:zone java excerpt: @InjectComponent private Zone myZone; @InjectComponent private Form myForm; MultiZoneUpdate onSuccessFromMyForm() { myForm.recordError(you are doing it wrong); return new MultiZoneUpdate(myZone, myZone); } Regards, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: form validation for async submission
Hi To display error messages put t:errors/ anywhere inside your form regards Taha On Tue, May 17, 2011 at 10:56 AM, Paul Stanton p...@mapshed.com.au wrote: Hi List, In the following example, where does the recordError message go and how do I get the partial render to display the validation messages/recorded errors? tml excerpt: t:zone t:id=myZone t:form t:id=myForm t:zone=myZone t:submit value=submit / /t:form /t:zone java excerpt: @InjectComponent private Zone myZone; @InjectComponent private Form myForm; MultiZoneUpdate onSuccessFromMyForm() { myForm.recordError(you are doing it wrong); return new MultiZoneUpdate(myZone, myZone); } Regards, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org