Re: Testify Base class com.formos.tapestry.testify.testng.TapestryTest is not in a controlled package
Thanks Paul, I will try this later at home, I was very busy racing alpine roads with my mini cooper this weekend :-) http://en.wikipedia.org/wiki/File:Stelvio.jpg Cheers, Borut 2009/9/6 Paul Field tapes...@cloudinthesky.co.uk A quick update... there's a small but important error in my example project structure. I'd put the DayMonthYearDateInputDemo.tml and DayMonthYearDateInputDemo.java files into a package called ...demo.components and they should be in ...demo.pages. This is the correct structure (I hope :-) ). +---src +---main ¦ +---java ¦ ¦ +---si ¦ ¦ +---najdi ¦ ¦ +---tapestry ¦ ¦ +---library ¦ ¦ +---components ¦ ¦ ¦ DayMonthYearDateInput.java ¦ ¦ ¦ day-month-year-date-input-error.png ¦ ¦ ¦ day-month-year-date-input.png ¦ ¦ ¦ DayMonthYearDateInput.properties ¦ ¦ ¦ DayMonthYearDateInput.tml ¦ ¦ ¦ DayMonthYearDateInput.xdoc ¦ ¦ ¦ DayMonthYearDateInput_sl_SI.properties ¦ ¦ ¦ ¦ ¦ +---mixins ¦ ¦ ¦ ZoneUpdater.java ¦ ¦ ¦ ZoneUpdater.js ¦ ¦ ¦ ¦ ¦ +---services ¦ ¦ ¦ LibraryModule.java ¦ ¦ ¦ TestInfrastructureModule.java ¦ ¦ ¦ ¦ ¦ +---util ¦ ¦ IntegerOptionModel.java ¦ ¦ IntegerSelectModel.java ¦ ¦ IntegerValueEncoder.java ¦ ¦ Month.java ¦ ¦ ¦ +---resources ¦ log4j.properties | +---site ¦ ¦ site.xml ¦ ¦ ¦ +---xdoc ¦ index.xml ¦ +---test +---conf ¦ testng.xml | +---java +---test +---si +---najdi +---tapestry +---library +---base ¦ AbstractT5ComponentsLibraryTest.java ¦ +---demo ¦ ¦ DemoModule.java ¦ ¦ ¦ +---pages ¦ DayMonthYearDateInputDemo.tml ¦ DayMonthYearDateInputDemo.java ¦ +---components DayMonthYearDateInputTest.java - Paul -- View this message in context: http://www.nabble.com/Testify-Base-class-com.formos.tapestry.testify.testng.TapestryTest-is--not-in-a-controlled-package-tp25246887p25315388.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: Substitution for Switch/Case/Block to embed components really dynamic ?
you have to wrap your components in a block... as done by the beaneditor and inject them as examplified by thiago. this way your target page does not have to know anything about the wrapped components. i did something similar by introducing an own block service. which i contribute blocks from different pages (page / block id pairs). a page that should display different combinations of blocks just injects this block service and displays the blocks... if a block does not exist an empty block is displayed. g, kris Ulrich Stärk u...@spielviel.de 04.09.2009 14:33 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: Substitution for Switch/Case/Block to embed components really dynamic ? No. That's the drawback of the caching of pages and their component structure done by Tapestry. Uli On 04.09.2009 13:56 schrieb Stefan: I think Its the right direction, but there is always the main problem: How to get and add a component which is not defined/bound in any page template? Is that possible at all? Am 04.09.2009 um 01:43 schrieb Thiago H. de Paula Figueiredo: BeanEditor and BeanEditForm use blocks from different pages to edit properties. Its something similar to what you want to do. Ultimately, they get a block from a given page using this code (adapted from BeanBlockOverrideSourceImpl.toBlock()): Page page = pageCache.get(pageName); return page.getRootElement().getBlock(blockId); where pageCache is an instance of RequestPageCache. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - 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: Why does this fail???
I forgot I posted this problem. Yes, you're right and I solved the problem changing the switch and inserting and if-else if structure instead. I was really confused about the same variable causing an error being used in different ways of making the same thing (retrieve the value), but now with the Javassist issue I understand the whole thing. Thanks, Thiago. 2009/9/7 Thiago H. de Paula Figueiredo thiag...@gmail.com: Howard once said that sometimes Javassist (used by Tapestry to transform classes) sometimes doesn't handle large event handler methods correctly. Try refactoring your method to reduce it. By the way, a switch inside a switch is not recommended coding: refactor it too. ;) -- Thiago - 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: Good news about Tapestry 5 in Google App Engine
Robert Zeigler wrote: There's an open issue for this (TAP5-713) and Christian Köberl has a working patch that seems to be about 98% there... By the way: I have put my code in a Github project: http://wiki.github.com/derkoe/tapestry-sax-parser You can use this to have Tapestry running without Stax. Cheers, Chris -- View this message in context: http://n2.nabble.com/Good-news-about-Tapestry-5-in-Google-App-Engine-tp3576791p3596728.html Sent from the Tapestry Users 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
Problem with testify and @SessionState injection
Hi! I am really close to get my Testify machinery working for my first non-trivial page. The last hurdle (touch on wood) is that the @ForComponents annotation doesn't inject my mock object in fields annotated with @SessionState. I can't see any example doing this, so, does it work? Am I on the wrong way? Is there any other way of doing this? Mats - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem with testify and @SessionState injection
Mats Henricson m...@henricson.se wrote on 07/09/2009 12:48:39: I am really close to get my Testify machinery working for my first non-trivial page. The last hurdle (touch on wood) is that the @ForComponents annotation doesn't inject my mock object in fields annotated with @SessionState. I wouldn't expect you to use mock objects with @SessionState. Tapestry's PageTester (on which Testify is built) runs with a fake session so is able to store session information during your test. So I would expect @SessionState to work as it does in a live site. However, I haven't actually tried it - so I could be wrong. Paul --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: auto java reloading depends on package?
Only components, inside the designated packages, can be auto-reloaded. On Sun, Sep 6, 2009 at 10:06 PM, Alfonso Quiroga alfonsose...@gmail.comwrote: Hi! I have java classes in root.components... root.pages and root.base as usual. That works perfectly... but I was needing a new class to store in session, just a java bean (WizardBean) and I dropped it in root.wizard, and auto-reloading does NOT work in that package. I tried to put in root.base.wizard, but there was an exception. Where can I put it for reloading works? thanks in advance! - 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!
Re: auto java reloading depends on package?
Thanks for the fast answer. I think is very common in a web-application to have own web-tier objects, my example are Wizard Beans that I store in sessions. It would be great in the future to auto-reload this beans, by now I will try javarebel and I'll tell you my experience. Thanks again On Mon, Sep 7, 2009 at 12:53 PM, Howard Lewis Shiphls...@gmail.com wrote: Only components, inside the designated packages, can be auto-reloaded. On Sun, Sep 6, 2009 at 10:06 PM, Alfonso Quiroga alfonsose...@gmail.comwrote: Hi! I have java classes in root.components... root.pages and root.base as usual. That works perfectly... but I was needing a new class to store in session, just a java bean (WizardBean) and I dropped it in root.wizard, and auto-reloading does NOT work in that package. I tried to put in root.base.wizard, but there was an exception. Where can I put it for reloading works? thanks in advance! - 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! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Problem with OptimizedSessionPersistedObject not working in Tomcat Jetty
I'm surprised that no one else is bothered by this, are we the only ones developing a Tapestry app for a clustered environment or something? Anyway, given zero votes I figured it's not likely to get fixed any time soon so we've implemented a solution which we're now using and I've attached the patch to the JIRA issue. -Original Message- From: Blower, Andy [mailto:andy.blo...@proquest.co.uk] Sent: 03 September 2009 15:11 To: 'Tapestry users' Subject: Problem with OptimizedSessionPersistedObject not working in Tomcat Jetty I don't know if anyone else has spotted this, and it may well be the case for other servlet containers as well, but we noticed that objects were being propagated across our cluster even when a page that only read the session object was just being refreshed. This is a very serious issue, not quite a blocker because everything functions okay, but I really think this should be fixed and released as 5.1.0.6 as soon as possible. Please take a look at the bug and vote for it if you agree: https://issues.apache.org/jira/browse/TAP5-834 I've included a couple of suggestions of solutions, please comment if you thing there are any drawbacks or better ones. Thanks, Andy. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem with OptimizedSessionPersistedObject not working in Tomcat Jetty
Thanks for the patch. On Mon, Sep 7, 2009 at 9:07 AM, Blower, Andy andy.blo...@proquest.co.ukwrote: I'm surprised that no one else is bothered by this, are we the only ones developing a Tapestry app for a clustered environment or something? Anyway, given zero votes I figured it's not likely to get fixed any time soon so we've implemented a solution which we're now using and I've attached the patch to the JIRA issue. -Original Message- From: Blower, Andy [mailto:andy.blo...@proquest.co.uk] Sent: 03 September 2009 15:11 To: 'Tapestry users' Subject: Problem with OptimizedSessionPersistedObject not working in Tomcat Jetty I don't know if anyone else has spotted this, and it may well be the case for other servlet containers as well, but we noticed that objects were being propagated across our cluster even when a page that only read the session object was just being refreshed. This is a very serious issue, not quite a blocker because everything functions okay, but I really think this should be fixed and released as 5.1.0.6 as soon as possible. Please take a look at the bug and vote for it if you agree: https://issues.apache.org/jira/browse/TAP5-834 I've included a couple of suggestions of solutions, please comment if you thing there are any drawbacks or better ones. Thanks, Andy. - 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!
Re: auto java reloading depends on package?
Doing auto-reloading right is very tricky. You have to have control over the lifecycle of objects, and the class loaders for those objects. For Tapestry components this is possible and is, in effect, a side-effect of the transforming technology that allows components to operate. To allow the same kind of reloading beyond components is more involved, and would turn Tapestry into an application server, rather than a framework. Simply reloading a class may not be enough. For example, what if the class being reloaded is a module class, thus changing the configuration of the IoC container (including the configuration passed to some services)? Changing even a service implementation can have a rippling effect: the new implementation may have new dependencies. Values obtained from the old service may have been passed to other services; with external XML configuration it might be possible to track this, but with Tapestry's Java-centric approach, it is virtually impossible to know what data has moved about the system. On Mon, Sep 7, 2009 at 9:03 AM, Alfonso Quiroga alfonsose...@gmail.comwrote: Thanks for the fast answer. I think is very common in a web-application to have own web-tier objects, my example are Wizard Beans that I store in sessions. It would be great in the future to auto-reload this beans, by now I will try javarebel and I'll tell you my experience. Thanks again On Mon, Sep 7, 2009 at 12:53 PM, Howard Lewis Shiphls...@gmail.com wrote: Only components, inside the designated packages, can be auto-reloaded. On Sun, Sep 6, 2009 at 10:06 PM, Alfonso Quiroga alfonsose...@gmail.com wrote: Hi! I have java classes in root.components... root.pages and root.base as usual. That works perfectly... but I was needing a new class to store in session, just a java bean (WizardBean) and I dropped it in root.wizard, and auto-reloading does NOT work in that package. I tried to put in root.base.wizard, but there was an exception. Where can I put it for reloading works? thanks in advance! - 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! - 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!
Re: Problem with testify and @SessionState injection
Paul Field wrote: Mats Henricson m...@henricson.se wrote on 07/09/2009 12:48:39: I am really close to get my Testify machinery working for my first non-trivial page. The last hurdle (touch on wood) is that the @ForComponents annotation doesn't inject my mock object in fields annotated with @SessionState. I wouldn't expect you to use mock objects with @SessionState. Tapestry's PageTester (on which Testify is built) runs with a fake session so is able to store session information during your test. So I would expect @SessionState to work as it does in a live site. However, I haven't actually tried it - so I could be wrong. So, how should I inject my mocked @SessionState object? Is it possible through the tester object, before I render the page? Mats - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
How to .tml template access a class's static variable
I want to from B.tml access a static variable/method of A class but I don't know how to... Help me please
Re: How to .tml template access a class's static variable
I think we can't and should delegate in B class DH http://www.gaonline.com.cn - Original Message - From: Xuan Tran Le To: Tapestry users users@tapestry.apache.org Sent: Tuesday, September 08, 2009 11:17 AM Subject: How to .tml template access a class's static variable I want to from B.tml access a static variable/method of A class but I don't know how to... Help me please
Re: How to .tml template access a class's static variable
I have a stable system, so I don't want to modify so much code. In addition, your suggestion can cause the code duplicated and very hard to maintain. I will make clear my idea: for example, I have A class - A.java -- public class A { private static String name; public static String getName() { return name; } /*some method here*/ } -- And from B.tml I want to get name value from getName() method. What should I do now? On Tue, Sep 8, 2009 at 10:38 AM, DH ningd...@gmail.com wrote: I think we can't and should delegate in B class DH http://www.gaonline.com.cn - Original Message - From: Xuan Tran Le To: Tapestry users users@tapestry.apache.org Sent: Tuesday, September 08, 2009 11:17 AM Subject: How to .tml template access a class's static variable I want to from B.tml access a static variable/method of A class but I don't know how to... Help me please