Re: Basic question about URL rewriting and Tapestry 5
Thanks Steve. I was also considering: http://ocpsoft.org/rewrite/ Julien. 2012/5/8 Steve Eynon steve.ey...@alienfactory.co.uk I find Tuckey's Url Rewrite Filter a good option for simple rewrites: http://www.tuckey.org/urlrewrite/ Steve. -- Steve Eynon --- If at first you don't succeed, so much for skydiving! On 8 May 2012 04:23, Julien Martin bal...@gmail.com wrote: Thanks Thiago! 2012/5/7 Julien Martin bal...@gmail.com Thanks Thiago! I was not aware of that. J. 2012/5/7 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 07 May 2012 14:19:24 -0300, Julien Martin bal...@gmail.com wrote: Hi all! Hi! @Thiago: My only concern is about SEO optimization. Can you provide any guideline about LinkTransformer usage? I read Igor's blog entry but I am still not sure how to use the LinkTransformer for my specific use case... For SEO optimization, as far as I know, the event URLs are irrelevant, as the crawlers (bots) follow redirects. -- 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
Basic question about URL rewriting and Tapestry 5
Hello, 1. I have the following T5 action link: *t:actionlink page=ContactUs context=literal:en hreflang=enen/t:actionlink* 2. Which translate into the following link: *http://localhost:8080/ume-web/fr/contactus.actionlink_1/en* 3. Which in turn, when clicked, displays the following URL: *http://localhost:8080/ume-web/en/contactus* I am just wondering whether my action links could directly render as in 3. i.e. avoid the not so pretty URLs such as : (* http://localhost:8080/ume-web/fr/contactus.actionlink_1/en*) Is that possible through URL rewriting? Perhaps using Igor Drobiazko's rewrite module? Can anyone please provide guidelines? Regards, Julien Martin.
Re: Basic question about URL rewriting and Tapestry 5
Hi all! @Cezary: I can just use a page link as an action is called on the server side as follows: @OnEvent(EventConstants.ACTION) void changeLocale(String language) { persistentLocale.set(new Locale(language)); } @Thiago: My only concern is about SEO optimization. Can you provide any guideline about LinkTransformer usage? I read Igor's blog entry but I am still not sure how to use the LinkTransformer for my specific use case... Best regards, Julien. 2012/5/7 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 07 May 2012 12:50:16 -0300, Julien Martin bal...@gmail.com wrote: Hello, Hi! 1. I have the following T5 action link: *t:actionlink page=ContactUs context=literal:en hreflang=enen/t:**actionlink* 2. Which translate into the following link: *http://localhost:8080/ume-**web/fr/contactus.actionlink_1/**en*http://localhost:8080/ume-web/fr/contactus.actionlink_1/en* 3. Which in turn, when clicked, displays the following URL: *http://localhost:8080/ume-**web/en/contactus*http://localhost:8080/ume-web/en/contactus* I am just wondering whether my action links could directly render as in 3. i.e. avoid the not so pretty URLs such as : (* http://localhost:8080/ume-web/**fr/contactus.actionlink_1/en*http://localhost:8080/ume-web/fr/contactus.actionlink_1/en* ) Is that possible through URL rewriting? Perhaps using Igor Drobiazko's rewrite module? Can anyone please provide guidelines? Event URLs are not supposed to be pretty because it never really remains in the browser address bar, as Tapestry does redirect-after-post. The answer to your question is yes, LinkTransformer can be used to rewrite these URLs, but I don't think you should worry about them, just about page ones. -- 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
Re: Basic question about URL rewriting and Tapestry 5
Thanks Thiago! 2012/5/7 Julien Martin bal...@gmail.com Thanks Thiago! I was not aware of that. J. 2012/5/7 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 07 May 2012 14:19:24 -0300, Julien Martin bal...@gmail.com wrote: Hi all! Hi! @Thiago: My only concern is about SEO optimization. Can you provide any guideline about LinkTransformer usage? I read Igor's blog entry but I am still not sure how to use the LinkTransformer for my specific use case... For SEO optimization, as far as I know, the event URLs are irrelevant, as the crawlers (bots) follow redirects. -- 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
Re: Retrieving and displaying the current locale
Thanks a lot! It works. :-) 2012/5/4 derkoe tapestry.christian.koeb...@gmail.com Julien Martin wrote Hello, What is the best way to retrieve and display the currently used locale's language on a page with tapestry? Thanks in advance, Julien. In your page class: @Property(write=false) @Inject Locale locale; In your tml: Current language is: ${locale.language} -- View this message in context: http://tapestry.1045711.n5.nabble.com/Retrieving-and-displaying-the-current-locale-tp5686219p5686573.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
Is is possible to specify an HREFLANG attribute for an ActionLink?
Hello, I need to be able to specify the anchor's hreflang attribute for a ActionLink. There does not seem to be any such attribute for the tapestry action link. Is there a workaround? Regards, Julien.
Re: Is is possible to specify an HREFLANG attribute for an ActionLink?
Hello Thiago! Thanks. I am going to look for relevant documentation (about mixins) and do as you advised. Regards, Julien. 2012/5/4 Thiago H. de Paula Figueiredo thiag...@gmail.com On Fri, 04 May 2012 09:36:40 -0300, Julien Martin bal...@gmail.com wrote: Hello, Hi! I need to be able to specify the anchor's hreflang attribute for a ActionLink. There does not seem to be any such attribute for the tapestry action link. Is there a workaround? You can write a mixin that adds this attribute after the ActionLink renders the a element into the Tapestry DOM and apply it to your ActionLinks. -- 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
Re: Beginner needs help with writing a mixin
Hello Thiago, It does display a hreflang but in the body tag as follows: body hreflang=fr It now just boils down to locating the right a tag. Any idea? Regards, Julien. P.S. Sorry for writing to you directly Thiago. 2012/5/4 Julien Martin bal...@gmail.com Hi, It does not display any hreflang attribute in the html source... Regards, Julien. 2012/5/4 Thiago H. de Paula Figueiredo thiag...@gmail.com On Fri, 04 May 2012 14:01:24 -0300, Julien Martin bal...@gmail.com wrote: Hello, Hi! I am trying to write/code a mixin that will simply add the hreflang attribute to tapestry action links. Here is what I tried (it does not work unfortunately...) Please define 'it doesn't work'. ;) You seem to be in the right track, probably with just a couple mistakes. -- 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
Re: Beginner needs help with writing a mixin
Hello Thiago, Success! It works. Here is what I tried (was not able to understand the forceAttribute() syntax...). @AfterRender public void afterRender(MarkupWriter writer) { String id = clientElement.getClientId(); Element element = writer.getDocument().getElementById(id); element.attribute(hreflang, lang); } Thanks a lot! Will update the other post/question accordingly. Regards, Julien. 2012/5/4 Thiago H. de Paula Figueiredo thiag...@gmail.com On Fri, 04 May 2012 14:23:16 -0300, Julien Martin bal...@gmail.com wrote: Hello Thiago, Hi! It does display a hreflang but in the body tag as follows: body hreflang=fr Ah, ok. :) It now just boils down to locating the right a tag. I'd try this: give an id (not t:id) to the link and, inside your mixin: /* ClientElement so your mixin can be used with any component that implements this interface, and ActionLink is one of them. */ @InjectContainer private ClientElement clientElement; void afterRender(MarkupWriter writer) { String id = clientElement.getClientId(); Element element = writer.getDocument().**getElementById(id); element.forceAttributes(...); } Please let us know if this works. :) -- 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
Re: Slightly more involved question about creating mixins with Tapestry
Thanks to Thiago I managed to get it to work as follows: public class HrefLangMixin { @InjectContainer private ClientElement clientElement;//NEW @Parameter(name = lang, required = true, defaultPrefix = BindingConstants.LITERAL) private String lang; @AfterRender public void afterRender(MarkupWriter writer) { String id = clientElement.getClientId();//NEW Element element = writer.getDocument().getElementById(id);//NEW element.attribute(hreflang, lang); } } Regards, Julien. 2012/5/4 Julien Martin bal...@gmail.com Hello, I have the following actionLink in a tml page: t:actionlink page=ContactUs t:mixins=HrefLangMixin t:lang=literal:fr context=literal:frfr/t:actionlink Can someone please advise how to retrieve/locate the actionLink from within the HrefLangMixin class? Here is what I tried but it just locate the body tag instead of the actionLink tag: public class HrefLangMixin { @Parameter(name = lang, required = true, defaultPrefix = BindingConstants.LITERAL) private String lang; // The code @AfterRender public void afterRender(MarkupWriter writer) { Element actionLinkElem = writer.getElement(); actionLinkElem.attribute(hreflang, lang); } } Is there a trick to find my t:actionlink tag? If so what is it? Regards, Julien.
Re: Beginner needs help with writing a mixin
Thanks anyway to both of you. I wrote my first tapestry mixin today! Regards, Julien. 2012/5/4 Thiago H. de Paula Figueiredo thiag...@gmail.com On Fri, 04 May 2012 15:41:50 -0300, Robert Zeigler robert.zeig...@roxanemy.com wrote: Just thinking out loud... not sure why you need a mixin here in the first place? All of tapestry's links support informal parameters. So, eg: a t:id=mylink t:type=actionlink hreflang=frLink/a Should should just work? Ouch, I completely forgot ActionLink and EventLink support informal parameters . . . -- 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-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Displaying the current locale's language
Hello, I need to be able to specify the anchor's hreflang attribute in a T5 action link. 1. There does not seem to be any such attribute for the tapestry action link. Is there a workaround? 2. I want to use the current locale's language such as fr or en. Here is what I tried: @Inject private PersistentLocale persistentLocale; @Property @Persist(PersistenceConstants.FLASH) private String language; @OnEvent(EventConstants.ACTION) void changeLocale(String language) { persistentLocale.set(new Locale(language)); language = persistentLocale.get().getLanguage(); } and then ${language} This result in a blank for the language variable. Can anyone please help? Regards, Julien.
Issue with Maven + Eclipse + Tapestry (slightly off-topic)
Hello all, I am interested in getting feedback from those of you who use Maven + Eclipse in order to develop Tapestry applications. I recently realized that Tapestry templates located in *src/main/resources*also need to be located in *src/test/resources* in order to be picked up during unit tests. I am not sure how to configure my environment to avoid copying the **.tml*files from *src/main/resources* into *src/test/resources*. Can anyone please share tips or advice? Regards, J. P.S. This is slightly off-topic as it also relates to Eclipse and Maven. Sorry...
Re: Issue with Maven + Eclipse + Tapestry (slightly off-topic)
Hello Chris, Thanks! You pointed me to the right direction. I changed my POM as follows: *build* * resources* * resource* * directorysrc/main/java/directory* * includes* * include**/*.tml/include* * include**/*.properties/include* * /includes* * /resource* * resource* * directorysrc/main/resources/directory* * includes* * include**/*/include* * include**/*.xml/include* * include**/*.tml/include* * include**/*.properties/include* * /includes* * /resource* * /resources* It now works fine. Regards, Julien. Le 16 février 2012 09:26, Chris Mylonas ch...@opencsta.org a écrit : I don't know, but there's a tapestry testing module called testify that might be worth having a look at the docs. Might be some hints there http://tapestrytestify.sourceforge.net/project-layout.html I don't know the answer for you unfortunately, HTH, Chris On 16/02/2012, at 7:13 PM, Julien Martin wrote: Hello all, I am interested in getting feedback from those of you who use Maven + Eclipse in order to develop Tapestry applications. I recently realized that Tapestry templates located in *src/main/resources*also need to be located in *src/test/resources* in order to be picked up during unit tests. I am not sure how to configure my environment to avoid copying the **.tml*files from *src/main/resources* into *src/test/resources*. Can anyone please share tips or advice? Regards, J. P.S. This is slightly off-topic as it also relates to Eclipse and Maven. Sorry... - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Issue with Maven + Eclipse + Tapestry (slightly off-topic)
Thanks Lance, Le 16 février 2012 11:15, Lance Java lance.j...@googlemail.com a écrit : I would avoid putting resources (.tml and .properties) in src/main/java as you are going against maven's conventions. Only java files should go in src/main/java. Resources should go into src/main/resources and test resources should go in src/test/resources. *Good point! Done. * What you said initially about needing to copy resources into src/test/resources is incorrect. Your test cases will see all classes in src/main/java and all resources in src/main/resources. With the addition that all of the src/test/* files are available too. I use maven with the m2eclipse plugin which keeps eclipse up-to-date with your pom.xml. On Thursday, 16 February 2012, Julien Martin bal...@gmail.com wrote: Hello Chris, Thanks! You pointed me to the right direction. I changed my POM as follows: *build* * resources* * resource* * directorysrc/main/java/directory* * includes* * include**/*.tml/include* * include**/*.properties/include* * /includes* * /resource* * resource* * directorysrc/main/resources/directory* * includes* * include**/*/include* * include**/*.xml/include* * include**/*.tml/include* * include**/*.properties/include* * /includes* * /resource* * /resources* It now works fine. Regards, Julien. Le 16 février 2012 09:26, Chris Mylonas ch...@opencsta.org a écrit : I don't know, but there's a tapestry testing module called testify that might be worth having a look at the docs. Might be some hints there http://tapestrytestify.sourceforge.net/project-layout.html I don't know the answer for you unfortunately, HTH, Chris On 16/02/2012, at 7:13 PM, Julien Martin wrote: Hello all, I am interested in getting feedback from those of you who use Maven + Eclipse in order to develop Tapestry applications. I recently realized that Tapestry templates located in *src/main/resources*also need to be located in *src/test/resources* in order to be picked up during unit tests. I am not sure how to configure my environment to avoid copying the **.tml*files from *src/main/resources* into *src/test/resources*. Can anyone please share tips or advice? Regards, J. P.S. This is slightly off-topic as it also relates to Eclipse and Maven. Sorry... - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Issue with my T5 unit tests
Hello Christian and thanks for replying, Notice that I overwrite the map entry in the test method: *fieldValues.put(acceptsConditions, **false**);* So the problem is definitely somewhere else. Regarding, my use of the @persist annotation: you're right. Thanks. Regards, Julien. * * Le 15 février 2012 18:53, derkoe tapestry.christian.koeb...@gmail.com a écrit : Julien Martin wrote Hello, Hi! Julien Martin wrote I am trying to make sure that if a user has not accepted the terms and conditions, then they cannot register. However my *testFailsIfConditionsNotAccepted* always fails and logging info indicates that the checkbox is always checked despite the test setting the value of the boolean to false. This behavior is not exhibited when I run my app and when I test my forms manually... Can anyone please help? Maybe that's because you set the acceptsConditions to true in the test: fieldValues.put(acceptsConditions, true);* And one comment: childminderAccount does not have to be @Persist - you reset it to a new instance anyway every time in setupRender Julien Martin wrote Regards, J. Chris -- View this message in context: http://tapestry.1045711.n5.nabble.com/Issue-with-my-T5-unit-tests-tp5486297p5486842.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
Does unit testing of Tapestry pages make http calls?
Hello, I am still trying to resolve my unit testing problems. In order to make some progress, I would need to know whether page unit testing (see http://tapestry.apache.org/unit-testing-pages-or-components.html) makes http calls. Can anyone please let me know? Regards, Julien.
Re: Does unit testing of Tapestry pages make http calls?
Hi Thiago! I see. I was asking because I noticed that when running tests as documented by the link below, the console output seems to indicate that the test are in-container tests. Regards, J. Le 15 février 2012 23:10, Thiago H. de Paula Figueiredo thiag...@gmail.coma écrit : On Wed, 15 Feb 2012 18:43:16 -0200, Julien Martin bal...@gmail.com wrote: Hello, Hi! I am still trying to resolve my unit testing problems. In order to make some progress, I would need to know whether page unit testing (see http://tapestry.apache.org/**unit-testing-pages-or-**components.htmlhttp://tapestry.apache.org/unit-testing-pages-or-components.html) makes http calls. I'm not sure, but using some logic, I'd say the answer is no. If it did HTTP calls, it wouldn't be unit testing, being integration testing instead. -- 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
Re: Component xxx does not contain embedded component 'yyy'.
=childminderRegistrationForm t:clientValidation=none* * table class=formTable* * tr* * tdlabel class=right-align t:type=label for=accountEmailAddress //td* * tdinput t:type=textfield t:id=accountEmailAddress name=accountEmailAddress value=childminderAccount.accountEmailAddress t:validate=required //td* * td class=errort:error for=accountEmailAddress //td* * /tr* * * * tr* * tdlabel class=right-align t:type=label for=accountFirstName //td* * tdinput t:type=textfield t:id=accountFirstName value=childminderAccount.accountFirstName //td* * tdt:error for=accountFirstName //td* * /tr* * * * tr* * tdlabel class=right-align t:type=label for=accountLastName //td* * tdinput t:type=textfield t:id=accountLastName value=childminderAccount.accountLastName //td* * tdt:error for=accountLastName //td* * /tr* * * * tr* * tdlabel class=right-align t:type=label for=accountPassword //td* * tdinput t:type=passwordfield t:id=accountPassword value=childminderAccount.accountPassword t:validate=required //td* * tdt:error for=accountPassword //td* * /tr* * * * tr* * tdlabel class=right-align t:type=label for=accountPasswordConfirmation //td* * tdinput t:type=passwordfield t:id=accountPasswordConfirmation value=accountPasswordConfirmation t:validate=required //td* * tdt:error for=accountPasswordConfirmation //td* * /tr* * * * tr* * tdlabel class=right-align t:type=label for=accountPostcode //td* * tdinput t:type=textfield t:id=accountPostcode size=5 value=childminderAccount.accountPostcode t:validate=required //td* * tdt:error for=accountPostcode //td* * /tr* * * * tr* * tdlabel class=right-align t:type=label for=childminderStatus //td* * tdinput t:type=select model=childminderStatusSelectModel t:id=childminderStatus value=childminderAccount.childminderstatusID blankLabel=votre status blankOption=always* * t:validate=required //td* * tdt:error for=childminderStatus //td* * /tr* * tr* * tdlabel class=right-align t:type=label for=kaptcha //td* * tdt:kaptchafield t:image=kaptchaImage t:id=kaptcha t:validate=required //td* * tdt:kaptchaimage t:id=kaptchaImage / t:error for=kaptcha //td* * /tr* * tr* * td/td* * td colspan=2input t:type=submit type=submit value=message:childminder-registration-submit //td* * /tr* * * * /table* * /form* * * * t:pagelink page=advertisement/NewAdvertisementcreer nouvelle annonce/t:pagelink* */t:childminderlayout* Regards, Julien. Le 14 février 2012 13:09, Jonathan Barker jonathan.theit...@gmail.com a écrit : The error doesn't look like it has anything to do with testing. Java and tml files please. On Mon, Feb 13, 2012 at 4:17 PM, Julien Martin bal...@gmail.com wrote: up please Le 13 février 2012 13:07, Julien Martin bal...@gmail.com a écrit : Hello, I am trying to implement some tapestry tests for my pages. Here is the test method: *@Test* * public void test() {* * String appPackage = com.bignibou.web;* * String appName = app;* * BignibouPageTester tester = new BignibouPageTester(appPackage, appName, src/main/webapp);* * Document doc = tester.renderPage(account/childminderregistration);* * Element childminderRegistrationForm = doc.getElementById(childminderRegistrationForm);* * MapString, String fieldValues = new HashMapString, String();* * fieldValues.put(accountEmailAddress, bal...@yahoo.fr);* * fieldValues.put(accountFirstName, Julien);* * fieldValues.put(accountLastName, Martin);* * fieldValues.put(accountPassword, mm);* * fieldValues.put(accountPasswordConfirmation, mm);* * fieldValues.put(accountPostcode, 75003);* * fieldValues.put(childminderStatus, nourrice);* * assertNotNull(tester);* * assertNotNull(doc);* * assertNotNull(childminderRegistrationForm);* * Document docFromForm = tester.submitForm(childminderRegistrationForm, fieldValues);* * assertTrue(docFromForm.toString().contains(bal...@yahoo.fr));* * }* Here is the stack trace of the exception I get: 5363 [main] ERROR org.apache.tapestry5.ioc.Registry - Unable to inject component into field accountEmailAddressField of class com.bignibou.web.pages.account.ChildminderRegistration: Component account/ChildminderRegistration does not contain embedded component 'accountEmailAddress'. 5363 [main] ERROR org.apache.tapestry5.ioc.Registry - Operations trace: 5363 [main] ERROR org.apache.tapestry5.ioc.Registry - [ 1] Constructing instance of page class com.bignibou.web.pages.account.ChildminderRegistration 5370 [main] ERROR org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler - Processing of request failed with uncaught exception: Unable to inject component into field accountEmailAddressField of class com.bignibou.web.pages.account.ChildminderRegistration: Component account/ChildminderRegistration does not contain embedded component 'accountEmailAddress'. org.apache.tapestry5.ioc.internal.OperationException: Unable to inject component into field accountEmailAddressField of class
Strange errors occurring with my unit tests...
Hello, I am trying to implement tests for my Tapestry app. First, I noticed that since upgrading to T5.3.2 and Spring 3.1.0 I get the following stacktrace when Tomcat starts: 14 févr. 2012 17:07:50 org.apache.catalina.startup.ContextConfig checkHandlesTypes ATTENTION: Unable to load class [org.apache.xml.resolver.Catalog] to check against the @HandlesTypes annotation of one or more ServletContentInitializers. java.lang.ClassNotFoundException: org.apache.xml.resolver.Catalog at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523) at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2006) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1969) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1858) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1826) at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1812) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1306) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:896) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:322) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) at org.apache.catalina.startup.Catalina.start(Catalina.java:621) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450) 14 févr. 2012 17:07:50 org.apache.catalina.startup.ContextConfig checkHandlesTypes ATTENTION: Unable to load class [org.apache.xml.resolver.CatalogEntry] to check against the @HandlesTypes annotation of one or more ServletContentInitializers. java.lang.ClassNotFoundException: org.apache.xml.resolver.CatalogEntry at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523) at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2006) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1969) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1858) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1826) at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1812) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1306) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:896) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:322) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148) at
Re: Component xxx does not contain embedded component 'yyy'.
Jonathan, Make the t:id match the field name so you don't separately specify it in the @InjectComponent I would like to try this but notice that I use both the field component and the field i.e.: @InjectComponent(accountPasswordConfirmation) private PasswordField accountPasswordConfirmationField; @Property private String accountPasswordConfirmation; Hence the difference in name. Try removing that field and related tml markup and see if you get the same error on another field. I am going to try that. Is the tml file you are editing really the tml being used? I've hit strange stuff with old .class or .tml files in the classpath courtesy of Eclipse. Is this something that works when you run it, but only fails in testing? Good point: it definitely runs fine in the browser but I get errors with my unit tests. I'll come back as soon as I have tried point two...[?] Regards, Julien. On Tue, Feb 14, 2012 at 7:19 AM, Julien Martin bal...@gmail.com wrote: Thanks for replying Jonathan, Here is the java: *package com.bignibou.web.pages.account;* * * *import java.util.List;* * * *import javax.validation.Valid;* *import javax.validation.constraints.NotNull;* * * *import org.apache.log4j.Logger;* *import org.apache.tapestry5.EventConstants;* *import org.apache.tapestry5.Link;* *import org.apache.tapestry5.SelectModel;* *import org.apache.tapestry5.annotations.AfterRender;* *import org.apache.tapestry5.annotations.DiscardAfter;* *import org.apache.tapestry5.annotations.InjectComponent;* *import org.apache.tapestry5.annotations.InjectPage;* *import org.apache.tapestry5.annotations.OnEvent;* *import org.apache.tapestry5.annotations.Persist;* *import org.apache.tapestry5.annotations.Property;* *import org.apache.tapestry5.annotations.SetupRender;* *import org.apache.tapestry5.corelib.components.Form;* *import org.apache.tapestry5.corelib.components.PasswordField;* *import org.apache.tapestry5.corelib.components.TextField;* *import org.apache.tapestry5.ioc.Messages;* *import org.apache.tapestry5.ioc.annotations.Inject;* *import org.apache.tapestry5.json.JSONObject;* *import org.apache.tapestry5.services.PageRenderLinkSource;* *import org.apache.tapestry5.services.SelectModelFactory;* *import org.apache.tapestry5.services.javascript.JavaScriptSupport;* * * *import com.bignibou.domain.ChildMinderStatus;* *import com.bignibou.domain.ChildminderAccount;* *import com.bignibou.service.AccountService;* *import com.bignibou.web.pages.utils.JSonPostcodesWithQueryParam;* * * *public class ChildminderRegistration {* * * * private Logger log = Logger.getLogger(ChildminderRegistration.class);* * * * @Inject* * private JavaScriptSupport javaScriptSupport;* * * * @Inject* * private PageRenderLinkSource pageRenderLinkSource;* * * * @Property* * @Persist* * @Valid* * private ChildminderAccount childminderAccount;* * * * @Property* * private SelectModel childminderStatusSelectModel;* * * * @Inject* * private Messages messages;* * * * @Inject* * private SelectModelFactory selectModelFactory;* * * * @Property* * @NotNull* * private String accountPasswordConfirmation;* * * * @Property* * private ListChildMinderStatus childMinderStatusList;* * * * @Inject* * private AccountService accountService;* * * * @InjectComponent(accountEmailAddress)* * private TextField accountEmailAddressField;* * * * @InjectComponent(accountPassword)* * private PasswordField accountPasswordField;* * * * @InjectComponent(accountPasswordConfirmation)* * private PasswordField accountPasswordConfirmationField;* * * * @InjectComponent* * private Form childminderRegistrationForm;* * * * @SetupRender* * void prepare() {* * childminderAccount = new ChildminderAccount();* * childMinderStatusList = accountService.loadChildminderStatusList();* * childminderStatusSelectModel = selectModelFactory.create(childMinderStatusList, childMinderStatusDescription);* * }* * * * @AfterRender* * void afterRender() {* * Link jSonPostcodesWithQueryParamLink = pageRenderLinkSource.createPageRenderLink(JSonPostcodesWithQueryParam.class); * * String link = jSonPostcodesWithQueryParamLink.toAbsoluteURI();* * JSONObject specs = new JSONObject();* * specs.put(link, link);* * javaScriptSupport.addInitializerCall(autocomplete, specs);* * }* * * * @OnEvent(value = EventConstants.VALIDATE, component = childminderRegistrationForm)* * void validateRegistrationForm() {// TODO: refactor* * * * if (!accountService.validateEmailAddress(childminderAccount.getAccountEmailAddress())) {* * childminderRegistrationForm.recordError(accountEmailAddressField, messages.get(invalid-email-address));// TODO* * }* * * * if (!accountService.validateEmailAddressDoesNotExist(childminderAccount.getAccountEmailAddress
Re: Component xxx does not contain embedded component 'yyy'.
Try removing that field and related tml markup and see if you get the same error on another field. I am going to try that. *No luck with this either...*
Re: Component xxx does not contain embedded component 'yyy'.
Thanks Jonathan! I have tried manually copying the *.tml files to the src/test/resources and it does work now. What can I do in order to make sure Tapestry picks up the *.tml from src/main/resources? J. Le 14 février 2012 19:24, Jonathan Barker jonathan.theit...@gmail.com a écrit : Just out of curiosity, what happens if you copy your tml files from your src/main/resources to src/test/resources tree? Are they being picked up at all in testing? On Tue, Feb 14, 2012 at 1:12 PM, Julien Martin bal...@gmail.com wrote: Try removing that field and related tml markup and see if you get the same error on another field. I am going to try that. *No luck with this either...* -- Jonathan Barker ITStrategic - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Component xxx does not contain embedded component 'yyy'.
Ok Thiago. Will do! Le 14 février 2012 21:29, Julien Martin bal...@gmail.com a écrit : You're right Thiago. Thanks. Le 14 février 2012 21:08, Thiago H. de Paula Figueiredo thiag...@gmail.com a écrit : On Tue, 14 Feb 2012 17:53:42 -0200, Julien Martin bal...@gmail.com wrote: Thanks Jonathan! I have tried manually copying the *.tml files to the src/test/resources and it does work now. What can I do in order to make sure Tapestry picks up the *.tml from src/main/resources? It isn't Tapestry responsibility to that. You must configure your environment to do that (IDE, servlet container, etc) -- 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
Component xxx does not contain embedded component 'yyy'.
) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119) at $RequestHandler_c5334e9b6fe4.service(Unknown Source) at $RequestHandler_c5334e9b6fd3.service(Unknown Source) at org.apache.tapestry5.test.PageTester.renderPageAndReturnResponse(PageTester.java:205) at org.apache.tapestry5.test.PageTester.renderPage(PageTester.java:176) at com.bignibou.web.pages.ChildminderRegistrationTest.test(ChildminderRegistrationTest.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.RuntimeException: Unable to inject component into field accountEmailAddressField of class com.bignibou.web.pages.account.ChildminderRegistration: Component account/ChildminderRegistration does not contain embedded component 'accountEmailAddress'. at org.apache.tapestry5.internal.transform.InjectComponentWorker$InjectedComponentFieldValueConduit.load(InjectComponentWorker.java:71) at org.apache.tapestry5.internal.transform.InjectComponentWorker$InjectedComponentFieldValueConduit.access$000(InjectComponentWorker.java:36) at org.apache.tapestry5.internal.transform.InjectComponentWorker$InjectedComponentFieldValueConduit$1.containingPageDidLoad(InjectComponentWorker.java:57) at org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:186) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:193) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:178) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) ... 63 more Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Component account/ChildminderRegistration does not contain embedded component 'accountEmailAddress'. at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.getEmbeddedElement(ComponentPageElementImpl.java:860) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.getEmbeddedComponent(InternalComponentResourcesImpl.java:186) at org.apache.tapestry5.internal.transform.InjectComponentWorker$InjectedComponentFieldValueConduit.load(InjectComponentWorker.java:68) ... 69 more The field does exist in the form and it it the first one occurring in the form. Can anyone please help? Regards, Julien Martin.
Contributing to Tapestry...
Hello, I am a Tapestry user and sometime in the remote future (when I am more proficient with T5), I might be interested in contibuting ideas/issue reports or patches to Tapestry (if that is possible of course). I feel I need quite a few more months of T5 experience before being able to contribute anything to T5. However, I had a few questions that I hope a committer could help me with: -Can you confirm whether Tapestry is using svn or git? -How are code submissions from non-committer handled by committers? Perhaps patches? Regards, Julien.
Re: Contributing to Tapestry...
Hi Thiago, Thanks for the info! Regards, Julien. Le 13 février 2012 20:31, Thiago H. de Paula Figueiredo thiag...@gmail.coma écrit : On Mon, 13 Feb 2012 15:48:37 -0200, Julien Martin bal...@gmail.com wrote: Hello, Hi! I am a Tapestry user and sometime in the remote future (when I am more proficient with T5), I might be interested in contibuting ideas/issue reports or patches to Tapestry (if that is possible of course). I feel I need quite a few more months of T5 experience before being able to contribute anything to T5. Nice! However, I had a few questions that I hope a committer could help me with: -Can you confirm whether Tapestry is using svn or git? SVN, as it's basically the only VCS provided by Apache. We would love to move to Git if/when we have a chance. -How are code submissions from non-committer handled by committers? Patches? Yes. Open a JIRA issue, attach a patch containing both code and tests. Then some committer can take a look and if he thinks it's good, it's applied and committed. Don't forget you can contribute code, but not just that: feedback, bug reports, discussions, suggestions are always welcome. :) -- 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-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Component xxx does not contain embedded component 'yyy'.
up please Le 13 février 2012 13:07, Julien Martin bal...@gmail.com a écrit : Hello, I am trying to implement some tapestry tests for my pages. Here is the test method: *@Test* * public void test() {* * String appPackage = com.bignibou.web;* * String appName = app;* * BignibouPageTester tester = new BignibouPageTester(appPackage, appName, src/main/webapp);* * Document doc = tester.renderPage(account/childminderregistration);* * Element childminderRegistrationForm = doc.getElementById(childminderRegistrationForm);* * MapString, String fieldValues = new HashMapString, String();* * fieldValues.put(accountEmailAddress, bal...@yahoo.fr);* * fieldValues.put(accountFirstName, Julien);* * fieldValues.put(accountLastName, Martin);* * fieldValues.put(accountPassword, mm);* * fieldValues.put(accountPasswordConfirmation, mm);* * fieldValues.put(accountPostcode, 75003);* * fieldValues.put(childminderStatus, nourrice);* * assertNotNull(tester);* * assertNotNull(doc);* * assertNotNull(childminderRegistrationForm);* * Document docFromForm = tester.submitForm(childminderRegistrationForm, fieldValues);* * assertTrue(docFromForm.toString().contains(bal...@yahoo.fr));* * }* Here is the stack trace of the exception I get: 5363 [main] ERROR org.apache.tapestry5.ioc.Registry - Unable to inject component into field accountEmailAddressField of class com.bignibou.web.pages.account.ChildminderRegistration: Component account/ChildminderRegistration does not contain embedded component 'accountEmailAddress'. 5363 [main] ERROR org.apache.tapestry5.ioc.Registry - Operations trace: 5363 [main] ERROR org.apache.tapestry5.ioc.Registry - [ 1] Constructing instance of page class com.bignibou.web.pages.account.ChildminderRegistration 5370 [main] ERROR org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler - Processing of request failed with uncaught exception: Unable to inject component into field accountEmailAddressField of class com.bignibou.web.pages.account.ChildminderRegistration: Component account/ChildminderRegistration does not contain embedded component 'accountEmailAddress'. org.apache.tapestry5.ioc.internal.OperationException: Unable to inject component into field accountEmailAddressField of class com.bignibou.web.pages.account.ChildminderRegistration: Component account/ChildminderRegistration does not contain embedded component 'accountEmailAddress'. at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121) at org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:177) at $PageLoader_c5334e9b702b.loadPage(Unknown Source) at org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:104) at $PageSource_c5334e9b7028.getPage(Unknown Source) at org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:82) at $RequestPageCache_c5334e9b7027.get(Unknown Source) at $RequestPageCache_c5334e9b7022.get(Unknown Source) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55) at org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2207) at $PageRenderRequestHandler_c5334e9b7026.handle(Unknown Source) at $PageRenderRequestHandler_c5334e9b7020.handle(Unknown Source) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) at org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) at $ComponentRequestHandler_c5334e9b7021.handlePageRender(Unknown Source) at $ComponentRequestHandler_c5334e9b6fe8.handlePageRender(Unknown Source) at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) at $Dispatcher_c5334e9b6feb.dispatch(Unknown Source) at $Dispatcher_c5334e9b6fe2.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_c5334e9b6fe4.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) at $RequestHandler_c5334e9b6fe4.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) at $RequestHandler_c5334e9b6fe4.service(Unknown Source) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90
Re: Igor Drobiazko Book
Check out Igor's twitter here: https://twitter.com/#!/drobiazko You'll find the latest info about the book. Regards, J. 2012/2/6 Koka Kiknadze 226...@gmail.com Hi, As I recall, after Manning cancelled Drobiazko's book he was going to publish it on his own. Any news out there? I'm sure lots of us in this list are waiting for it. Nicholoz Kiknadze
Re: Igor Drobiazko Book
@Igor: great! Good luck with the remaining work. 2012/2/6 Igor Drobiazko igor.drobia...@gmail.com The book is already 350 pages thick. Only few chapters to go. I'm working hard to finish the remaining chapters as soon as possible. On Mon, Feb 6, 2012 at 12:02 PM, Koka Kiknadze 226...@gmail.com wrote: Hi, As I recall, after Manning cancelled Drobiazko's book he was going to publish it on his own. Any news out there? I'm sure lots of us in this list are waiting for it. Nicholoz Kiknadze -- Best regards, Igor Drobiazko http://tapestry5.de http://twitter.com/drobiazko
OptionGroupModel samples?
Hello, I am still exploring the Tapestry components and I noticed the OptionGroupModel interface in the Tapestry API. I was not able to find any code samples using the OptionGroupModel interface. Could anyone please direct me to some code sample using the OptionGroupModel interface please? Regards, Julien.
Re: OptionGroupModel samples?
Hello Thiago! Thanks. Yes I did manage to use the optgroup/OptionGroupModel as follows: *@Property* *private SelectModel availabilitiesSelectModel;* *private ListOptionGroupModel optionGroupModels;* *optionGroupModels = new ArrayListOptionGroupModel();* *availabilitiesSelectModel =new SelectModelImpl(optionGroupModels.toArray(new OptionGroupModel[0]));* J. 2012/2/3 Thiago H. de Paula Figueiredo thiag...@gmail.com On Fri, 03 Feb 2012 12:04:54 -0200, Julien Martin bal...@gmail.com wrote: Hello, Hi! I am still exploring the Tapestry components and I noticed the OptionGroupModel interface in the Tapestry API. I was not able to find any code samples using the OptionGroupModel interface. Could anyone please direct me to some code sample using the OptionGroupModel interface please? Have you tried reading its JavaDoc and implementing this interface yourself? That's what I'd do. -- 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
Question regarding the internals of t:checklist component..
Hello all, I am trying to better understand how T5 components work and I would like to know what the difference is between @Environmental and @Inject and when to use which in the context of component developpement of course. For instance having a look under the hood of t:checklist, I noticed that the validation tracker is injected by the @Environmental annotation as follows: *@Environmental* *private ValidationTracker tracker;* whereas the javascript support variable is injected by the @Inject annotation as follows: *@Inject* *private JavaScriptSupport javaScriptSupport;* * * Any reason why that is? Regards, Julien.
Question regarding the t:delegate tag in the context of t:checklist component
Hello, I noticed that a t:delegate is used in order to render the individual checkboxes of the t:checklist component. See below: t:container xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; div t:type=loop source=availableOptions value=var:currentOption class=t-checklist-row * t:delegate to=var:currentOption/* /div /t:container Can anyone please briefly explain the logic behind this? How can a simple t:delegate tag render a full-fledged checkbox? Regards, Julien.
Re: Question regarding the t:delegate tag in the context of t:checklist component
Hi Thiago, I understand better now. Thanks, J. 2012/1/31 Thiago H. de Paula Figueiredo thiag...@gmail.com On Tue, 31 Jan 2012 14:30:14 -0200, Julien Martin bal...@gmail.com wrote: Hello, Hi! There's no t:delegate tag: there's a Delegate component. Any component instance can be declared using the t:xxx or anyTag t:type=xxx (which is my favorite one). I noticed that a t:delegate is used in order to render the individual checkboxes of the t:checklist component. Can anyone please briefly explain the logic behind this? I can't look at the source now, so I can't answer this. How can a simple t:delegate tag render a full-fledged checkbox? From the Delegate's to parameter JavaDoc: The object which will be rendered in place of the Delegate component. This is typically a specific component instance, or a {@link Block}. -- 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
Re: Referencing the context path from within Javascript?
Hi Thiago! Using your advice, I managed to generate the link easily. I have also moved the script to a separate file as advised. Now what remains unclear to me is that the *addScript* method takes a String and not a url to my javascript file. So on the one hand I have my link, on the other my javascript file. I understand the rationale behind the addScript method: formatting the content of the js file with one or several variables passed as the second argument but what I have is js file not a short script as in the documentation: javaScriptSupport.addScript( $('%s').observe('click', hideMe());, container.getClientId()); How do I pass my js file to the addScript method or do I use another method? Regards, Julien. 2012/1/30 Thiago H. de Paula Figueiredo thiag...@gmail.com On Sun, 29 Jan 2012 19:22:31 -0200, Julien Martin bal...@gmail.com wrote: Thiago, Hi! Yes it is indeed a Tapestry page. Here is the java code for it (there is no template for this page): So the correct way of generating an URL for a page is to @Inject PageRenderLinkSource and use one of its methods. They return a Link. Pass the result of the toAbsoluteURI() method to your JavaScript method by @Inject'ing JavaScriptSupport and using its addScript() method. In addition, as you're returning JSON content, instead of return TextStreamResponse, you can return a JSONObject or a JSONArray. -- 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
Re: Referencing the context path from within Javascript?
Thanks François, I have actually. The issue is how to replace a variable within the js file with the appropriate value. This seems easy enough with an inline script as above but if the script is located in its own file I don't know how to achieve the desired effect. Regards, Julien. Le 30 janvier 2012 11:04, François Facon francois.fa...@atos.net a écrit : Hi Julien, did you try the use of @Import to import your js file as explained http://tapestry.apache.org/javascript.html? Regards François 2012/1/30 Julien Martin bal...@gmail.com: Hi Thiago! Using your advice, I managed to generate the link easily. I have also moved the script to a separate file as advised. Now what remains unclear to me is that the *addScript* method takes a String and not a url to my javascript file. So on the one hand I have my link, on the other my javascript file. I understand the rationale behind the addScript method: formatting the content of the js file with one or several variables passed as the second argument but what I have is js file not a short script as in the documentation: javaScriptSupport.addScript( $('%s').observe('click', hideMe());, container.getClientId()); How do I pass my js file to the addScript method or do I use another method? Regards, Julien. 2012/1/30 Thiago H. de Paula Figueiredo thiag...@gmail.com On Sun, 29 Jan 2012 19:22:31 -0200, Julien Martin bal...@gmail.com wrote: Thiago, Hi! Yes it is indeed a Tapestry page. Here is the java code for it (there is no template for this page): So the correct way of generating an URL for a page is to @Inject PageRenderLinkSource and use one of its methods. They return a Link. Pass the result of the toAbsoluteURI() method to your JavaScript method by @Inject'ing JavaScriptSupport and using its addScript() method. In addition, as you're returning JSON content, instead of return TextStreamResponse, you can return a JSONObject or a JSONArray. -- 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: Referencing the context path from within Javascript?
Thanks Lenny, Is the dependency to com.flowlogix.web.services.AssetMinimizer necessary? Is there a pure-T5 way of retrieving the string from the script? Here is what I came up with borrowing from your code: *javaScriptSupport.addScript(getString(openStream(jsAutocomplete)), link);* * * * private String getString(InputStream is) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; while ((line = br.readLine()) != null) { sb.append(line).append(\n); } return sb.toString(); } private InputStream openStream(Asset asset) throws IOException { return asset.getResource().openStream(); } * It is very low-level but does work. regards, J. 2012/1/30 Lenny Primak lpri...@hope.nyc.ny.us Take a look at these: http://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/java/com/flowlogix/web/mixins/ColorHighlight.java http://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/resources/com/flowlogix/web/mixins/ColorHighlight.js On Jan 30, 2012, at 5:14 AM, Julien Martin wrote: Thanks François, I have actually. The issue is how to replace a variable within the js file with the appropriate value. This seems easy enough with an inline script as above but if the script is located in its own file I don't know how to achieve the desired effect. Regards, Julien. Le 30 janvier 2012 11:04, François Facon francois.fa...@atos.net a écrit : Hi Julien, did you try the use of @Import to import your js file as explained http://tapestry.apache.org/javascript.html? Regards François 2012/1/30 Julien Martin bal...@gmail.com: Hi Thiago! Using your advice, I managed to generate the link easily. I have also moved the script to a separate file as advised. Now what remains unclear to me is that the *addScript* method takes a String and not a url to my javascript file. So on the one hand I have my link, on the other my javascript file. I understand the rationale behind the addScript method: formatting the content of the js file with one or several variables passed as the second argument but what I have is js file not a short script as in the documentation: javaScriptSupport.addScript( $('%s').observe('click', hideMe());, container.getClientId()); How do I pass my js file to the addScript method or do I use another method? Regards, Julien. 2012/1/30 Thiago H. de Paula Figueiredo thiag...@gmail.com On Sun, 29 Jan 2012 19:22:31 -0200, Julien Martin bal...@gmail.com wrote: Thiago, Hi! Yes it is indeed a Tapestry page. Here is the java code for it (there is no template for this page): So the correct way of generating an URL for a page is to @Inject PageRenderLinkSource and use one of its methods. They return a Link. Pass the result of the toAbsoluteURI() method to your JavaScript method by @Inject'ing JavaScriptSupport and using its addScript() method. In addition, as you're returning JSON content, instead of return TextStreamResponse, you can return a JSONObject or a JSONArray. -- 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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Referencing the context path from within Javascript?
Hi François, I like your solution as it seems more flexible. I tried to implement it as follows: /js/jquery.autocomplete.js: *jQuery.noConfict();* *(function($) {* * $.extend(Tapestry.Initializer, {* * bignibou_autocomplete : function(specs) {* * $(#accountPostcode).autocomplete({* * source : function(request, response) {* * var jqxhr = $.ajax({* * url : specs.link,* * type : GET,* * data : {* * term : request.term* * },* * dataType : json* * }).fail(function() {* * console.log(error:);* * console.log(jqxhr.statusText);* * }).success(function(data) {* * response(data);* * });* * },* * minLength : 2* * });* * }* * });* *})(jQuery);* * * From my T5 java page: * * *@Import(library = context:/js/jquery.autocomplete.js)* *...* * @AfterRender public void afterRender() { Link jSonPostcodesWithQueryParamLink = pageRenderLinkSource.createPageRenderLink(JSonPostcodesWithQueryParam.class); String link = jSonPostcodesWithQueryParamLink.toAbsoluteURI(); JSONObject specs = new JSONObject(); specs.put(link, link); javaScriptSupport.addInitializerCall(bignibou_autocomplete, specs); } * I get the following T5 error: Function Tapestry.Initializer.bignibou_autocomplete() does not exist. Any idea what I am getting wrong? Regards, J. 2012/1/30 Julien Martin bal...@gmail.com Thanks Lenny, Is the dependency to com.flowlogix.web.services.AssetMinimizer necessary? Is there a pure-T5 way of retrieving the string from the script? Here is what I came up with borrowing from your code: *javaScriptSupport.addScript(getString(openStream(jsAutocomplete)), link); * * * * private String getString(InputStream is) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; while ((line = br.readLine()) != null) { sb.append(line).append(\n); } return sb.toString(); } private InputStream openStream(Asset asset) throws IOException { return asset.getResource().openStream(); } * It is very low-level but does work. regards, J. 2012/1/30 Lenny Primak lpri...@hope.nyc.ny.us Take a look at these: http://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/java/com/flowlogix/web/mixins/ColorHighlight.java http://code.google.com/p/flowlogix/source/browse/tapestry-services/src/main/resources/com/flowlogix/web/mixins/ColorHighlight.js On Jan 30, 2012, at 5:14 AM, Julien Martin wrote: Thanks François, I have actually. The issue is how to replace a variable within the js file with the appropriate value. This seems easy enough with an inline script as above but if the script is located in its own file I don't know how to achieve the desired effect. Regards, Julien. Le 30 janvier 2012 11:04, François Facon francois.fa...@atos.net a écrit : Hi Julien, did you try the use of @Import to import your js file as explained http://tapestry.apache.org/javascript.html? Regards François 2012/1/30 Julien Martin bal...@gmail.com: Hi Thiago! Using your advice, I managed to generate the link easily. I have also moved the script to a separate file as advised. Now what remains unclear to me is that the *addScript* method takes a String and not a url to my javascript file. So on the one hand I have my link, on the other my javascript file. I understand the rationale behind the addScript method: formatting the content of the js file with one or several variables passed as the second argument but what I have is js file not a short script as in the documentation: javaScriptSupport.addScript( $('%s').observe('click', hideMe());, container.getClientId()); How do I pass my js file to the addScript method or do I use another method? Regards, Julien. 2012/1/30 Thiago H. de Paula Figueiredo thiag...@gmail.com On Sun, 29 Jan 2012 19:22:31 -0200, Julien Martin bal...@gmail.com wrote: Thiago, Hi! Yes it is indeed a Tapestry page. Here is the java code for it (there is no template for this page): So the correct way of generating an URL for a page is to @Inject PageRenderLinkSource and use one of its methods. They return a Link. Pass the result of the toAbsoluteURI() method to your JavaScript method by @Inject'ing JavaScriptSupport and using its addScript() method. In addition, as you're returning JSON content, instead of return TextStreamResponse, you can return a JSONObject or a JSONArray. -- 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: Referencing the context path from within Javascript?
You're right François, It is an issue with the inclusion order of my files. I noticed that the files @Import(ed) by my main layout component come after the files @Import(ed) by the pages that use that layout. It should be the other way around. Is there a way to have more control over that? Julien. Le 30 janvier 2012 13:06, François Facon francois.fa...@atos.net a écrit : This should work. Perhaps a conflict regading inclusion order of your js file. At this point you have to debug with firebug to see why Tapestry.Initializer.bignibou_autocomplete() is not defined. perhaps extend failed as jquery was already there. Regards François - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Referencing the context path from within Javascript?
@Thiago: ok will do. 2012/1/30 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 30 Jan 2012 08:14:40 -0200, Julien Martin bal...@gmail.com wrote: I have actually. The issue is how to replace a variable within the js file with the appropriate value. You don't. Make it a parameter of a function you'll call through JavaScriptSupport.addScript(). To include a JS file, use @Import. addScript() is used to add lines of JavaScript at the bottom of your page, typically to do initialization stuff. JumpStart has one nice example: http://jumpstart.** doublenegative.com.au/**jumpstart/examples/javascript/**reusablehttp://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/reusable . -- 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
Re: Referencing the context path from within Javascript?
I tried using the @Import stack= in order to include the jquery libraries to no avail. I get this: Render queue error in SetupRender[Index:childminderlayout.layout]: No JavaScriptStack with name 'context:/js/jquery-1.6.2.js'. Any one has any clue? Regards, Julien. 2012/1/30 Julien Martin bal...@gmail.com @Thiago: ok will do. 2012/1/30 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 30 Jan 2012 08:14:40 -0200, Julien Martin bal...@gmail.com wrote: I have actually. The issue is how to replace a variable within the js file with the appropriate value. You don't. Make it a parameter of a function you'll call through JavaScriptSupport.addScript(). To include a JS file, use @Import. addScript() is used to add lines of JavaScript at the bottom of your page, typically to do initialization stuff. JumpStart has one nice example: http://jumpstart.** doublenegative.com.au/**jumpstart/examples/javascript/**reusablehttp://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/reusable . -- 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
Re: Referencing the context path from within Javascript?
@Thiago, I actually wanted to avoid an additional dependency. I am going to include the autocomplete javascript within the root layout as a library. @All Thanks all for helping me with this issue!! I understand how Tapestry deals with javascript much better now!! [?] Regards, Julien. 2012/1/30 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 30 Jan 2012 10:49:23 -0200, Julien Martin bal...@gmail.com wrote: I tried using the @Import stack= in order to include the jquery libraries to no avail. I get this: Render queue error in SetupRender[Index:**childminderlayout.layout]: No JavaScriptStack with name 'context:/js/jquery-1.6.2.js'. Are you using tapestry5-jquery? It should take care of it. In addition, to use 'context:...', you should use @Import(library=...), not stack. -- 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
Re: Referencing the context path from within Javascript?
2012/1/28 Julien Martin bal...@gmail.com Hello Thiago, It is on a page template. The advice you provide does work. However, I am realizing I need to concatenate the protocol+host+etc. which is a bit cumbersome. The problem I have is that I don't understand how the path is worked out. My javascript is located at the following path: /context-path/account/childminderRegistration and I need to resolve the following path: /context-path/utils/JSonPostcodesWithQueryParam for the url javascript variable. Is there a simpler way for my script to hit the proper path? Regards, J. 2012/1/28 Thiago H. de Paula Figueiredo thiag...@gmail.com On Sat, 28 Jan 2012 17:43:17 -0200, Julien Martin bal...@gmail.com wrote: Hello, Hi! How can I achieve this with T5? As a general answer, you can @Inject HttpServletRequest and use its getContextPath() method. Depending on who handles this URL (a Tapestry page? a Tapestry page event handler method), the response would be different. -- 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
Still struggling with templates...
Hello, I would like to have a title tag defined in my app main/root template (Layout.tml) and ensure that in each of the *.tml files that use that template or one of its sub-templates, the content of the title is replaced by an appropriate value. I have tried using the xmlns:p=tapestry:parameter to no avail. Should I use *t:content* instead? Can anyone please advise? Regards, Julien.
Re: Overriding input type = password for T5 Kaptcha component
done! 2012/1/24 Igor Drobiazko igor.drobia...@gmail.com Not yet, but you can fill a JIRA issue. On Mon, Jan 23, 2012 at 10:49 PM, Julien Martin bal...@gmail.com wrote: Hello, I noticed that the input type of the kaptcha field is *of type password*. Is there a way to make it of type input* type=text instead*? Regards, Julien. -- Best regards, Igor Drobiazko http://tapestry5.de http://twitter.com/drobiazko
Is there a dedicated page in Tapestry for displaying session content?
Hello, Is there a page used to display *session content* in Tapestry? Which would work similarly to *servicestatus* for instance? Regards, Julien Martin.
Re: Is there a dedicated page in Tapestry for displaying session content?
Thanks Thiago. 2012/1/24 Thiago H. de Paula Figueiredo thiag...@gmail.com On Tue, 24 Jan 2012 12:27:17 -0200, Julien Martin bal...@gmail.com wrote: Hello, Hi! Is there a page used to display *session content* in Tapestry? Which would work similarly to *servicestatus* for instance? I don't think so, but it would be easy and quick to do it, at least if you just want to print the toString() of the objects in the session. -- 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
Re: Is there a dedicated page in Tapestry for displaying session content?
Thanks Sigbjorn! 2012/1/24 Sigbjørn Tvedt sigbjo...@gmail.com Have a look at the jumpstart examples. http://jumpstart.doublenegative.com.au/jumpstart/examples/state/displaysessioncontents Sigbjørn Tvedt On 24 January 2012 15:37, Julien Martin bal...@gmail.com wrote: Thanks Thiago. 2012/1/24 Thiago H. de Paula Figueiredo thiag...@gmail.com On Tue, 24 Jan 2012 12:27:17 -0200, Julien Martin bal...@gmail.com wrote: Hello, Hi! Is there a page used to display *session content* in Tapestry? Which would work similarly to *servicestatus* for instance? I don't think so, but it would be easy and quick to do it, at least if you just want to print the toString() of the objects in the session. -- 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
adding an Open EntityManager In View filter to my T5 app
Hello, I would like to add a Spring open EntityManager in view filter to my T5 application. I am not sure about the mapping url pattern. Is the code below correct or will it conflict with TapestrySpringFilter? *filter* *filter-nameoemInViewFilter/filter-name filter-class org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter /filter-class init-param param-nameentityManagerFactoryBeanName/param-name param-valuereportsEntityManagerFactory/param-value /init-param /filter filter-mapping filter-nameoemInViewFilter/filter-name url-pattern/*/url-pattern /filter-mapping* Regards, Julien.
Re: t:container vs t:content?
Thanks Josh, What I am not sure about is whether I can have a template/layout specifying several portions of code that will be replaced as follows (similarly to what you get with facelets templates). from layout.tml: *html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd;* *head/head* *body* *Welcome to my website.* *t:part1/* *some more content* *t:part2/* */body* */html* from the template that is going to use the layout: *t:layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd;* *t:part1* *Hello; this is part1 implementation.* */t:part1* * * *t:part2* *Hello; this is part2 implementation.* */t:part2* */t:layout* 2012/1/23 Josh Canfield joshcanfi...@gmail.com From the docs: http://tapestry.apache.org/component-templates.html A t:container element contains markup without being considered part of the template. t:content marks a portion of the template as the actual template content; any markup outside the t:content element is ignored. t:container must be the root element. It allows you to create a valid xml document when a component would want to render multiple roots, such as in the example from the docs where the component renders td elements which can't be wrapped with any html. t:container predates t:content, and you could use t:content for the same purpose, but t:content is also a handy way to write component templates that are complete html files without including all that html in your rendered page. html head titleMy Search Component/title /head body h1Search Component Preview/h1 !-- Only the stuff in t:content is rendered with the component -- t:content form...input //form /t:content /body /html Josh On Sun, Jan 22, 2012 at 2:04 PM, Julien Martin bal...@gmail.com wrote: Hello, I have read the documentation and have had a look into code samples and I am still trying to figure out the difference between *t:container* and * t:content*. Can anyone please advise? Regards, Julien. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: adding an Open EntityManager In View filter to my T5 app
thanks Giulio 2012/1/23 Giulio Micali giulio.mic...@gmail.com I use the hibernate version, but it should be the same. Here my config(works with tapestry 5.1.0.5 and 5.2.6, i never tried the newest version): filter filter-nameHibernate Session In View Filter/filter-name filter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class init-param !-- you must specify this if the name of your sessionFactory is not sessionFactory -- param-namesessionFactory/param-name param-valuemySessionFactory/param-value /init-param init-param param-nameflushMode/param-name param-valueAUTO/param-value /init-param init-param param-namesingleSession/param-name param-valuetrue/param-value /init-param /filter filter filter-nameapp/filter-name filter-classorg.apache.tapestry5.spring.TapestrySpringFilter/filter-class /filter filter-mapping filter-nameHibernate Session In View Filter/filter-name url-pattern/*/url-pattern /filter-mapping Hope that can be useful, Giulio
Re: Group of related t:checkboxes bound to a single variable?
Hi Igor! Yes I did try using the checklist component but it does not offer fine enough control over how to render the checkboxes. I actually need to render the checkboxes as a n * n matrix. J. 2012/1/23 Igor Drobiazko igor.drobia...@gmail.com Did you try Checklist component? On Sun, Jan 22, 2012 at 11:26 PM, Julien Martin bal...@gmail.com wrote: Hello, I need to have a number of t:checkbox bound to an List of one of my domain classes as follows: @Property @Persist ListMyDomainClass theList; I would then implement a T5 valueEncoder for MyDomainClass. Is this possible? I have this requirement of binding the checkboxes to a ListMyDomainClass because I need finer control over how I display the checkboxes in my template than I have been able to get with the existing CheckList. (I actually need to display a matrix of checkboxes with n rows and n columns possibly inside a html table). Can anyone please help? Regards, Julien. -- Best regards, Igor Drobiazko http://tapestry5.de http://twitter.com/drobiazko
Re: Group of related t:checkboxes bound to a single variable?
What if I want to display the checkboxes in a html table? Do I need to implement my own t5 component? Regards, Julien. 2012/1/23 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 23 Jan 2012 08:59:02 -0200, Julien Martin bal...@gmail.com wrote: Hi Igor! Hi! Yes I did try using the checklist component but it does not offer fine enough control over how to render the checkboxes. I actually need to render the checkboxes as a n * n matrix. You probably can solve this just by using some CSS. -- 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
Customizing T5 Kaptcha...
Hello, I would like to add a T5 Kaptcha to my website but I also need to customize it (background color, font color, size, readability). Is this possible with t:kaptcha? If so how? Regards, J.
Re: Customizing T5 Kaptcha...
Thiago, Isn't the image a gif or a jpeg? J. 2012/1/23 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 23 Jan 2012 09:49:07 -0200, Julien Martin bal...@gmail.com wrote: Hello, I would like to add a T5 Kaptcha to my website but I also need to customize it (background color, font color, size, readability). Is this possible with t:kaptcha? If so how? Have you tried CSS? -- 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
Re: Group of related t:checkboxes bound to a single variable?
Thanks for the reply Thiago. I think I'll try and implement my own component. It is going to be a good and interesting exercise. [?] Regards, J. 2012/1/23 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 23 Jan 2012 09:35:42 -0200, Julien Martin bal...@gmail.com wrote: What if I want to display the checkboxes in a html table? Do I need to implement my own t5 component? Short answer: You don't need HTML tables to show stuff in grids. Long answer: yes and no. Yes because you can use Tapestry DOM rewriting to change the rendered HTML, but this is harder than writing your own component based on Checklist's source. No because the Checklist's logic of generating output cannot be changed. -- 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
Re: Customizing T5 Kaptcha...
I see. The config param you are pointing to are interesting. How then would I specify them with T5 Kaptcha? Is it what @SupportsInformalParametershttp://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SupportsInformalParameters.html are for? Regards, J. 2012/1/23 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 23 Jan 2012 11:25:47 -0200, Julien Martin bal...@gmail.com wrote: Thiago, Isn't the image a gif or a jpeg? Oops, I mesread your question. I'm sorry. Tapestry-Kaptcha is just a Tapestry wrapper around this package: http://code.google.com/p/**kaptcha/ http://code.google.com/p/kaptcha/, so you should check its documentation: http://code.google.com/p/** kaptcha/wiki/ConfigParametershttp://code.google.com/p/kaptcha/wiki/ConfigParameters -- 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
Re: Customizing T5 Kaptcha...
Thiago, I meant are the web.xml init params the only way of specifying the config params for the Kaptcha? J. 2012/1/23 Julien Martin bal...@gmail.com I see. The config param you are pointing to are interesting. How then would I specify them with T5 Kaptcha? Is it what @SupportsInformalParametershttp://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/SupportsInformalParameters.html are for? Regards, J. 2012/1/23 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 23 Jan 2012 11:25:47 -0200, Julien Martin bal...@gmail.com wrote: Thiago, Isn't the image a gif or a jpeg? Oops, I mesread your question. I'm sorry. Tapestry-Kaptcha is just a Tapestry wrapper around this package: http://code.google.com/p/**kaptcha/ http://code.google.com/p/kaptcha/, so you should check its documentation: http://code.google.com/p/** kaptcha/wiki/ConfigParametershttp://code.google.com/p/kaptcha/wiki/ConfigParameters -- 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
Re: t:container vs t:content?
Josh, Thanks. I'll take a look at it then. Regards, Julien. 2012/1/23 Josh Canfield joshcanfi...@gmail.com I believe the quickstart app has a layout that does exactly this with the sidebar content. On Mon, Jan 23, 2012 at 2:02 AM, Julien Martin bal...@gmail.com wrote: Thanks Josh, What I am not sure about is whether I can have a template/layout specifying several portions of code that will be replaced as follows (similarly to what you get with facelets templates). from layout.tml: *html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd;* *head/head* *body* *Welcome to my website.* *t:part1/* *some more content* *t:part2/* */body* */html* from the template that is going to use the layout: *t:layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd * *t:part1* *Hello; this is part1 implementation.* */t:part1* * * *t:part2* *Hello; this is part2 implementation.* */t:part2* */t:layout* 2012/1/23 Josh Canfield joshcanfi...@gmail.com From the docs: http://tapestry.apache.org/component-templates.html A t:container element contains markup without being considered part of the template. t:content marks a portion of the template as the actual template content; any markup outside the t:content element is ignored. t:container must be the root element. It allows you to create a valid xml document when a component would want to render multiple roots, such as in the example from the docs where the component renders td elements which can't be wrapped with any html. t:container predates t:content, and you could use t:content for the same purpose, but t:content is also a handy way to write component templates that are complete html files without including all that html in your rendered page. html head titleMy Search Component/title /head body h1Search Component Preview/h1 !-- Only the stuff in t:content is rendered with the component -- t:content form...input //form /t:content /body /html Josh On Sun, Jan 22, 2012 at 2:04 PM, Julien Martin bal...@gmail.com wrote: Hello, I have read the documentation and have had a look into code samples and I am still trying to figure out the difference between *t:container* and * t:content*. Can anyone please advise? Regards, Julien. - 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: Customizing T5 Kaptcha...
After looking at the source code for the T5 Kaptcha implementation, I found a T5-friendlier way of configuring the Kaptcha. Just add the following lines to the services.AppModule class and play with the values and constants: * @Contribute(KaptchaProducer.class)* * public static void configureKaptchaProducer(MappedConfigurationString, String configuration) {* * configuration.add(Constants.KAPTCHA_IMAGE_WIDTH, 200);* * configuration.add(Constants.KAPTCHA_BACKGROUND_CLR_FROM, 255,255,255);* * configuration.add(Constants.KAPTCHA_BACKGROUND_CLR_TO, 255,255,255);* * }* It is cleaner than polluting the web.xml. Regards, J. 2012/1/23 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 23 Jan 2012 15:40:40 -0200, Julien Martin bal...@gmail.com wrote: Thiago, I meant are the web.xml init params the only way of specifying the config params for the Kaptcha? From reading the documentation, that seems to be correct. -- 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
Overriding input type = password for T5 Kaptcha component
Hello, I noticed that the input type of the kaptcha field is *of type password*. Is there a way to make it of type input* type=text instead*? Regards, Julien.
t:container vs t:content?
Hello, I have read the documentation and have had a look into code samples and I am still trying to figure out the difference between *t:container* and * t:content*. Can anyone please advise? Regards, Julien.
Group of related t:checkboxes bound to a single variable?
Hello, I need to have a number of t:checkbox bound to an List of one of my domain classes as follows: @Property @Persist ListMyDomainClass theList; I would then implement a T5 valueEncoder for MyDomainClass. Is this possible? I have this requirement of binding the checkboxes to a ListMyDomainClass because I need finer control over how I display the checkboxes in my template than I have been able to get with the existing CheckList. (I actually need to display a matrix of checkboxes with n rows and n columns possibly inside a html table). Can anyone please help? Regards, Julien.
Customizing the label for a T5 checklist's checkbox
Hello, I need to customize the label for a checklist's checkbox. As of now, I have a JPA entity behind each of the checkbox and it appears that the entity's toString method is used to display the label. However, the entity is only a three way join table that only contains three integer fields. I therefore either need for the label to be blank or to be able to customize it. Can anyone please advise? Thanks in advance, J. t:checklist t:id=availabilities validate=required encoder=advertisementToTimeSlotToDayEncoder model=availabilities label=Matrix of availabilities/
Which IDE for Tapestry?? [short and medium term]
Hello, I have tried to use IntelliJ for my beginnings with tapestry and I am somewhat frustrated with my experience. I have to redeploy everything each time I make a change. My question is: will intelliJ soon bring the same tapestry experience as eclipse does or do you advise I switch to eclipe instead? Regards, Julien.
Re: Which IDE for Tapestry?? [short and medium term]
Thanks Giulio, Can you provide a documentation link about this manifest in src/main/resources please? Regards, Julien. 2011/11/15 Giulio Micali giulio.mic...@gmail.com Well, maven+eclipse + RunJettyRun works fine even with multi-projects, if you manually create the manifest in src/main/resources. Hope that can be useful. Giulio 2011/11/15 Julien Martin bal...@gmail.com Hello, I have tried to use IntelliJ for my beginnings with tapestry and I am somewhat frustrated with my experience. I have to redeploy everything each time I make a change. My question is: will intelliJ soon bring the same tapestry experience as eclipse does or do you advise I switch to eclipe instead? Regards, Julien.
Re: Which IDE for Tapestry?? [short and medium term]
Thanks Ville Virtanen, Then why doesn't it work with Intellij? Doesn't it do compile on save too? Regards, J. 2011/11/15 9902468 ville.virta...@greenstreet.fi NetBeans? Superior maven integration + ok ide. http://netbeans.org/downloads/index.html Live class reload is not ide dependent, but requires compile on save. If you need even easier environment MS Visual Studio + C# stack is also worth considering.. - Ville -- View this message in context: http://tapestry.1045711.n5.nabble.com/Which-IDE-for-Tapestry-short-and-medium-term-tp4994595p4994733.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: Which IDE for Tapestry?? [short and medium term]
Thanks all for this interesting information. It is a shame no netbeans plugin exists for Tapestry5... Regards, Julien. 2011/11/15 Robert Zeigler robert.zeig...@roxanemy.com IntelliJ doesn't do compile on save by default. Robert On Nov 15, 2011, at 11/1510:10 AM , Julien Martin wrote: Thanks Ville Virtanen, Then why doesn't it work with Intellij? Doesn't it do compile on save too? Regards, J. 2011/11/15 9902468 ville.virta...@greenstreet.fi NetBeans? Superior maven integration + ok ide. http://netbeans.org/downloads/index.html Live class reload is not ide dependent, but requires compile on save. If you need even easier environment MS Visual Studio + C# stack is also worth considering.. - Ville -- View this message in context: http://tapestry.1045711.n5.nabble.com/Which-IDE-for-Tapestry-short-and-medium-term-tp4994595p4994733.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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Render queue error in BeginRender: Class cannot be null
up please 2011/10/21 Julien Martin bal...@gmail.com Hello Thiago, Tapestry version: T5.2.6 Java class: *public class InscriptionProfessionnelGardeEnfant {* * * *@Property* *@Persist* *@Valid* *private ChildminderAccount childminderAccount;* * * *@Property* *private SelectModel childminderStatusSelectModel;* * * *@Inject* *private SelectModelFactory selectModelFactory;* * * *@Property* *@NotNull* *private String accountPasswordConfirmation;* * * *@Property* *private ListChildMinderStatus childMinderStatusList;* * * *@Inject* *private BignibouService service;* * * *@InjectComponent* *private Form childminderRegistrationForm;* * * *@OnEvent(EventConstants.PREPARE_FOR_RENDER)* *void prepare() {* *childminderAccount = new ChildminderAccount();* *childMinderStatusList = service.loadChildminderStatusList();* *childminderStatusSelectModel = selectModelFactory.create(childMinderStatusList,childMinderStatusDescription); * *}* * * *@OnEvent(value = EventConstants.VALIDATE, component = childminderRegistrationForm)* *void validateRegistrationForm() {* *if (childminderRegistrationForm.isValid()) {* *if (accountPasswordConfirmation.equals(childminderAccount.getAccountPassword())) {* *service.persistChildminderAccount(childminderAccount);* *}* *else {* * childminderRegistrationForm.recordError(passwords must match);//todo* *}* * * *} else {* *System.out.println(something went wrong);* *childminderRegistrationForm.recordError(something went wrong);//todo* *}* *}* * * *@DiscardAfter* *@OnEvent(EventConstants.SUCCESS)* *void successfulRegistrationForm() {* *System.out.println(success);* * * *}* * * *}* Stack trace: 2011-10-21 22:05:31,417: ERROR (org.apache.tapestry5.internal.services.RenderQueueImpl:82) Render queue error in BeginRender[InscriptionProfessionnelGardeEnfant:accountemailaddress]: Class cannot be null org.apache.tapestry5.ioc.internal.util.TapestryException: Class cannot be null [at classpath:com/bignibou/web/pages/InscriptionProfessionnelGardeEnfant.tml, line 38] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:194) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.render(ComponentPageElementImpl.java:246) at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72) at org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:127) at $PageRenderQueue_13328167a39.render($PageRenderQueue_13328167a39.java) at $PageRenderQueue_13328167a31.render($PageRenderQueue_13328167a31.java) at org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) at org.apache.tapestry5.beanvalidator.BeanValidatorModule$2.renderMarkup(BeanValidatorModule.java:133) at $MarkupRenderer_13328167a3b.renderMarkup($MarkupRenderer_13328167a3b.java) at org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2026) at $MarkupRenderer_13328167a3b.renderMarkup($MarkupRenderer_13328167a3b.java) at org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:2040) at $MarkupRenderer_13328167a3b.renderMarkup($MarkupRenderer_13328167a3b.java) at org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:2089) at $MarkupRenderer_13328167a3b.renderMarkup($MarkupRenderer_13328167a3b.java) at org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:2073) at $MarkupRenderer_13328167a3b.renderMarkup($MarkupRenderer_13328167a3b.java) at org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:2055) at $MarkupRenderer_13328167a3b.renderMarkup($MarkupRenderer_13328167a3b.java) at org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:2008) at $MarkupRenderer_13328167a3b.renderMarkup($MarkupRenderer_13328167a3b.java) at org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1989) at $MarkupRenderer_13328167a3b.renderMarkup($MarkupRenderer_13328167a3b.java) at $MarkupRenderer_13328167a38.renderMarkup($MarkupRenderer_13328167a38.java) at org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47) at $PageMarkupRenderer_13328167a36.renderPageMarkup($PageMarkupRenderer_13328167a36.java) at org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67) at $PageResponseRenderer_1332816798b.renderPageResponse($PageResponseRenderer_1332816798b.java
Render queue error in BeginRender
Hello, I have rephrased my previous post into this new one. I have the following t5 template: form t:type=form t:id=childminderRegistrationForm validate=childminderAccount clientValidation=none div t:errors/ /div div label t:type=label for=accountEmailAddress/ input t:type=textfield t:id=accountEmailAddress name=accountEmailAddress value=childminderAccount.accountEmailAddress/ /div div label t:type=label for=accountFirstName/ input t:type=textfield t:id=accountFirstName value=childminderAccount.accountFirstName/ /div div label t:type=label for=accountLastName/ input t:type=textfield t:id=accountLastName value=childminderAccount.accountLastName/ /div div label t:type=label for=accountPassword/ input t:type=textfield t:id=accountPassword value=childminderAccount.accountPassword/ /div div label t:type=label for=accountPasswordConfirmation/ input t:type=textfield t:id=accountPasswordConfirmation value=accountPasswordConfirmation validate=required/ /div div label t:type=label for=postcode/ input t:type=textfield t:id=postcode id=postcode name=postcode size=40 value=childminderAccount.postcodeByPostcodeId translate=postcodeTranslator validate=required/ /div div input t:type=select model=childminderStatusSelectModel t:id=childminderStatus value=childminderAccount.childMinderStatusByChildMinderStatusId blankLabel=votre status blankOption=always validate=required/ /div divinput t:type=submit type=submit value=ok//div /form Together with its corresponding java class: public class InscriptionProfessionnelGardeEnfant { @Property @Persist @Valid private ChildminderAccount childminderAccount; @Property private SelectModel childminderStatusSelectModel; @Inject private SelectModelFactory selectModelFactory; @Property @NotNull private String accountPasswordConfirmation; @Property private ListChildMinderStatus childMinderStatusList; @Inject private BignibouService service; @InjectComponent private Form childminderRegistrationForm; @OnEvent(EventConstants.PREPARE_FOR_RENDER) void prepare() { childminderAccount = new ChildminderAccount(); childMinderStatusList = service.loadChildminderStatusList(); childminderStatusSelectModel = selectModelFactory.create(childMinderStatusList,childMinderStatusDescription); } @OnEvent(value = EventConstants.VALIDATE, component = childminderRegistrationForm) void validateRegistrationForm() { if (childminderRegistrationForm.isValid()) { if (accountPasswordConfirmation.equals(childminderAccount.getAccountPassword())) { service.persistChildminderAccount(childminderAccount); } else { childminderRegistrationForm.recordError(passwords must match);//todo } } else { System.out.println(something went wrong); childminderRegistrationForm.recordError(something went wrong);//todo } } @DiscardAfter @OnEvent(EventConstants.SUCCESS) void successfulRegistrationForm() { System.out.println(success); } } Upon the first call to the page, I get an IllegalArgument Exception: 2011-10-22 14:40:48,748: ERROR (org.apache.tapestry5.internal.services.RenderQueueImpl:82) Render queue error in BeginRender[InscriptionProfessionnelGardeEnfant:accountemailaddress]: Class cannot be null org.apache.tapestry5.ioc.internal.util.TapestryException: Class cannot be null [at classpath:com/bignibou/web/pages/InscriptionProfessionnelGardeEnfant.tml, line 38] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:194) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.render(ComponentPageElementImpl.java:246) at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72) at org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:127) at $PageRenderQueue_1332ba5c1ed.render($PageRenderQueue_1332ba5c1ed.java) at $PageRenderQueue_1332ba5c1e5.render($PageRenderQueue_1332ba5c1e5.java) at org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) at org.apache.tapestry5.beanvalidator.BeanValidatorModule$2.renderMarkup(BeanValidatorModule.java:133) at $MarkupRenderer_1332ba5c1ef.renderMarkup($MarkupRenderer_1332ba5c1ef.java) at org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2026) at $MarkupRenderer_1332ba5c1ef.renderMarkup($MarkupRenderer_1332ba5c1ef.java) at
Re: Render queue error in BeginRender
Thanks for your reply Steve, I am also surprised because I am actually trying to follow an example taken from Igor's book. My ChildMinderAccount is a JPA entity that extends an abstract Account class. Regarding your suggestion of using the setuprender phase, I was not able to find any such EventConstant in the Tapestry API... Regards, J. 2011/10/22 Steve Eynon steve.ey...@alienfactory.co.uk Nothing there I can see that's obvious... What does your ChildminderAccount look like? Creating it in the PREPARE_FOR_RENDER event should be fine - but you could always try creating it the SetupRender() render phase - see if it's any different. Steve. On 22 October 2011 20:50, Julien Martin bal...@gmail.com wrote: ChildminderAccount - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Render queue error in BeginRender
Steve, It works with @SetupRender Thanks!! 2011/10/22 Steve Eynon steve.ey...@alienfactory.co.uk Thanks for your reply Steve, No worries, I know how frustrating it can be when no one answers! I was not able to find any such EventConstant SetupRender is not an component event, it's a um, render phase! See here: http://tapestry.apache.org/component-rendering.html Essentially rename your method to void setupRender() - note how it doesn't begin with onXXX - or annotate it with @SetupRender The Form generates the PREPARE_FOR_RENDER event during its beginRender phase so I'd be surprised if it makes a difference - but you never know. I tend to do all my setup in the setupRender() and maybe a little in onPrepareForSubmit(). My ChildMinderAccount is a JPA entity Ah - okay. I'd look around this area - I don't know much about JPA but I'd check stuff like your transaction boundaries to ensure your obj is fully inflated after it's loaded. Steve. On 22 October 2011 21:50, Julien Martin bal...@gmail.com wrote: Thanks for your reply Steve, I am also surprised because I am actually trying to follow an example taken from Igor's book. My ChildMinderAccount is a JPA entity that extends an abstract Account class. Regarding your suggestion of using the setuprender phase, I was not able to find any such EventConstant in the Tapestry API... Regards, J. 2011/10/22 Steve Eynon steve.ey...@alienfactory.co.uk Nothing there I can see that's obvious... What does your ChildminderAccount look like? Creating it in the PREPARE_FOR_RENDER event should be fine - but you could always try creating it the SetupRender() render phase - see if it's any different. Steve. On 22 October 2011 20:50, Julien Martin bal...@gmail.com wrote: ChildminderAccount - 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: Render queue error in BeginRender
Steve, Good point about the clue in the stacktrace! But it is not a NPE: rather an IllegalArgumentException. I believe what is null is not the Entity but rather its properties (i.e. Strings in my case). What puzzles me is that it worked upon page refresh but not upon first call to the page!! I am still new to Tapestry and I am trying to find my way around all the Events/Phases/etc. I come from JSF which is a very nice framework but no way as developer-friendly and smooth and unobtrusive as T5!! Regards, Julien. 2011/10/22 Steve Eynon steve.ey...@alienfactory.co.uk Oh yeah, re-looking, the clue was in the stacktrace: Render queue error in BeginRender meaning you needed to load your entity sometime before that phase - i.e. setupRender() I don't what was causing the NPE though, loading your entity in onPrepareForRender() should have been okay. Looks like it's something do with T5's JSR-303 but I've never used it myself. Dunno if anyone else has any ideas? Steve. On 22 October 2011 23:50, Julien Martin bal...@gmail.com wrote: Steve, It works with @SetupRender Thanks!! 2011/10/22 Steve Eynon steve.ey...@alienfactory.co.uk Thanks for your reply Steve, No worries, I know how frustrating it can be when no one answers! I was not able to find any such EventConstant SetupRender is not an component event, it's a um, render phase! See here: http://tapestry.apache.org/component-rendering.html Essentially rename your method to void setupRender() - note how it doesn't begin with onXXX - or annotate it with @SetupRender The Form generates the PREPARE_FOR_RENDER event during its beginRender phase so I'd be surprised if it makes a difference - but you never know. I tend to do all my setup in the setupRender() and maybe a little in onPrepareForSubmit(). My ChildMinderAccount is a JPA entity Ah - okay. I'd look around this area - I don't know much about JPA but I'd check stuff like your transaction boundaries to ensure your obj is fully inflated after it's loaded. Steve. On 22 October 2011 21:50, Julien Martin bal...@gmail.com wrote: Thanks for your reply Steve, I am also surprised because I am actually trying to follow an example taken from Igor's book. My ChildMinderAccount is a JPA entity that extends an abstract Account class. Regarding your suggestion of using the setuprender phase, I was not able to find any such EventConstant in the Tapestry API... Regards, J. 2011/10/22 Steve Eynon steve.ey...@alienfactory.co.uk Nothing there I can see that's obvious... What does your ChildminderAccount look like? Creating it in the PREPARE_FOR_RENDER event should be fine - but you could always try creating it the SetupRender() render phase - see if it's any different. Steve. On 22 October 2011 20:50, Julien Martin bal...@gmail.com wrote: ChildminderAccount - 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
Re: Issue with Tapestry, JPA and JSR 303 annotations.
up 2011/10/20 Julien Martin bal...@gmail.com Hi Igor, Yes I do use the form component as follows: From the class: *@InjectComponent* *private Form childminderRegistrationForm;* * * From template: * form t:type=form t:id=childminderRegistrationForm validate=this clientValidation=none* Julien. 2011/10/20 Igor Drobiazko igor.drobia...@gmail.com Please more details. one of my Tapestry classes is not precise enough to identify the problem. You are using the Form component, right? Did you use the Form's validate parameter? On Thu, Oct 20, 2011 at 9:30 PM, Julien Martin bal...@gmail.com wrote: Hello, I have the following property in one of my Tapestry classes: *@Property* *@Persist* *@Valid* *private ChildminderAccount childminderAccount;* The ChildminderAccount entity extends an abstract Account entity class as follows: * public class ChildminderAccount extends Account* And finally the Account entity class has several properties including this one: *@NotNull* *private String accountFirstname;* The problem I have is that Tapestry won't validate the annotated properties even though I have added the tapestry-beanvalidator jar in the classpath. Note that I don't use the beanform component for now. I use T5.2.6. Can anyone please help? Regards, Julien. -- Best regards, Igor Drobiazko http://tapestry5.de
Re: Issue with Tapestry, JPA and JSR 303 annotations.
Igor, Here is the page: *public class InscriptionProfessionnelGardeEnfant {* * * *@Property* *@Persist* *@Valid* *private ChildminderAccount childminderAccount;* * * *@Property* *private SelectModel childminderStatusSelectModel;* * * *@Inject* *private SelectModelFactory selectModelFactory;* * * *@Property* *@NotNull* *private String accountPasswordConfirmation;* * * *@Property* *private ListChildMinderStatus childMinderStatusList;* * * *@Inject* *private BignibouService service;* * * *@InjectComponent* *private Form childminderRegistrationForm;* * * *@OnEvent(EventConstants.PREPARE)* *void prepare() {* *childminderAccount = new ChildminderAccount();* *childMinderStatusList = service.loadChildminderStatusList();* *childminderStatusSelectModel = selectModelFactory.create(childMinderStatusList,childMinderStatusDescription); * *}* * * *@OnEvent(value = EventConstants.VALIDATE, component = childminderRegistrationForm)* *void validateRegistrationForm() {* *if (childminderRegistrationForm.isValid()) {* *if (accountPasswordConfirmation.equals(childminderAccount.getAccountPassword())) {* *service.persistChildminderAccount(childminderAccount);* *}* *else {* * childminderRegistrationForm.recordError(passwords must match);//todo* *}* * * *} else {* *System.out.println(something went wrong);* *childminderRegistrationForm.recordError(something went wrong);//todo* *}* *}* * * *@DiscardAfter* *@OnEvent(EventConstants.SUCCESS)* *void successfulRegistrationForm() {* *System.out.println(success);* * * *}* * * *}* ...and the template: *t:sublayout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd * *head* *titleHello World Page/title* */head* *body* *form t:type=form t:id=childminderRegistrationForm validate=this clientValidation=none* *div* *t:errors/* */div* *div* *label t:type=label for=accountEmailAddress/* *input t:type=textfield t:id=accountEmailAddress value=childminderAccount.accountEmailAddress/* */div* *div* *label t:type=label for=accountFirstName/* *input t:type=textfield t:id=accountFirstName value=childminderAccount.accountFirstName/* */div* *div* *label t:type=label for=accountLastName/* *input t:type=textfield t:id=accountLastName value=childminderAccount.accountLastName/* */div* *div* *label t:type=label for=accountPassword/* *input t:type=textfield t:id=accountPassword value=childminderAccount.accountPassword/* */div* *div* *label t:type=label for=accountPasswordConfirmation/* *input t:type=textfield t:id=accountPasswordConfirmation value=accountPasswordConfirmation/* */div* *div* *label t:type=label for=postcode/* *input t:type=textfield t:id=postcode id=postcode name=postcode size=40* * value=childminderAccount.postcodeByPostcodeId translate=postcodeTranslator/* */div* *div* *input t:type=select model=childminderStatusSelectModel t:id=childminderStatus* * value=childminderAccount.childMinderStatusByChildMinderStatusId blankLabel=votre statut/* */div* *divinput t:type=submit type=submit value=ok//div* */form* */body* */t:sublayout* Can you please let me know how to pass the childminderAccount to the form's validate parameter? Do I do this in the template or the class? Regards, J. 2011/10/21 Igor Drobiazko igor.drobia...@gmail.com Either the object graph is not traversed or your ChildminderAccount object is null. The @Valid annotation is ignored for null objects. Please post the entire page class and template. You can also pass childminderAccount to the Form's validate parameter. On Thu, Oct 20, 2011 at 9:53 PM, Julien Martin bal...@gmail.com wrote: Hi Igor, Yes I do use the form component as follows: From the class: *@InjectComponent* *private Form childminderRegistrationForm;* * * From template: * form t:type=form t:id=childminderRegistrationForm validate=this clientValidation=none* Julien. 2011/10/20 Igor Drobiazko igor.drobia...@gmail.com Please more details. one of my Tapestry classes is not precise enough to identify the problem. You are using the Form component, right? Did you use the Form's validate parameter? On Thu, Oct 20, 2011 at 9:30 PM, Julien Martin bal...@gmail.com wrote: Hello, I have the following property in one of my Tapestry classes: *@Property* *@Persist* *@Valid* *private ChildminderAccount childminderAccount
Re: Issue with Tapestry, JPA and JSR 303 annotations.
Hello again, I sorted the problem thanks to Igor's help as follows: form t:type=form t:id=childminderRegistrationForm * validate=childminderAccount* clientValidation=none Thanks, Julien. 2011/10/21 Julien Martin bal...@gmail.com Igor, Here is the page: *public class InscriptionProfessionnelGardeEnfant {* * * *@Property* *@Persist* *@Valid* *private ChildminderAccount childminderAccount;* * * *@Property* *private SelectModel childminderStatusSelectModel;* * * *@Inject* *private SelectModelFactory selectModelFactory;* * * *@Property* *@NotNull* *private String accountPasswordConfirmation;* * * *@Property* *private ListChildMinderStatus childMinderStatusList;* * * *@Inject* *private BignibouService service;* * * *@InjectComponent* *private Form childminderRegistrationForm;* * * *@OnEvent(EventConstants.PREPARE)* *void prepare() {* *childminderAccount = new ChildminderAccount();* *childMinderStatusList = service.loadChildminderStatusList();* *childminderStatusSelectModel = selectModelFactory.create(childMinderStatusList,childMinderStatusDescription); * *}* * * *@OnEvent(value = EventConstants.VALIDATE, component = childminderRegistrationForm)* *void validateRegistrationForm() {* *if (childminderRegistrationForm.isValid()) {* *if (accountPasswordConfirmation.equals(childminderAccount.getAccountPassword())) {* *service.persistChildminderAccount(childminderAccount);* *}* *else {* * childminderRegistrationForm.recordError(passwords must match);//todo* *}* * * *} else {* *System.out.println(something went wrong);* *childminderRegistrationForm.recordError(something went wrong);//todo* *}* *}* * * *@DiscardAfter* *@OnEvent(EventConstants.SUCCESS)* *void successfulRegistrationForm() {* *System.out.println(success);* * * *}* * * *}* ...and the template: *t:sublayout xmlns:t= http://tapestry.apache.org/schema/tapestry_5_1_0.xsd;* *head* *titleHello World Page/title* */head* *body* *form t:type=form t:id=childminderRegistrationForm validate=this clientValidation=none* *div* *t:errors/* */div* *div* *label t:type=label for=accountEmailAddress/* *input t:type=textfield t:id=accountEmailAddress value=childminderAccount.accountEmailAddress/* */div* *div* *label t:type=label for=accountFirstName/* *input t:type=textfield t:id=accountFirstName value=childminderAccount.accountFirstName/* */div* *div* *label t:type=label for=accountLastName/* *input t:type=textfield t:id=accountLastName value=childminderAccount.accountLastName/* */div* *div* *label t:type=label for=accountPassword/* *input t:type=textfield t:id=accountPassword value=childminderAccount.accountPassword/* */div* *div* *label t:type=label for=accountPasswordConfirmation/* *input t:type=textfield t:id=accountPasswordConfirmation value=accountPasswordConfirmation/* */div* *div* *label t:type=label for=postcode/* *input t:type=textfield t:id=postcode id=postcode name=postcode size=40* * value=childminderAccount.postcodeByPostcodeId translate=postcodeTranslator/* */div* *div* *input t:type=select model=childminderStatusSelectModel t:id=childminderStatus* * value=childminderAccount.childMinderStatusByChildMinderStatusId blankLabel=votre statut/* */div* *divinput t:type=submit type=submit value=ok//div* */form* */body* */t:sublayout* Can you please let me know how to pass the childminderAccount to the form's validate parameter? Do I do this in the template or the class? Regards, J. 2011/10/21 Igor Drobiazko igor.drobia...@gmail.com Either the object graph is not traversed or your ChildminderAccount object is null. The @Valid annotation is ignored for null objects. Please post the entire page class and template. You can also pass childminderAccount to the Form's validate parameter. On Thu, Oct 20, 2011 at 9:53 PM, Julien Martin bal...@gmail.com wrote: Hi Igor, Yes I do use the form component as follows: From the class: *@InjectComponent* *private Form childminderRegistrationForm;* * * From template: * form t:type=form t:id=childminderRegistrationForm validate=this clientValidation=none* Julien. 2011/10/20 Igor Drobiazko igor.drobia...@gmail.com Please more details. one of my Tapestry classes is not precise enough to identify the problem. You are using
Render queue error in BeginRender: Class cannot be null
Hello, I have a slight problem with Tapestry. I have a Tapestry form which is as follows: *form t:type=form t:id=childminderRegistrationForm validate=childminderAccount clientValidation=none* *div* *t:errors/* */div* *div* *label t:type=label for=accountEmailAddress/* *input t:type=textfield t:id=accountEmailAddress value=childminderAccount.accountEmailAddress/* */div* *div* *label t:type=label for=accountFirstName/* *input t:type=textfield t:id=accountFirstName value=childminderAccount.accountFirstName/* */div* *div* *label t:type=label for=accountLastName/* *input t:type=textfield t:id=accountLastName value=childminderAccount.accountLastName/* */div* *div* *label t:type=label for=accountPassword/* *input t:type=textfield t:id=accountPassword value=childminderAccount.accountPassword/* */div* *div* *label t:type=label for=accountPasswordConfirmation/* *input t:type=textfield t:id=accountPasswordConfirmation value=accountPasswordConfirmation validate=required/* */div* *div* *label t:type=label for=postcode/* *input t:type=textfield t:id=postcode id=postcode name=postcode size=40* * value=childminderAccount.postcodeByPostcodeId translate=postcodeTranslator validate=required/* */div* *div* *input t:type=select model=childminderStatusSelectModel t:id=childminderStatus* * value=childminderAccount.childMinderStatusByChildMinderStatusId blankLabel=votre statut blankOption=always validate=required/* */div* *divinput t:type=submit type=submit value=ok//div* */form* I try to prepare the entity that is going to be bound to the registration form as follows (from Tapestry class): *@OnEvent(EventConstants.PREPARE_FOR_RENDER)* *void prepare() {* *childminderAccount = new ChildminderAccount();//NOTICE HERE* *childMinderStatusList = service.loadChildminderStatusList();* *childminderStatusSelectModel = selectModelFactory.create(childMinderStatusList,childMinderStatusDescription); * *}* I still get this error the first time the form is loaded: *Render queue error in BeginRender[InscriptionProfessionnelGardeEnfant:accountemailaddress]: Class cannot be null (displayed in the browser)* *java.lang.IllegalArgumentException: Class cannot be null (displayed in the console)* * * Then, surprisingly when I hit F5 (refresh), the form is diplayed correctly. Can anyone please tell me how to avoid this exception? Also how I am supposed to properly obtain the instance of ChildminderAccount that is going to be populated by the user through the form? Regards, J.
Fwd: Render queue error in BeginRender: Class cannot be null
) at org.apache.tapestry5.internal.beanvalidator.BeanFieldValidator.render(BeanFieldValidator.java:84) at org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45) at org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:175) at org.apache.tapestry5.corelib.base.AbstractTextField$MethodAccess_begin_133281679e9.invoke(AbstractTextField$MethodAccess_begin_133281679e9.java) at org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117) at org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86) at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86) at org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:239) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:186) ... 80 more 2011-10-21 22:05:31,424: ERROR (org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler:63) Processing of request failed with uncaught exception: Render queue error in BeginRender[InscriptionProfessionnelGardeEnfant:accountemailaddress]: Class cannot be null org.apache.tapestry5.internal.services.RenderQueueException: Render queue error in BeginRender[InscriptionProfessionnelGardeEnfant:accountemailaddress]: Class cannot be null [at classpath:com/bignibou/web/pages/InscriptionProfessionnelGardeEnfant.tml, line 38] J. 2011/10/21 Thiago H. de Paula Figueiredo thiag...@gmail.com On Fri, 21 Oct 2011 17:37:40 -0200, Julien Martin bal...@gmail.com wrote: Hello, Hi! I still get this error the first time the form is loaded: *Render queue error in BeginRender[**InscriptionProfessionnelGardeE**nfant:accountemailaddress]: Class cannot be null (displayed in the browser)* *java.lang.**IllegalArgumentException: Class cannot be null (displayed in the console)* Tapestry version and full stack trace and full source of InscriptionProfessionnelGardeE**nfant please.;) -- 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
Issue with Tapestry, JPA and JSR 303 annotations.
Hello, I have the following property in one of my Tapestry classes: *@Property* *@Persist* *@Valid* *private ChildminderAccount childminderAccount;* The ChildminderAccount entity extends an abstract Account entity class as follows: * public class ChildminderAccount extends Account* And finally the Account entity class has several properties including this one: *@NotNull* *private String accountFirstname;* The problem I have is that Tapestry won't validate the annotated properties even though I have added the tapestry-beanvalidator jar in the classpath. Note that I don't use the beanform component for now. I use T5.2.6. Can anyone please help? Regards, Julien.
Re: Issue with Tapestry, JPA and JSR 303 annotations.
Hi Igor, Yes I do use the form component as follows: From the class: *@InjectComponent* *private Form childminderRegistrationForm;* * * From template: * form t:type=form t:id=childminderRegistrationForm validate=this clientValidation=none* Julien. 2011/10/20 Igor Drobiazko igor.drobia...@gmail.com Please more details. one of my Tapestry classes is not precise enough to identify the problem. You are using the Form component, right? Did you use the Form's validate parameter? On Thu, Oct 20, 2011 at 9:30 PM, Julien Martin bal...@gmail.com wrote: Hello, I have the following property in one of my Tapestry classes: *@Property* *@Persist* *@Valid* *private ChildminderAccount childminderAccount;* The ChildminderAccount entity extends an abstract Account entity class as follows: * public class ChildminderAccount extends Account* And finally the Account entity class has several properties including this one: *@NotNull* *private String accountFirstname;* The problem I have is that Tapestry won't validate the annotated properties even though I have added the tapestry-beanvalidator jar in the classpath. Note that I don't use the beanform component for now. I use T5.2.6. Can anyone please help? Regards, Julien. -- Best regards, Igor Drobiazko http://tapestry5.de
Tapestry failing to inject a service into a Translator with @Inject?
Hello, I have the following Translator implementation: package com.bignibou.web.services; import com.bignibou.domain.Postcode; import com.bignibou.service.BignibouService; import org.apache.tapestry5.Field; import org.apache.tapestry5.MarkupWriter; import org.apache.tapestry5.Translator; import org.apache.tapestry5.ValidationException; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.FormSupport; public class PostcodeTranslator implements TranslatorPostcode { @Inject BignibouService service; @Override public String getName() { return postcodeTranslator; } @Override public String toClient(Postcode value) { return value.getPostcode(); } @Override public ClassPostcode getType() { return Postcode.class; } @Override public String getMessageKey() { return postcodeTranslator-parse-exception; } @Override public Postcode parseClient(Field field, String clientValue, String message) throws ValidationException { try { String[] postcodesIds = clientValue.split(,); int postcodeId = Integer.parseInt(postcodesIds[0]); return service.loadPostcodeById(postcodeId);*//NULL POINTER EXCEPTION HERE!!!* } catch (RuntimeException e) { e.printStackTrace(); throw new ValidationException(message); } } @Override public void render(Field field, String message, MarkupWriter writer, FormSupport formSupport) { } } Unfortunately it seems that my service is not properly injected by @Inject and I get a NPE when I tried to use my service variable. Note that this does not occur with a ValueEncoder implementation that I use elsewhere in the application... Can anyone help please? Regards, Julien.
Re: Tapestry failing to inject a service into a Translator with @Inject?
It might have to do with the way I contribute my Translator i.e.: *@Contribute(TranslatorSource.class)* *public static void provideTranslators(MappedConfigurationClass, Translator configuration){* *configuration.add(Postcode.class, new PostcodeTranslator());* *}* See how I instanciate the PostcodeTranslator... I don't know how to get round this... Can someone please help? Regards, Julien. 2011/10/16 Julien Martin bal...@gmail.com Hello, I have the following Translator implementation: package com.bignibou.web.services; import com.bignibou.domain.Postcode; import com.bignibou.service.BignibouService; import org.apache.tapestry5.Field; import org.apache.tapestry5.MarkupWriter; import org.apache.tapestry5.Translator; import org.apache.tapestry5.ValidationException; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.FormSupport; public class PostcodeTranslator implements TranslatorPostcode { @Inject BignibouService service; @Override public String getName() { return postcodeTranslator; } @Override public String toClient(Postcode value) { return value.getPostcode(); } @Override public ClassPostcode getType() { return Postcode.class; } @Override public String getMessageKey() { return postcodeTranslator-parse-exception; } @Override public Postcode parseClient(Field field, String clientValue, String message) throws ValidationException { try { String[] postcodesIds = clientValue.split(,); int postcodeId = Integer.parseInt(postcodesIds[0]); return service.loadPostcodeById(postcodeId);*//NULL POINTER EXCEPTION HERE!!!* } catch (RuntimeException e) { e.printStackTrace(); throw new ValidationException(message); } } @Override public void render(Field field, String message, MarkupWriter writer, FormSupport formSupport) { } } Unfortunately it seems that my service is not properly injected by @Inject and I get a NPE when I tried to use my service variable. Note that this does not occur with a ValueEncoder implementation that I use elsewhere in the application... Can anyone help please? Regards, Julien.
Re: Tapestry failing to inject a service into a Translator with @Inject?
Thanks a lot Martin!! It works much better now. [?] Julien. 2011/10/16 Martin Strand do.not.eat.yellow.s...@gmail.com On Sun, 16 Oct 2011 22:09:14 +0200, Julien Martin bal...@gmail.com wrote: It might have to do with the way I contribute my Translator i.e.: @Contribute(TranslatorSource.**class) public static void provideTranslators(**MappedConfigurationClass, Translator configuration) { configuration.add(Postcode.**class, new PostcodeTranslator()); } See how I instanciate the PostcodeTranslator... I don't know how to get round this... If PostcodeTranslator is a defined service, you can use addInstance and Tapestry will autobuild the service for you: configuration.addInstance(**Postcode.class, PostcodeTranslator.class); otherwise you can inject its dependencies into the contribution method, and pass to a constructor: @Contribute(TranslatorSource.**class) public static void provideTranslators(**MappedConfigurationClass, Translator configuration, BignibouService service) { configuration.add(Postcode.**class, new PostcodeTranslator(service)); } --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Complex use case about JSR-303, Tapestry, and JPA entity inheritance
Hello, I have a JPA entity called ParentAccount that extends an abstract Account entity (see JPA inheritance). I have place the JSR-303 validation constraints in the Account entity. Now I have the following Tapestry class and templates and jsr-303 validation does not seem to work: *public class Inscription {* * * *@Property* *//this is not validated...* *private ParentAccount parentAccount;* * * *@Property* *@Validate(required)* *private String accountPasswordConfirmation;* * * * * *@InjectComponent* *private Form registrationForm;* * * *@OnEvent(EventConstants.PREPARE)* *void prepareAccount(){* *parentAccount = new ParentAccount() ;* *}* * * *@OnEvent(value= EventConstants.VALIDATE)* *void validateRegistrationForm(){* *if(registrationForm.isValid()){* * if(accountPasswordConfirmation.equals( parentAccount.getAccountPassword())) {* *System.out.println(ok for insert);* * }* *}* *}* * * * * *}* * * html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd; head titleHello World Page/title /head body form t:type=form t:id=registrationForm validate=this t:errors/ div label t:type=label for=accountEmailAddress/ input t:type=textfield t:id=accountEmailAddress value=parentAccount.accountEmailAddress/ /div div label t:type=label for=accountFirstName/ input t:type=textfield t:id=accountFirstName value=parentAccount.accountFirstName/ /div div label t:type=label for=accountLastName/ input t:type=textfield t:id=accountLastName value=parentAccount.accountLastName/ /div div label t:type=label for=accountPassword/ input t:type=textfield t:id=accountPassword value=parentAccount.accountPassword/ /div div label t:type=label for=accountPasswordConfirmation/ input t:type=textfield t:id=accountPasswordConfirmation value=accountPasswordConfirmation/ /div divinput type=submit value=ok//div /form /body /html I get a NPE here (*parentAccount.getAccountPassword*) indicating that the NotNull annotation that I have placed in the Account entity is ignored... Note that I deliberately don't use a beanform for now. Can anyone please help? Regards, Julien.
Tapestry component for input multiple=multiple
Hello, I have the following html generated by a jQuery plugin i.e. FCBKComplete (see below). I am relatively new to Tapestry. Can any of you advise as to what Tapestry component will properly map to the code below. *input id=postcodes class= hidden multiple=multiple name=postcodes * * option id=opt_PlNkbq7QtHWoCwJRq9kH4HbFzAtlHhf1 class=selected selected=selected value=496375003/option * * option id=opt_U64cITSzCTvpIHqpmwRZzCWVHQEDegK7 class=selected selected=selected value=496275002/option* *option id=opt_2737KLtNiJUNMnJyRZybl52whdHA992t class=selected selected=selected value=496675006/option* */input* Thanks in advance, Julien Martin.
Re: Tapestry component for input multiple=multiple
Thanks Taha. Do you know when Tapestry will support this html5 component? Regards, Julien. 2011/10/2 Taha Hafeez Siddiqi tawus.tapes...@gmail.com Hi Julien As Tapestry's structure is not dynamic, you cannot map a dynamically generated html to Tapestry component. What you can do is use a hidden component and update the component using javascript. regards Taha On Oct 2, 2011, at 9:03 PM, Julien Martin wrote: Hello, I have the following html generated by a jQuery plugin i.e. FCBKComplete (see below). I am relatively new to Tapestry. Can any of you advise as to what Tapestry component will properly map to the code below. *input id=postcodes class= hidden multiple=multiple name=postcodes * * option id=opt_PlNkbq7QtHWoCwJRq9kH4HbFzAtlHhf1 class=selected selected=selected value=496375003/option * * option id=opt_U64cITSzCTvpIHqpmwRZzCWVHQEDegK7 class=selected selected=selected value=496275002/option* *option id=opt_2737KLtNiJUNMnJyRZybl52whdHA992t class=selected selected=selected value=496675006/option* */input* Thanks in advance, Julien Martin. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5.3 and JQuery
thanks Magnus. 2011/8/31 Magnus Kvalheim mag...@kvalheim.dk No, you just need to call it once after jquery itself has loaded. jQuery plugin authors (should) define the plugin in an capsuled function/closure in order to avoid issues with other libraries - like prototype. see - http://docs.jquery.com/Plugins/Authoring#Summary_and_Best_Practices So - although the plugin is using $ internally - it's an alias for jQuery, but only in the scope of the closure. It's the recommended approach and JQueryUI does this for sure. You might also want to checkout http://docs.jquery.com/Using_jQuery_with_Other_Libraries#Referencing_Magic_-_Shortcuts_for_jQuery for how to write blocks of jquery code without using jQuery namespace all of the time. cheers Magnus On Wed, Aug 31, 2011 at 3:09 PM, Julien Martin bal...@gmail.com wrote: Hello again, Do I also need to add the jQuery.noConflict() at the end of the JQuery UI file? J. 2011/8/30 Gunnar Eketrapp gunnar.eketr...@gmail.com I use jQuery without any hazzle. Just remember to call jQuery.noConflict() and to use jQuery instead of $ since prototype has taken that one. 2011/8/30 Julien Martin bal...@gmail.com Hello all, Can someone please tell me what are the recommended patterns or frameworks - if any - I should rely if I want to use JQuery together with Tapestry 5? For instance, can I just include the JQuery library in my template pages and go ahead and use JQuery features? Are there pitfalls I should avoid? Any clue or comment welcome. Thanks, Julien. -- [Hem: 08-715 59 57, Mobil: 070-991 86 42] Allévägen 2A, 132 42 Saltsjö-Boo
Re: Tapestry 5.3 and JQuery
Hello again, Do I also need to add the jQuery.noConflict() at the end of the JQuery UI file? J. 2011/8/30 Gunnar Eketrapp gunnar.eketr...@gmail.com I use jQuery without any hazzle. Just remember to call jQuery.noConflict() and to use jQuery instead of $ since prototype has taken that one. 2011/8/30 Julien Martin bal...@gmail.com Hello all, Can someone please tell me what are the recommended patterns or frameworks - if any - I should rely if I want to use JQuery together with Tapestry 5? For instance, can I just include the JQuery library in my template pages and go ahead and use JQuery features? Are there pitfalls I should avoid? Any clue or comment welcome. Thanks, Julien. -- [Hem: 08-715 59 57, Mobil: 070-991 86 42] Allévägen 2A, 132 42 Saltsjö-Boo
Tapestry 5.3 and JQuery
Hello all, Can someone please tell me what are the recommended patterns or frameworks - if any - I should rely if I want to use JQuery together with Tapestry 5? For instance, can I just include the JQuery library in my template pages and go ahead and use JQuery features? Are there pitfalls I should avoid? Any clue or comment welcome. Thanks, Julien.
Re: Tapestry 5.3 and JQuery
Thank you both. I think I once read a comment by Howard Lewis Ship stating that JQuery would become the default JS library in Tapestry 5.3. Is this indeed the case or will this be the case in some other future version of Tapestry? Julien. 2011/8/30 Tony Nelson tnel...@starpoint.com I've been using the tapestry-jquery project here: https://github.com/got5/tapestry5-jquery It's dead simple to use. The one issue is that it doesn't currently work with 5.3. There is a branch for it, but it probably won't be published until after 5.3 is actually released (5.3 is beta at the moment). Tony On Aug 30, 2011, at 10:18 AM, Gunnar Eketrapp wrote: I use jQuery without any hazzle. Just remember to call jQuery.noConflict() and to use jQuery instead of $ since prototype has taken that one. 2011/8/30 Julien Martin bal...@gmail.com Hello all, Can someone please tell me what are the recommended patterns or frameworks - if any - I should rely if I want to use JQuery together with Tapestry 5? For instance, can I just include the JQuery library in my template pages and go ahead and use JQuery features? Are there pitfalls I should avoid? Any clue or comment welcome. Thanks, Julien. -- [Hem: 08-715 59 57, Mobil: 070-991 86 42] Allévägen 2A, 132 42 Saltsjö-Boo
Re: Tapestry 5.3 and JQuery
Thanks for your reply Tony. Cheers, J. 2011/8/30 Tony Nelson tnel...@starpoint.com I believe that tap is going to try to be more flexible and allow you to choose whichever library you prefer by providing an integration layer. No point is forcing you to use one library over another IMO. Tony On Aug 30, 2011, at 10:35 AM, Julien Martin wrote: Thank you both. I think I once read a comment by Howard Lewis Ship stating that JQuery would become the default JS library in Tapestry 5.3. Is this indeed the case or will this be the case in some other future version of Tapestry? Julien. 2011/8/30 Tony Nelson tnel...@starpoint.com I've been using the tapestry-jquery project here: https://github.com/got5/tapestry5-jquery It's dead simple to use. The one issue is that it doesn't currently work with 5.3. There is a branch for it, but it probably won't be published until after 5.3 is actually released (5.3 is beta at the moment). Tony On Aug 30, 2011, at 10:18 AM, Gunnar Eketrapp wrote: I use jQuery without any hazzle. Just remember to call jQuery.noConflict() and to use jQuery instead of $ since prototype has taken that one. 2011/8/30 Julien Martin bal...@gmail.com Hello all, Can someone please tell me what are the recommended patterns or frameworks - if any - I should rely if I want to use JQuery together with Tapestry 5? For instance, can I just include the JQuery library in my template pages and go ahead and use JQuery features? Are there pitfalls I should avoid? Any clue or comment welcome. Thanks, Julien. -- [Hem: 08-715 59 57, Mobil: 070-991 86 42] Allévägen 2A, 132 42 Saltsjö-Boo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Specifying several event constants for the @OnEvent annotation?
Thank you all. I am then going to use a private method invoked by both public methods. Regards, Julien. 2011/8/3 Howard Lewis Ship hls...@gmail.com -1 Thiago had the right solution. Further, the second event (fromMyAjaxEvent) will occur after the activate event itself (assuming that the Ajax-request originating component is on the same page). It is very much an exception to the rule to have multiple events handled by the same method. It is occasionally useful to have a single method handle events from multiple component ids (by exploding the from portion of the method name). On Tue, Aug 2, 2011 at 4:03 PM, Taha Hafeez tawus.tapes...@gmail.com wrote: How about having a new annotation ?? @OnEvents( { @OnEvent(...), @OnEvent(...) }) On Wed, Aug 3, 2011 at 4:22 AM, nillehammer tapestry.nilleham...@winfonet.eu wrote: You could implement one method that is called by your two event handlers. E.g. @OnEvent(EventConstants.ACTIVATE) final void callEventHandlerFromActivate() { this.doTheWork(); } @OnEvent(yourAjaxEvent) final void callEventHandlerFromMyAjaxEvent() { this.doTheWork(); } private final void doTheWork() { ... } - http://www.winfonet.eu -- View this message in context: http://tapestry.1045711.n5.nabble.com/Specifying-several-event-constants-for-the-OnEvent-annotation-tp4659025p4660584.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 -- regards Taha Hafeez Siddiqi (tawus) http://tawus.wordpress.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
Specifying several event constants for the @OnEvent annotation?
Hello, I need for a method to be called upon several events (e.g. ACTIVATE and ACTION). I tried the following: *@OnEvent(value = {EventConstants.ACTIVATE, EventConstants.ACTION}) void loadJobPostings() { jobPostings = service.loadJobPostings(); } * and it does not work/compile unfortunately. Am I missing something? Can anyone please help? Regards, Julien.
Re: Specifying several event constants for the @OnEvent annotation?
Hello Igor, I need this method to be called 1. when the page is activated (for a normal render) 2. and also when an ajax method is called (for an ajax render). Is this possible? Regards, Julien. 2011/8/2 Igor Drobiazko igor.drobia...@gmail.com If the handler methods for two different events are same, then you probably need only a single event. BTW: Firing activate event might cause unexpected behavior as activate is already reserved by Tapestry. On Tue, Aug 2, 2011 at 5:06 PM, Julien Martin bal...@gmail.com wrote: Hello, I need for a method to be called upon several events (e.g. ACTIVATE and ACTION). I tried the following: *@OnEvent(value = {EventConstants.ACTIVATE, EventConstants.ACTION}) void loadJobPostings() { jobPostings = service.loadJobPostings(); } * and it does not work/compile unfortunately. Am I missing something? Can anyone please help? Regards, Julien. -- Best regards, Igor Drobiazko http://tapestry5.de
Re: Issue with ajax updating of a zone
thanks Taha 2011/7/29 Taha Hafeez tawus.tapes...@gmail.com You can use eventlink instead of actionlink and specify the event name using event parameter. regards Taha On Fri, Jul 29, 2011 at 7:34 PM, Julien Martin bal...@gmail.com wrote: It would be nice if I could add several OnEvent to a method. I could for instance add the EventConstants.ACTION event as well as the ACTIVATE event to my loadJobPostings() method. Can anyone please help? Is there a better way? J. 2011/7/29 Julien Martin bal...@gmail.com I understand part of the problem now. The method below is called before the ajax method that return grid.getBody(); *@OnEvent(EventConstants.ACTIVATE) void loadJobPostings() { jobPostings = service.loadJobPostings(); }* How can remedy this without doing something like this which I find not very beautiful: * @OnEvent(value = EventConstants.ACTION, component = pause) @Log Object pauseJobPosting(JobPosting jobPosting) { service.pauseJobPosting(jobPosting); loadJobPostings();//NOTICE HERE!!! return grid.getBody(); }* Any idea? J. 2011/7/29 Julien Martin bal...@gmail.com Here is the result of the first click: Hibernate: select jobposting0_.id_job_posting as id1_0_, jobposting0_.job_posting_activated as job2_0_, jobposting0_.job_posting_body as job3_0_, jobposting0_.job_posting_contact_email as job4_0_, jobposting0_.job_posting_contact_name as job5_0_, jobposting0_.job_posting_contact_telephone as job6_0_, jobposting0_.job_posting_creation_date as job7_0_, jobposting0_.job_posting_location as job8_0_, jobposting0_.job_posting_paused as job9_0_, jobposting0_.job_posting_salary as job10_0_, jobposting0_.job_posting_title as job11_0_, jobposting0_.job_posting_update_date as job12_0_, jobposting0_.job_posting_validated as job13_0_, jobposting0_.job_posting_validation_date as job14_0_ from cheetah.job_posting jobposting0_ where jobposting0_.id_job_posting=? limit ? Hibernate: select jobposting0_.id_job_posting as id1_0_, jobposting0_.job_posting_activated as job2_0_, jobposting0_.job_posting_body as job3_0_, jobposting0_.job_posting_contact_email as job4_0_, jobposting0_.job_posting_contact_name as job5_0_, jobposting0_.job_posting_contact_telephone as job6_0_, jobposting0_.job_posting_creation_date as job7_0_, jobposting0_.job_posting_location as job8_0_, jobposting0_.job_posting_paused as job9_0_, jobposting0_.job_posting_salary as job10_0_, jobposting0_.job_posting_title as job11_0_, jobposting0_.job_posting_update_date as job12_0_, jobposting0_.job_posting_validated as job13_0_, jobposting0_.job_posting_validation_date as job14_0_ from cheetah.job_posting jobposting0_ Hibernate: select jobposting0_.id_job_posting as id1_0_, jobposting0_.job_posting_activated as job2_0_, jobposting0_.job_posting_body as job3_0_, jobposting0_.job_posting_contact_email as job4_0_, jobposting0_.job_posting_contact_name as job5_0_, jobposting0_.job_posting_contact_telephone as job6_0_, jobposting0_.job_posting_creation_date as job7_0_, jobposting0_.job_posting_location as job8_0_, jobposting0_.job_posting_paused as job9_0_, jobposting0_.job_posting_salary as job10_0_, jobposting0_.job_posting_title as job11_0_, jobposting0_.job_posting_update_date as job12_0_, jobposting0_.job_posting_validated as job13_0_, jobposting0_.job_posting_validation_date as job14_0_ from cheetah.job_posting jobposting0_ where jobposting0_.id_job_posting=? limit ? Hibernate: select jobposting0_.id_job_posting as id1_0_0_, jobposting0_.job_posting_activated as job2_0_0_, jobposting0_.job_posting_body as job3_0_0_, jobposting0_.job_posting_contact_email as job4_0_0_, jobposting0_.job_posting_contact_name as job5_0_0_, jobposting0_.job_posting_contact_telephone as job6_0_0_, jobposting0_.job_posting_creation_date as job7_0_0_, jobposting0_.job_posting_location as job8_0_0_, jobposting0_.job_posting_paused as job9_0_0_, jobposting0_.job_posting_salary as job10_0_0_, jobposting0_.job_posting_title as job11_0_0_, jobposting0_.job_posting_update_date as job12_0_0_, jobposting0_.job_posting_validated as job13_0_0_, jobposting0_.job_posting_validation_date as job14_0_0_ from cheetah.job_posting jobposting0_ where jobposting0_.id_job_posting=? Hibernate: *update* cheetah.job_posting set job_posting_activated=?, job_posting_body=?, job_posting_contact_email=?, job_posting_contact_name=?, job_posting_contact_telephone=?, job_posting_creation_date=?, job_posting_location=?, job_posting_paused=?, job_posting_salary=?, job_posting_title=?, job_posting_update_date=?, job_posting_validated=?, job_posting_validation_date=? where id_job_posting=? and the second click: Hibernate: select jobposting0_.id_job_posting as id1_0_, jobposting0_.job_posting_activated as job2_0_, jobposting0_
Re: Beginner needs help with t:grid/t:submit/row/context in Tapestry
thanks all, I'll have a look at that. J. 2011/7/29 Stephan Windmüller stephan.windmuel...@tu-dortmund.de On 28.07.2011 16:12, Julien Martin wrote: The current behavior is for my form *to consider that the current row is always the last one*!! Please have a look at the parameter defer of the submit component: http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Submit.html HTH Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Issue with ajax updating of a zone
Hello, I have a form that contains a number of action links. I would like to update the whole enclosig form from an action link and have added a zone to that purpose. It is as follows: *t:zone t:id=grid id=grid form t:type=form t:id=jobPostings t:grid source=jobPostings row=jobPosting add=actions exclude=jobPostingValidationDate p:jobPostingPausedCell t:if test=jobPosting.jobPostingPaused t:actionlink t:id=unPause context=jobPosting zone=gridunPause/t:actionlink p:else t:actionlink t:id=pause context=jobPosting zone=gridpause/t:actionlink /p:else /t:if /p:jobPostingPausedCell p:actionscell t:actionlink t:id=activate context=jobPostingactivate/t:actionlink br/ t:actionlink t:id=modify context=jobPostingmodify/t:actionlink br/ t:actionlink t:id=delete context=jobPostingdelete/t:actionlink br/ /p:actionscell /t:grid /form /t:zone* However the zone is not updated when I click on the button. Can anyone please help? Regards, Julien.
Re: Issue with ajax updating of a zone
I've added these as suggested. It still does not work... Any other idea? J. * @OnEvent(value = EventConstants.ACTION, component = pause) Object pauseJobPosting(JobPosting jobPosting) { service.pauseJobPosting(jobPosting); return grid.getBody(); } @OnEvent(value = EventConstants.ACTION, component = unPause) Object unPauseJobPosting(JobPosting jobPosting) { service.unPauseJobPosting(jobPosting); return grid.getBody(); }* 2011/7/29 Taha Hafeez tawus.tapes...@gmail.com Do the corresponding event handlers of these actionlinks return zone.getBody() @InjectComponent private Zone grid; Object onUnPause() { return grid.getBody(); } regards Taha On Fri, Jul 29, 2011 at 6:32 PM, Julien Martin bal...@gmail.com wrote: Hello, I have a form that contains a number of action links. I would like to update the whole enclosig form from an action link and have added a zone to that purpose. It is as follows: *t:zone t:id=grid id=grid form t:type=form t:id=jobPostings t:grid source=jobPostings row=jobPosting add=actions exclude=jobPostingValidationDate p:jobPostingPausedCell t:if test=jobPosting.jobPostingPaused t:actionlink t:id=unPause context=jobPosting zone=gridunPause/t:actionlink p:else t:actionlink t:id=pause context=jobPosting zone=gridpause/t:actionlink /p:else /t:if /p:jobPostingPausedCell p:actionscell t:actionlink t:id=activate context=jobPostingactivate/t:actionlink br/ t:actionlink t:id=modify context=jobPostingmodify/t:actionlink br/ t:actionlink t:id=delete context=jobPostingdelete/t:actionlink br/ /p:actionscell /t:grid /form /t:zone* However the zone is not updated when I click on the button. Can anyone please help? Regards, Julien. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Issue with ajax updating of a zone
No exception is thrown... Is there any way to log the ajax calls? J. 2011/7/29 Taha Hafeez tawus.tapes...@gmail.com There must be some stack trace ? Can you share that ? regards Taha On Fri, Jul 29, 2011 at 6:54 PM, Julien Martin bal...@gmail.com wrote: I've added these as suggested. It still does not work... Any other idea? J. * @OnEvent(value = EventConstants.ACTION, component = pause) Object pauseJobPosting(JobPosting jobPosting) { service.pauseJobPosting(jobPosting); return grid.getBody(); } @OnEvent(value = EventConstants.ACTION, component = unPause) Object unPauseJobPosting(JobPosting jobPosting) { service.unPauseJobPosting(jobPosting); return grid.getBody(); }* 2011/7/29 Taha Hafeez tawus.tapes...@gmail.com Do the corresponding event handlers of these actionlinks return zone.getBody() @InjectComponent private Zone grid; Object onUnPause() { return grid.getBody(); } regards Taha On Fri, Jul 29, 2011 at 6:32 PM, Julien Martin bal...@gmail.com wrote: Hello, I have a form that contains a number of action links. I would like to update the whole enclosig form from an action link and have added a zone to that purpose. It is as follows: *t:zone t:id=grid id=grid form t:type=form t:id=jobPostings t:grid source=jobPostings row=jobPosting add=actions exclude=jobPostingValidationDate p:jobPostingPausedCell t:if test=jobPosting.jobPostingPaused t:actionlink t:id=unPause context=jobPosting zone=gridunPause/t:actionlink p:else t:actionlink t:id=pause context=jobPosting zone=gridpause/t:actionlink /p:else /t:if /p:jobPostingPausedCell p:actionscell t:actionlink t:id=activate context=jobPostingactivate/t:actionlink br/ t:actionlink t:id=modify context=jobPostingmodify/t:actionlink br/ t:actionlink t:id=delete context=jobPostingdelete/t:actionlink br/ /p:actionscell /t:grid /form /t:zone* However the zone is not updated when I click on the button. Can anyone please help? Regards, Julien. - 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