[T5] Re-inject or inherit services in children ?
Hello ! My project is a little more advanced, so I spent some time refactoring the code. Along this refactoring, I saw that I have a lot if component and class that inherit a base page (yes, that's why I have a base page ;). I inject on this page some quite common services (for example, an authorization service). So, what is the best pattern, in regard of Tapestry 5, for a page or component that extends my page base : inject (again) the services, or get it from the parent (what suppose that these services have matching getter in the base page). I believe injection is cheap, but a base page is here to provide common services, so I'm prone to choose the inherit pattern. What do you think about it ? -- Francois Armand Etudes Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About Slf4j Error
Lococode wrote: Hi, Hello Lococode, [...] error: * java.lang.RuntimeException java.lang.ClassNotFoundException: caught an exception while obtaining a class file for org.example.myapp.pages.Start * java.lang.ClassNotFoundException caught an exception while obtaining a class file for org.example.myapp.pages.Start exception org.apache.tapestry.internal.services.TransformationException: Error obtaining injected value for field org.example.myapp.pages.Start.log: java.lang.ClassNotFoundException: org.slf4j.Logger I have the very same error. As soon as I attempt to inject org.slf4j.Logger, I get an exception : 8- exception org.apache.tapestry.internal.services.TransformationException: Error obtaining injected value for field fr.bpi.tapestry.components.ViewUser.logger: java.lang.ClassNotFoundException: org.slf4j.Logger 8- I have use slj4j 1.4.3 and log4J 1.2.14. Have you find a solution to your pb ? -- Francois Armand Etudes Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't get component inside a component
Hi, I'm a newbie in tapestry I have a component Drapeau that embed 3 others components of type Couleur all the Couleur components in any phase of the Drapeau render process appear to be null in my debugger. Drapeau.html == span xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; This is a flag t:Couleur id=couleur1 Couleur 1 /t:Couleur t:Couleur id=couleur2 Couleur 2 /t:Couleur t:Couleur id=couleur3 Couleur 3 /t:Couleur t:body/ /span Drapeau.java == public class Drapeau { @Component(id=couleur1) Couleur couleur1; @Component(id=couleur2) Couleur couleur2; @Component(id=couleur3) Couleur couleur3; @BeforeRender public boolean beforeRender(MarkupWriter writer){ return true; } ... other phases ... } And in my page Root.html t:Drapeau bla /t:Drapeau The Drapeau is rendered fine (I mean with the three Couleurs) in the browser but I really don't see how the Drapeau Component can collaborate with the Couleur components. Thanks. -- Michael Courcy http://courcy.blogspot.com
Re: Can't get component inside a component
Try replacing @Component(id=couleur1) Couleur couleur1; by @Component(id=couleur1) private Couleur couleur1; AFAIK, @Component and @Inject only works in private fields. Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't get component inside a component
Thanks a lot. Thiago HP a écrit : Try replacing @Component(id=couleur1) Couleur couleur1; by @Component(id=couleur1) private Couleur couleur1; AFAIK, @Component and @Inject only works in private fields. Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Courcy http://courcy.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't get component inside a component
Hi Michael, Thiago is right, first make the fields private... you should have some warnings in your console tough. then you have to decide how you want to add components: you can add components to a page by declaring them in the template like you did (then you dont need to declare them in your page/component class): t:pagelink/t:pagelink or by using invisible instrumentation by adding an t:id attribute to one of your HTML elements that matches a field in the page class/componen class with a @Component annotation with the same name of with a id parameter: a t:id=page.../a // id matches field name @Component private PageLink page // id in template does not match field name @Component(id=page) private PageLink pageToEdit g, kris Thiago HP [EMAIL PROTECTED] 06.12.2007 12:31 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: Can't get component inside a component Try replacing @Component(id=couleur1) Couleur couleur1; by @Component(id=couleur1) private Couleur couleur1; AFAIK, @Component and @Inject only works in private fields. Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About Slf4j Error
No. But I found the error may be because when jetty start load SLF4J. and where run mvn jetty:run is ok! so I :( ... Francois Armand wrote: Lococode wrote: Hi, Hello Lococode, [...] error: * java.lang.RuntimeException java.lang.ClassNotFoundException: caught an exception while obtaining a class file for org.example.myapp.pages.Start * java.lang.ClassNotFoundException caught an exception while obtaining a class file for org.example.myapp.pages.Start exception org.apache.tapestry.internal.services.TransformationException: Error obtaining injected value for field org.example.myapp.pages.Start.log: java.lang.ClassNotFoundException: org.slf4j.Logger I have the very same error. As soon as I attempt to inject org.slf4j.Logger, I get an exception : 8- exception org.apache.tapestry.internal.services.TransformationException: Error obtaining injected value for field fr.bpi.tapestry.components.ViewUser.logger: java.lang.ClassNotFoundException: org.slf4j.Logger 8- I have use slj4j 1.4.3 and log4J 1.2.14. Have you find a solution to your pb ? -- Francois Armand Etudes Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/About-Slf4j-Error-tf4753003.html#a14191474 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to integrate tapestry and jbpm,or any other workflow framework?
Web services would work.a directory redsident object, etc Sent via BlackBerry by ATT -Original Message- From: Oliver Lee [EMAIL PROTECTED] Date: Thu, 6 Dec 2007 21:35:34 To:users users@tapestry.apache.org Subject: How to integrate tapestry and jbpm,or any other workflow framework? Can give me an idea??thanks! Oliver Lee 2007-12-06
Re: [T5] Re-inject or inherit services in children ?
I've found that, quite often, there's a little bit of processing around the injected service method invocation, so that's where the base page can really add some value: collect and pre-processing the values before invoking the method. For example, I was just working on PageLink and ActionLink and refactoring out an AbstractLink: public abstract class AbstractLink { @Inject private ComponentInvocationMap _componentInvocationMap; /** * An anchor value to append to the generated URL (the hash separator will be added automatically). */ @Parameter(defaultPrefix = LITERAL_BINDING_PREFIX) private String _anchor; @Inject private ComponentResources _resources; private final String buildHref(Link link) { String href = link.toURI(); if (_anchor == null) return href; return href + # + _anchor; } /** * Writes an lt;agt; element with the provided link as the href attribute. A call to * [EMAIL PROTECTED] org.apache.tapestry.MarkupWriter#end()} is emnot/em provided.Automatically appends * an anchor if the component's anchor parameter is non-null. Informal parameters are rendered as well. * * @param writer to write markup to * @param clientId value written as the id attribute * @param link the link that will form the href * @param namesAndValues additional attributes to write */ protected void writeLink(MarkupWriter writer, String clientId, Link link, Object... namesAndValues) { Element e = writer.element(a, href, buildHref(link), id, clientId); writer.attributes(namesAndValues); _resources.renderInformalParameters(writer); _componentInvocationMap.store(e, link); } /** * Used for testing. */ void inject(String anchor, ComponentInvocationMap map, ComponentResources resources) { _anchor = anchor; _componentInvocationMap = map; _resources = resources; } } This approach simplified PageLink andActionLink and totally hid the ugly ComponentInvocationMap (that is, we didn't have to re-inject it into subclasses, or provide a protected getter method). I kind of think that if you can't find a true purpose for the base class beyond a convienient place for the common injections, then perhaps you are on the wrong track. I kind of like the list of injections in my components ... it's kind of like a cast of characters in a play. Another option is to create a facade service that wraps around the many services your application needs, so that just a single facade, rather than many individual services, can be injected. Again, this is an alternative to a base class. On Dec 6, 2007 12:47 AM, Francois Armand [EMAIL PROTECTED] wrote: Hello ! My project is a little more advanced, so I spent some time refactoring the code. Along this refactoring, I saw that I have a lot if component and class that inherit a base page (yes, that's why I have a base page ;). I inject on this page some quite common services (for example, an authorization service). So, what is the best pattern, in regard of Tapestry 5, for a page or component that extends my page base : inject (again) the services, or get it from the parent (what suppose that these services have matching getter in the base page). I believe injection is cheap, but a base page is here to provide common services, so I'm prone to choose the inherit pattern. What do you think about it ? -- Francois Armand Etudes Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Anyone using PageTester?
Howard, I'm using PageTester as well so be warned and don't break things. I think this habit of yours of breaking things you think should be done differently is bad indeed. It is this habit that had endured sufferings and almost an impossible task for anyone trying to migrate from any pre T5 to T5. I heard there is a secret work on T6 that would be almost incompatible with all previous versions. Why do you always have to re-invent the wheel? I hope you would one day learn from the decent open source projects out there like Spring and Hibernate. These guys are geniuses! They take on the challenging task of remaining backward compatible while providing great new features instead of always choosing the easier and trivial path of starting afresh, like you've demonstrated so far with any major release of Tapestry. Regards, E On Dec 5, 2007 11:03 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote: That's all good to hear, and I found a reasonable way to keep it in place without disrupting things. On Dec 5, 2007 1:57 PM, Mark Horn [EMAIL PROTECTED] wrote: My team uses PageTester to unit test all our Page classes. We have found it very useful. PageTester, Kent Tong's unit/integration testing layer for T5, is increasingly becoming difficult to maintain properly ... how many people are currently relying on it? -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Re-inject or inherit services in children ?
Howard Lewis Ship wrote: [..] I kind of think that if you can't find a true purpose for the base class beyond a convienient place for the common injections, then perhaps you are on the wrong track. Well, now that you explain me that, I think it's my problem. I almost only use the base page/component as a container for common services/logic. But as you said, it should be better suited to create new services than a base page for that, and only use them where they are needed. I kind of like the list of injections in my components ... it's kind of like a cast of characters in a play. And I completely agree with that. In each component, I use a really visible comment to hilight the injected services : just with that, I can (almost) know what the component is going to do, or at least what may be its side effects. So, it's a really good reason to inject services every time they are really need. Ok, so I should build more unit services, make some facade for logically linked services... Well, just really use the power of Tapestry services ;) Thank you really much for the advices, and I believe I'm going to remove this needless base page :) -- Francois Armand Etudes Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tapestry EventListener doesn't seem to submit form
Hi, I'm using Tapestry 4.1.3 (integrated in Appfuse 2.0.1) and the @EventListener functionality. The eventlistener method is called correctly, but I can't get any user-entered values from the form. As I understood from the documentation, the form should submit itself by default and send the values to the server, but it doesn't work for me. I tried to use @Persist annotation for the getter of the requested value, but it didn't help. input jwcid=@TextField value=ognl:recName id=recName class=text large type=text / @Persist public abstract String getRecName(); @EventListener(events=onchange, elements=recName) public void onRefresh(IRequestCycle cycle) { log.debug(getRecName()); // this returns null (or initial value) } I presume that the getRecName() function in the EventListener is supposed to return the value entered by user - is it right? Am I doing something wrong? Thanks (posted on Appfuse forum as well) -- View this message in context: http://www.nabble.com/Tapestry-EventListener-doesn%27t-seem-to-submit-form-tf4957057.html#a14195678 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T3: Type Block
Hello, I am trying to make a portal page with DIVs and ajax to fill the html in them. The problem that I am running into is that currently it just puts out the portlets using the type Block then tapestry renders the blocks when the page loads and I cant figure out how to do this without reloading a page. Basically I want to call a URL(service) and have it return the html of a rendered block then just fill the DIV with it. Is this possible? --James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T3: Type Block
Actually, is there just a way to have a service render a page and then I could just return the html? --James - Original Message - From: James Sherwood [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Thursday, December 06, 2007 12:51 PM Subject: [Spam Rating:3.20] T3: Type Block Hello, I am trying to make a portal page with DIVs and ajax to fill the html in them. The problem that I am running into is that currently it just puts out the portlets using the type Block then tapestry renders the blocks when the page loads and I cant figure out how to do this without reloading a page. Basically I want to call a URL(service) and have it return the html of a rendered block then just fill the DIV with it. Is this possible? --James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ NOD32 2706 (20071206) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
t5: violates loader constraints-error when loading pages into ioc-injected class-instance
I created a class PageRegistry and defined it in Spring. I use @Inject to inject the singleton-instance of this class. (This worked before with other classes). in the constructor of PageRegistry I fill a map with page-instances. (So that i can access some methods of a page when I dont have access to a specific instance, ad having static-methods doesn't cut it. ) At that point I get a violates loader constraints-error on component QuickFormAllResults. (A component which is contained by a couple of those pages). What's happing here? Is instantiating page-instances in a ioc-injected class-instance impossible or something? Thanks, Geert-Jan complete stacktrace: java.lang.LinkageError: Class cut/components/QuickFormAllResults violates loader constraints at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.lang.ClassLoader.defineClass(ClassLoader.java:465) at javassist.Loader.findClass(Loader.java:379) at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:85) at javassist.Loader.loadClass(Loader.java:311) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:254) at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findInstantiator(ComponentInstantiatorSourceImpl.java:240) at $ComponentInstantiatorSource_116b0b3a7be.findInstantiator($ComponentInstantiatorSource_116b0b3a7be.java) at org.apache.tapestry.internal.services.PageElementFactoryImpl.newComponentElement(PageElementFactoryImpl.java:268) at $PageElementFactory_116b0b3a7e8.newComponentElement($PageElementFactory_116b0b3a7e8.java) at org.apache.tapestry.internal.services.PageLoaderProcessor.startComponent(PageLoaderProcessor.java:618) at org.apache.tapestry.internal.services.PageLoaderProcessor.loadTemplateForComponent(PageLoaderProcessor.java:498) at org.apache.tapestry.internal.services.PageLoaderProcessor.workComponentQueue(PageLoaderProcessor.java:714) at org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:392) at org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59) at $PageLoader_116b0b3a7e6.loadPage($PageLoader_116b0b3a7e6.java) at org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:70) at $PagePool_116b0b3a7e5.checkout($PagePool_116b0b3a7e5.java) at org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:44) at $RequestPageCache_116b0b3a7e4.get($RequestPageCache_116b0b3a7e4.java) at $RequestPageCache_116b0b3a7bb.get($RequestPageCache_116b0b3a7bb.java) at org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55) at $PageRenderRequestHandler_116b0b3a7dd.handle($PageRenderRequestHandler_116b0b3a7dd.java) at org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:72) at $Dispatcher_116b0b3a7e0.dispatch($Dispatcher_116b0b3a7e0.java) at $Dispatcher_116b0b3a7d3.dispatch($Dispatcher_116b0b3a7d3.java) at org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:1108) at com.wrappt.aroer.services.AppModule$3.service(AppModule.java:194) at $RequestFilter_116b0b3a7d1.service($RequestFilter_116b0b3a7d1.java) at $RequestHandler_116b0b3a7d4.service($RequestHandler_116b0b3a7d4.java) at com.wrappt.aroer.services.AppModule$4.service(AppModule.java:215) at $RequestFilter_116b0b3a7d2.service($RequestFilter_116b0b3a7d2.java) at $RequestHandler_116b0b3a7d4.service($RequestHandler_116b0b3a7d4.java) at org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43) at $RequestHandler_116b0b3a7d4.service($RequestHandler_116b0b3a7d4.java) at org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:688) at $RequestHandler_116b0b3a7d4.service($RequestHandler_116b0b3a7d4.java) at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:84) at $RequestHandler_116b0b3a7d4.service($RequestHandler_116b0b3a7d4.java) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:97) at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:88) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:110)
Re: Tapestry EventListener doesn't seem to submit form
Using elements=elementId only targets and listens to dom nodes. You only get the majority of automated functionality (like submitting forms) when you target a component via targets = componentId Change your example to be: input jwcid=[EMAIL PROTECTED] value=ognl:recName id=recName class=text large type=text / @EventListener(events=onchange, targets = recordName) public void onRefresh(IRequestCycle cycle) { log.debug(getRecName()); // this returns null (or initial value) } and it should work.. p.s. Internet explorer doesn't do a very good job of reporting changes to textfields via the onchange event, please see the related quircksmode links and warnings on the bottom of the documentation page for @EventListener for more on this.. On Dec 6, 2007 11:29 AM, caarney [EMAIL PROTECTED] wrote: Hi, I'm using Tapestry 4.1.3 (integrated in Appfuse 2.0.1) and the @EventListener functionality. The eventlistener method is called correctly, but I can't get any user-entered values from the form. As I understood from the documentation, the form should submit itself by default and send the values to the server, but it doesn't work for me. I tried to use @Persist annotation for the getter of the requested value, but it didn't help. input jwcid=@TextField value=ognl:recName id=recName class=text large type=text / @Persist public abstract String getRecName(); @EventListener(events=onchange, elements=recName) public void onRefresh(IRequestCycle cycle) { log.debug(getRecName()); // this returns null (or initial value) } I presume that the getRecName() function in the EventListener is supposed to return the value entered by user - is it right? Am I doing something wrong? Thanks (posted on Appfuse forum as well) -- View this message in context: http://www.nabble.com/Tapestry-EventListener-doesn%27t-seem-to-submit-form-tf4957057.html#a14195678 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry / OGNL / Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tapestry 6
-- Forwarded message -- From: Emmanuel Sowah [EMAIL PROTECTED] Date: Dec 6, 2007 4:53 PM Subject: Re: T5: Anyone using PageTester? To: Tapestry users users@tapestry.apache.org Howard, I'm using PageTester as well so be warned and don't break things. I think this habit of yours of breaking things you think should be done differently is bad indeed. It is this habit that had endured sufferings and almost an impossible task for anyone trying to migrate from any pre T5 to T5. I heard there is a secret work on T6 that would be almost incompatible with all previous versions. Why do you always have to re-invent the wheel? I hope you would one day learn from the decent open source projects out there like Spring and Hibernate. These guys are geniuses! They take on the challenging task of remaining backward compatible while providing great new features instead of always choosing the easier and trivial path of starting afresh, like you've demonstrated so far with any major release of Tapestry. Regards, E On Dec 5, 2007 11:03 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote: That's all good to hear, and I found a reasonable way to keep it in place without disrupting things. On Dec 5, 2007 1:57 PM, Mark Horn [EMAIL PROTECTED] wrote: My team uses PageTester to unit test all our Page classes. We have found it very useful. PageTester, Kent Tong's unit/integration testing layer for T5, is increasingly becoming difficult to maintain properly ... how many people are currently relying on it? -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry 6
On 12/6/07, Emmanuel Sowah [EMAIL PROTECTED] wrote: I think this habit of yours of breaking things you think should be done differently is bad indeed. It is this habit that had endured sufferings and almost an impossible task for anyone trying to migrate from any pre T5 to T5. Tapestry 5 doesn't have a final, stable release, so everybody working with it cannot take for granted that everything will always be the same. ;) I heard there is a secret work on T6 that would be almost incompatible with all previous versions. Please post the source of the statement above. In http://jroller.com/WarnerOnstine/entry/why_hasn_t_tapestry_been, Howard wrote: *(...) the design of Tapestry 5 was created specifically to make it possible to continue adding features without breaking backwards compatibility going forward. There will not need to be a Tapestry 6. * Unless Howard has changed his mind, I don't have any reason to believe that Howard is already planning a Tapestry 6 without full backward compatibility with T5. Thiago
Re: Tapestry 6
-1 troll fud... too bad you can't vote down email list comments. On Dec 6, 2007 12:35 PM, Emmanuel Sowah [EMAIL PROTECTED] wrote: -- Forwarded message -- From: Emmanuel Sowah [EMAIL PROTECTED] Date: Dec 6, 2007 4:53 PM Subject: Re: T5: Anyone using PageTester? To: Tapestry users users@tapestry.apache.org Howard, I'm using PageTester as well so be warned and don't break things. I think this habit of yours of breaking things you think should be done differently is bad indeed. It is this habit that had endured sufferings and almost an impossible task for anyone trying to migrate from any pre T5 to T5. I heard there is a secret work on T6 that would be almost incompatible with all previous versions. Why do you always have to re-invent the wheel? I hope you would one day learn from the decent open source projects out there like Spring and Hibernate. These guys are geniuses! They take on the challenging task of remaining backward compatible while providing great new features instead of always choosing the easier and trivial path of starting afresh, like you've demonstrated so far with any major release of Tapestry. Regards, E On Dec 5, 2007 11:03 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote: That's all good to hear, and I found a reasonable way to keep it in place without disrupting things. On Dec 5, 2007 1:57 PM, Mark Horn [EMAIL PROTECTED] wrote: My team uses PageTester to unit test all our Page classes. We have found it very useful. PageTester, Kent Tong's unit/integration testing layer for T5, is increasingly becoming difficult to maintain properly ... how many people are currently relying on it? -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T 4.1 Strange Asset Context problem
Anyone have any idea on this. It is utterly annoying to have to hard code the Context in the page spec. On Dec 5, 2007 10:13 AM, Chris Chiappone [EMAIL PROTECTED] wrote: I have an assets defined in my page spec as follows: asset name=deleteDisImg path=/images/delete_dis.gif/ asset name=msi path=/installer/agent_setup.msi/ The images seem to be using the correct context (/esp) as the source output is: span img src=/esp/images/delete.gif border=0 / /span The msi though comes out like this: button type=button onclick=window.location='/installer/agent_setup.msi' id=dlButton Download /button which does not include the context of /esp Does anyone know why this may be? Thanks, -- ~chris -- ~chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T 4.1 Strange Asset Context problem
Can't quite think of anything right now... but tacos-snapshot of 4.1 has an absoluteAsset binding prefix which makes sure the url that the asset produces will be an absolute one (assuming that you're looking for a quick workaround) On Dec 6, 2007 11:57 PM, Chris Chiappone [EMAIL PROTECTED] wrote: Anyone have any idea on this. It is utterly annoying to have to hard code the Context in the page spec. On Dec 5, 2007 10:13 AM, Chris Chiappone [EMAIL PROTECTED] wrote: I have an assets defined in my page spec as follows: asset name=deleteDisImg path=/images/delete_dis.gif/ asset name=msi path=/installer/agent_setup.msi/ The images seem to be using the correct context (/esp) as the source output is: span img src=/esp/images/delete.gif border=0 / /span The msi though comes out like this: button type=button onclick=window.location='/installer/agent_setup.msi' id=dlButton Download /button which does not include the context of /esp Does anyone know why this may be? Thanks, -- ~chris -- ~chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T3: PropertySelection
Hello, I'm having issue with PropertySelection in a Form. I'm using one page to add and update. Data entry fields of the form gets changed according to the property selection during add. For example if infType=DOG selected then the form displays only dog specific fields and if infType=PAK then the form displays only parking specific fields. All these works fine. The problem is when I try to update the record. The form fields are not displayed accordingly to the infType. If I reselect the item from the PropertySelection then it shows the fields properly. I couldn't figure out how to execute the submitOnChange automatically in pageBeginRender. If any one help me on this would be very helpful. public void pageBeginRender(PageEvent event) { this.userLoggedIn = AuthorisationUtil.getNormalisedRemoteUserName(event); if (!getNewInfringement() !event.getRequestCycle().isRewinding()) { //execute the submitOnChange automatically } .html --- form jwcid=@Form delegate=ognl:beans.delegate stateful=ognl:true listener=ognl:listeners.formSubmit tbody tr td width=1% nowrap Infringement Type: /td td width=99% select jwcid=infType option value=0DOG/option option value=1PRK/option /select * /td /tr /tbody .page --- property-specification name=infType type=java.lang.String / component id=infType type=PropertySelection binding name=model expression=availInfType/binding binding name=value expression=InfType/binding binding name=submitOnChange expression=true/binding /component .java --- public abstract String getInfType(); public abstract void setInfType(String infType); public IPropertySelectionModel getAvailInfType() { String[] infTypeArray = EfiInfTypeDAO.getActiveEfiInfTypeCodeList() .toArray(new String[0]); return new StringPropertySelectionModel(infTypeArray); } -- View this message in context: http://www.nabble.com/T3%3A-PropertySelection-tf4959054.html#a14202683 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Get me started with Tapestry-Test
Hi, Looking at test facilities in T5, I think Tapestry-Test is different from PageTester, right? could anybody give me a simple non Spring specific sample of using Tapestry-Test? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3A-Get-me-started-with-Tapestry-Test-tf4958971.html#a14202398 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] Message Page Redirect
Hi All, I'd like to build a component/page that handles a page redirection. An example situation is when a user may try and access page X but due to permissions levels may not be allowed access (or some other reason) so they are presented an intermediate page with some message like You do not have permission to access this page and then are redirected to another page (i.e. the previous page). In my current implementation I pass on a simple string for the logical name of the page to be redirected to but this doesn't work too well when I have pages that require context elements and I don't know all the information to pass on as a string. So what kind of object should I be working with instead? and does it have a toString() method in order to convert it to a logical name that can be embedded into the html meta tag (i.e. meta http-equiv=refresh content=3;/MyApp/Page1/context). Thanks for any help! Jean-Philippe
T4.1.3 fails with javassist errors after running awhile
After running fine for a while (I can access it for a hour), my application stops functioning and starts failing with the exception below. It appears that javaassist is not able to find my abstract page classes that it has compiled. My versions: ognl-2.7.1.jar javassist-3.4.ga.jar tapestry-annotations-4.1.3.jar tapestry-contrib-4.1.3.jar tapestry-framework-4.1.3.jar I read all the posts related to this topic, but I thought it was a 4.1.2 problem, but I am running the 4.1.3 version. I am using the same ognl/javassist versions as the tapestry 4.1.3 pom. Thank you for any pointers. Phillip 08:35:52,619 ERROR HiveMindExpressionCompiler:179 - Error generating OGNL getter for expression page.visitObject.userDetails.username with root [EMAIL PROTECTED] and body: { return ((com.rhoderunner.hra.tapestry.pages.HomePage)(($BaseHraPage_0)$2).getPage()).getVisitObject().getUserDetails().getUsername();} org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTChain_116afa585e7: [source error] no such class: $BaseHraPage_0 at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278) at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:176) at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:523) at ognl.Ognl.compileExpression(Ognl.java:141) at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:152) at org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:115) at $ExpressionCache_116afa58429.getCompiledExpression($ExpressionCache_116afa58429.java) at org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:134) at org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:125) at org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:84) at $Reports_23.getUsername($Reports_23.java) at com.rhoderunner.hra.tapestry.components.Reports.getReportContext(Reports.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) .. Caused by: javassist.CannotCompileException: [source error] no such class: $BaseHraPage_0 at javassist.CtBehavior.setBody(CtBehavior.java:347) at javassist.CtBehavior.setBody(CtBehavior.java:316) at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:272) ... 146 more Caused by: compile error: no such class: $BaseHraPage_0 at javassist.compiler.MemberResolver.searchImports(MemberResolver.java:416) at javassist.compiler.MemberResolver.lookupClass(MemberResolver.java:392) at javassist.compiler.MemberResolver.lookupClassByName(MemberResolver.java:306) at javassist.compiler.MemberResolver.resolveClassName(MemberResolver.java:450) at javassist.compiler.TypeChecker.resolveClassName(TypeChecker.java:131) at javassist.compiler.TypeChecker.atCastExpr(TypeChecker.java:545) at javassist.compiler.JvstTypeChecker.atCastExpr(JvstTypeChecker.java:103) at javassist.compiler.ast.CastExpr.accept(CastExpr.java:54) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:653) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.TypeChecker.atCastExpr(TypeChecker.java:546) at javassist.compiler.JvstTypeChecker.atCastExpr(JvstTypeChecker.java:103) at javassist.compiler.ast.CastExpr.accept(CastExpr.java:54) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:653) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:653) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:653) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:235) at javassist.compiler.CodeGen.compileExpr(CodeGen.java:222) at javassist.compiler.CodeGen.atReturnStmnt2(CodeGen.java:591) at javassist.compiler.JvstCodeGen.atReturnStmnt(JvstCodeGen.java:424) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:356) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344) at
Re: [T5] Message Page Redirect
This sounds pretty close to a question that came up earlier this week. page navigation (return to arbitrary page) Here is how I do it: http://thread.gmane.org/gmane.comp.java.tapestry.user/56014/focus=56022 Josh On Dec 6, 2007 4:27 PM, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi All, I'd like to build a component/page that handles a page redirection. An example situation is when a user may try and access page X but due to permissions levels may not be allowed access (or some other reason) so they are presented an intermediate page with some message like You do not have permission to access this page and then are redirected to another page (i.e. the previous page). In my current implementation I pass on a simple string for the logical name of the page to be redirected to but this doesn't work too well when I have pages that require context elements and I don't know all the information to pass on as a string. So what kind of object should I be working with instead? and does it have a toString() method in order to convert it to a logical name that can be embedded into the html meta tag (i.e. meta http-equiv=refresh content=3;/MyApp/Page1/context). Thanks for any help! Jean-Philippe -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: Tapestry 6
I'm curious, Emmanuel...how much have you contributed to Tapestry? On Thu, 2007-12-06 at 21:35 +0100, Emmanuel Sowah wrote: -- Forwarded message -- From: Emmanuel Sowah [EMAIL PROTECTED] Date: Dec 6, 2007 4:53 PM Subject: Re: T5: Anyone using PageTester? To: Tapestry users users@tapestry.apache.org Howard, I'm using PageTester as well so be warned and don't break things. I think this habit of yours of breaking things you think should be done differently is bad indeed. It is this habit that had endured sufferings and almost an impossible task for anyone trying to migrate from any pre T5 to T5. I heard there is a secret work on T6 that would be almost incompatible with all previous versions. Why do you always have to re-invent the wheel? I hope you would one day learn from the decent open source projects out there like Spring and Hibernate. These guys are geniuses! They take on the challenging task of remaining backward compatible while providing great new features instead of always choosing the easier and trivial path of starting afresh, like you've demonstrated so far with any major release of Tapestry. Regards, E On Dec 5, 2007 11:03 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote: That's all good to hear, and I found a reasonable way to keep it in place without disrupting things. On Dec 5, 2007 1:57 PM, Mark Horn [EMAIL PROTECTED] wrote: My team uses PageTester to unit test all our Page classes. We have found it very useful. PageTester, Kent Tong's unit/integration testing layer for T5, is increasingly becoming difficult to maintain properly ... how many people are currently relying on it? -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5: violates loader constraints-error when loading pages into ioc-injected class-instance
If you need a page instance, you need to go through the appropriate Tapestry services ... unfortunately, some of them are internal. Nonetheless, Tapestry enforces a specific lifecycle on Tapestry pages and components and if you attempt to instantiate them directly you will fail. If you have common logic, put it in services, not on pages if at all possible. That's what the IoC container if for. Pages should be thin layers between the world of HTML and HTTP and the world of services (whether T5 IoC, Spring or other). On Dec 6, 2007 10:35 AM, Britske [EMAIL PROTECTED] wrote: I created a class PageRegistry and defined it in Spring. I use @Inject to inject the singleton-instance of this class. (This worked before with other classes). in the constructor of PageRegistry I fill a map with page-instances. (So that i can access some methods of a page when I dont have access to a specific instance, ad having static-methods doesn't cut it. ) At that point I get a violates loader constraints-error on component QuickFormAllResults. (A component which is contained by a couple of those pages). What's happing here? Is instantiating page-instances in a ioc-injected class-instance impossible or something? Thanks, Geert-Jan complete stacktrace: java.lang.LinkageError: Class cut/components/QuickFormAllResults violates loader constraints at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.lang.ClassLoader.defineClass(ClassLoader.java:465) at javassist.Loader.findClass(Loader.java:379) at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:85) at javassist.Loader.loadClass(Loader.java:311) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:254) at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findInstantiator(ComponentInstantiatorSourceImpl.java:240) at $ComponentInstantiatorSource_116b0b3a7be.findInstantiator($ComponentInstantiatorSource_116b0b3a7be.java) at org.apache.tapestry.internal.services.PageElementFactoryImpl.newComponentElement(PageElementFactoryImpl.java:268) at $PageElementFactory_116b0b3a7e8.newComponentElement($PageElementFactory_116b0b3a7e8.java) at org.apache.tapestry.internal.services.PageLoaderProcessor.startComponent(PageLoaderProcessor.java:618) at org.apache.tapestry.internal.services.PageLoaderProcessor.loadTemplateForComponent(PageLoaderProcessor.java:498) at org.apache.tapestry.internal.services.PageLoaderProcessor.workComponentQueue(PageLoaderProcessor.java:714) at org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:392) at org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:59) at $PageLoader_116b0b3a7e6.loadPage($PageLoader_116b0b3a7e6.java) at org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:70) at $PagePool_116b0b3a7e5.checkout($PagePool_116b0b3a7e5.java) at org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:44) at $RequestPageCache_116b0b3a7e4.get($RequestPageCache_116b0b3a7e4.java) at $RequestPageCache_116b0b3a7bb.get($RequestPageCache_116b0b3a7bb.java) at org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55) at $PageRenderRequestHandler_116b0b3a7dd.handle($PageRenderRequestHandler_116b0b3a7dd.java) at org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:72) at $Dispatcher_116b0b3a7e0.dispatch($Dispatcher_116b0b3a7e0.java) at $Dispatcher_116b0b3a7d3.dispatch($Dispatcher_116b0b3a7d3.java) at org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:1108) at com.wrappt.aroer.services.AppModule$3.service(AppModule.java:194) at $RequestFilter_116b0b3a7d1.service($RequestFilter_116b0b3a7d1.java) at $RequestHandler_116b0b3a7d4.service($RequestHandler_116b0b3a7d4.java) at com.wrappt.aroer.services.AppModule$4.service(AppModule.java:215) at $RequestFilter_116b0b3a7d2.service($RequestFilter_116b0b3a7d2.java) at $RequestHandler_116b0b3a7d4.service($RequestHandler_116b0b3a7d4.java) at org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43) at $RequestHandler_116b0b3a7d4.service($RequestHandler_116b0b3a7d4.java) at org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:688) at
Re: T4: replacing script asset in AbstractSubmit
Hi, so, SubmitBindings.script actually calls tapestry.form.submit and/or tapestry.form.refresh, tapestry.form.cancel so, why not just connect around those and do whetever you want? You can completely bypass them, or just have your code run before or after those... BTW, I remember someone doing something similar some time ago using http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/ajaxstatus.html and overlaying on top of everything... i would be interested in finding out more about your implementation, esp. some code :) On Dec 3, 2007 11:30 PM, Steve Shucker [EMAIL PROTECTED] wrote: Is it possible to globally replace the SubmitBindings.script file used by all the AbstractSubmit subclasses to wire up ajax events with my own version? I've got a script that imposes an overlay on top of the components being updated and prevents double-clicks. Right now, I can wire it up to each individual button with a @Script, but it would be cleaner if I could just replace the asset where the submit script is wired. That way it would be automatically applied to all ajax submits. I'd like to do this without hacking up my tapestry jar. It might be nice to disable or unwire non-ajax submit buttons when they're clicked as well, but I haven't tried implementing that yet. -Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry 6
在 Fri, 07 Dec 2007 05:49:05 +0800,Thiago HP [EMAIL PROTECTED] 写道: On 12/6/07, Emmanuel Sowah [EMAIL PROTECTED] wrote: I think this habit of yours of breaking things you think should be done differently is bad indeed. It is this habit that had endured sufferings and almost an impossible task for anyone trying to migrate from any pre T5 to T5. Tapestry 5 doesn't have a final, stable release, so everybody working with it cannot take for granted that everything will always be the same. ;) I heard there is a secret work on T6 that would be almost incompatible with all previous versions. he is rumormongering Please post the source of the statement above. In http://jroller.com/WarnerOnstine/entry/why_hasn_t_tapestry_been, Howard wrote: *(...) the design of Tapestry 5 was created specifically to make it possible to continue adding features without breaking backwards compatibility going forward. There will not need to be a Tapestry 6. * Unless Howard has changed his mind, I don't have any reason to believe that Howard is already planning a Tapestry 6 without full backward compatibility with T5. Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5 How to write a layout component ?
Hi First time try T5 i followed the link http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head titleMy Tapestry Application/title /head body t:body/ /body /html copy the codes into respective src/java/com/my/components/Layout.tml src/java/com/my/components/Layout.java (empty class) and have my start page as the guide stated t:layout xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; My Page Specific Content /t:layout then run, getting into An unexpected application exception has occurred. java.lang.IllegalStateException This markup writer does not have a current element. The current element is established with the first call to element() and is maintained across subsequent calls. my environment: 1. netbeans 6 2. maven plugin for nb 6 3. t5 5.0.6 4. tomcat 6 here is my pom ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.my/groupId artifactIdtest2/artifactId packagingwar/packaging version1.0-SNAPSHOT/version nametest2 Maven Webapp/name urlhttp://maven.apache.org/url dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-core/artifactId version5.0.6/version scopecompile/scope /dependency /dependencies build finalNametest2/finalName plugins plugin artifactIdmaven-compiler-plugin/artifactId versionRELEASE/version configuration source1.6/source target1.6/target /configuration /plugin /plugins /build properties netbeans.hint.deploy.serverTomcat60/netbeans.hint.deploy.server /properties /project - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] Help converting InjectComponent annotation to page specification
Hi, i'm not exactly sure how you're going to use that client id, but if you really want to get rid of annotations, why not just try: public String getRowClientId() { return getComponent(customersLoop).getClientId(); } On Dec 4, 2007 2:20 AM, cpnguyen [EMAIL PROTECTED] wrote: Hi all, I'm a newbie at Tapestry and I'm reading Kent's book trying to get Tapestry to work with AJAX. In one of his examples, he has a customerCRUD.java class with the following annotation: @InjectComponent(customersLoop) public abstract ForBean getRow(); public String getRowClientId() { return getRow().getClientId(); } This method will return the HTML id for the current tr element generated from a For loop component. I am having issues getting this to work with my current project and I want to move annotation specification to page file specification. What is the equivalent page specification syntax for the above? From Tapestry's annotation reference: The InjectComponent annotation allows nested components to be injected as read-only properties. It is attached to an accessor method: @InjectComponent(inputUserName) public abstract TextField getUserInput(); This is functionally the same as providing the property attribute of the component element. So I tried the following: component id=customersLoop type=For property=row binding name=source value=customerEntries/ binding name=value value=customerEntry/ binding name=index value=idx/ /component property name=rowClientId initial-value=row.clientId/ THEN bean name=rowClientId class=java.util.String property=row.clientId/ and other variations without any luck. What am I doing wrong? TIA! -- View this message in context: http://www.nabble.com/-T4--Help-converting-InjectComponent-annotation-to-page-specification-tf4940334.html#a14142129 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]