Re: Please don't tell me this is impossible in T5
Hm... if it's an isolated case, it's simple enough to work around. You could: .java: public Subclass1 getSuperAsSub() { return (Subclass1) mySuperclass; } .tml: Or you could: .java: public Object getProp() { return ((Subclass1)mySuperclass).getProp(); } public void setProp(Object val) { ((Subclass1)mySuperclass).setProp(val); } .tml Or you could always revert to using ognl for those properties; you lose the performance benefits of prop, but also the "compile-time" restrictions are loosened (chenillekit provides an ognl binding). Or you could write a custom binding. :) Robert On Jul 24, 2009, at 7/241:11 AM , Vjeran Marcinko wrote: Hello, I almost converted my old T4 web app to T5, but stumbled upon one major problem and I cannot find any help in mail list archive... I'm using one page to edit whole class hierarchy (ie., multiple subclasses of one superclass), and instantiation of specific subclass happens in "onPrepare" method as typical based on some page activation context value. My field inside my page is defined as superclass becase this page handles whole hierarchy: public MyEditPage { @Property private MySuperclass mySuperclass; private void onPrepare() { mySuperclass = (some condition) ? new Subclass1() : new Subclass2(); } In template I have one textfield which is bound to property that is contained only inside Subclass1, but since Tapestry introspects page at the beggining searching for some invalid properties, and it cannot find this property inside superclass, it raises exception saying it cannot find this property!!! :-( I really hope that this thing is not impossible to do in T5.. -Vjeran - 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: search hints for Tapestry 5
I use this http://www.google.com/coop/cse?cx=016399560855919712413%3Awdbpuwqto88 - it is a google coop search engine that searches the things listed in this thread (and a few more) It uses mark mail rather than nabble (as it is easier to limit google to right mailing lists on markmail. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Fri, Jul 24, 2009 at 7:24 AM, Newham, Cameron wrote: > One of the downsides of open source: the documentation is rubbish or > non-existent because geek programmers expect you to understand their > products source! :) > > (ok, I'm generalising, but there is an element of truth :-) > > > BTW, thanks Sergey for raising the issue of how to find information. > Perhaps one day there will be a book on T5 (hint hint) or maybe Mr > Kolesnikov will update his? > > > -Original Message- > From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] > Sent: 24 July 2009 05:34 > To: Tapestry users > Subject: Re: search hints for Tapestry 5 > > ... > > One of the beauties of open source: the possibility to learn a package > by > reading and debugging its sources. :) > > -- > 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 > > ** > > Experience the British Library online at www.bl.uk > > The British Library's new interactive Annual Report and Accounts 2007/08 : > www.bl.uk/knowledge > > Help the British Library conserve the world's knowledge. Adopt a Book. > www.bl.uk/adoptabook > > The Library's St Pancras site is WiFi - enabled > > * > > The information contained in this e-mail is confidential and may be legally > privileged. It is intended for the addressee(s) only. If you are not the > intended recipient, please delete this e-mail and notify the > postmas...@bl.uk : The contents of this e-mail must not be disclosed or > copied without the sender's consent. > > The statements and opinions expressed in this message are those of the > author and do not necessarily reflect those of the British Library. The > British Library does not take any responsibility for the views of the > author. > > * > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Announcment: T5 FCK editor integration library
Hello everyone we have used FCK editor for quite some time now with file uploading capabilities, and we needed the same functionality in several clients that would have had to be kept separate due to licensing issues. Thus we agreed to make it publicly available and so we have to keep only one copy up to date. Currently the project lives in http://code.google.com/p/easyfckeditor/, but I hope that we get Tapestry 360 site soon. Also, are there any maven repositories that would accept packages without much fuss? The using would be _much_ easier if the library was in a maven repository. Anyway, here is short description of the project (I hope that you enjoy, and remember to give feedback.): Easy Fck Editor is open source extension to Tapestry 5 that uses (as the name implies) FCK Editor under it's hood to deliver easy richtext editor component with file upload capabilities. The main focus is to do everything Tapestry 5 way: you can work entirely with the provided (and excellent I might add) IoC as developers are used to. Also the idea is to really provide such documentation that it is easy to follow and understand. Easy Fck Editor aims to be simple to use and yet provide good interface to aid in extending and securing Tapestry 5 based rich editor needs. Why? Doesn't ChenilleKit already have one? Easy Fck Editor project started because the editor in ChenilleKit couldn't handle file uploads. Also I found that (at that time atleast) the documentation was not on very good level. I also didn't need but a fraction of what ChennilleKit provided. For me, I would be more merrier if there was tiny bits that I can put together in the project pom, so that I could "harvest" the libraries I need. This is also why I intent to package all forthcoming Tapestry 5 extensions as separate jars where possible. (CKEditor should follow shortly.) - Ville -- View this message in context: http://www.nabble.com/Announcment%3A-T5-FCK-editor-integration-library-tp24639378p24639378.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: search hints for Tapestry 5
One of the downsides of open source: the documentation is rubbish or non-existent because geek programmers expect you to understand their products source! :) (ok, I'm generalising, but there is an element of truth :-) BTW, thanks Sergey for raising the issue of how to find information. Perhaps one day there will be a book on T5 (hint hint) or maybe Mr Kolesnikov will update his? -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: 24 July 2009 05:34 To: Tapestry users Subject: Re: search hints for Tapestry 5 ... One of the beauties of open source: the possibility to learn a package by reading and debugging its sources. :) -- 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 ** Experience the British Library online at www.bl.uk The British Library's new interactive Annual Report and Accounts 2007/08 : www.bl.uk/knowledge Help the British Library conserve the world's knowledge. Adopt a Book. www.bl.uk/adoptabook The Library's St Pancras site is WiFi - enabled * The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the postmas...@bl.uk : The contents of this e-mail must not be disclosed or copied without the sender's consent. The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author. * - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Please don't tell me this is impossible in T5
Hello, I almost converted my old T4 web app to T5, but stumbled upon one major problem and I cannot find any help in mail list archive... I'm using one page to edit whole class hierarchy (ie., multiple subclasses of one superclass), and instantiation of specific subclass happens in "onPrepare" method as typical based on some page activation context value. My field inside my page is defined as superclass becase this page handles whole hierarchy: public MyEditPage { @Property private MySuperclass mySuperclass; private void onPrepare() { mySuperclass = (some condition) ? new Subclass1() : new Subclass2(); } In template I have one textfield which is bound to property that is contained only inside Subclass1, but since Tapestry introspects page at the beggining searching for some invalid properties, and it cannot find this property inside superclass, it raises exception saying it cannot find this property!!! :-( I really hope that this thing is not impossible to do in T5.. -Vjeran - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: @Secured annotation handling
Em Thu, 23 Jul 2009 17:53:59 -0300, Norman Franke escreveu: I've got it working, but note that many event actions are called on the page before it figures out that it needs to secure the page. I'd run into errors before the secure tag kicked in and redirected to my login page. Odd, but workable. Maybe because its current implementation only does the checks *after* onActivate() is invoked. -- 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
Re: search hints for Tapestry 5
Em Thu, 23 Jul 2009 17:20:26 -0300, Juan E. Maya escreveu: Well, it's a bit more manual. :) For example: If you want to create a new validator then there is no better way to do it that checking the way the core validators are done. That's what i meant. There is: figure out what class/interface does something and then use your IDE to find all usages. In Eclipse, Control-Shift-G. One of the beauties of open source: the possibility to learn a package by reading and debugging its sources. :) -- 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
SetupRender - why is it called from PageResponseRendererImpl.renderPageResponse?
I apologize for my ignorance, but I am kind of confused about how the render phases work. Simple example: class Base{ @SetupRender protected boolean setupRender(MarkupWriter writer) { //do something } } class Derived extends Base{ @BeginRender protected void beginRender() { //do something } } class AppModule{ public static PageResponseRenderer decoratePageResponseRenderer (){ return new PageResponseRenderer() { public void renderPageResponse(Page page) throws IOException { //do something ((PageResponseRenderer) delegate).renderPageResponse(page); } } } } Request comes in to Derived: Expected: Base(SetupRender)->Derived(BeginRender)->AppModule(renderPageResponse) Actual: Derived(BeginRender)->AppModule(renderPageResponse)->Base(SetupRender) How come setupRender is being called from renderPageResponse and not right at the beginning when the request comes in? According to the docs at http://tapestry.apache.org/tapestry5.1/guide/rendering.html, SetupRender should happen right upfront. Could someone please shed some light? I am still learning. Derived(Base).setupRender(MarkupWriter, Event) line: not available ComponentPageElementImpl$SetupRenderPhase.invokeComponent(Component, MarkupWriter, Event) line: 184 ComponentPageElementImpl$SetupRenderPhase(ComponentPageElementImpl$AbstractPhase).run(Component) line: 164 ComponentPageElementImpl.invoke(boolean, ComponentCallback) line: 933 ComponentPageElementImpl.access$400(ComponentPageElementImpl, boolean, ComponentCallback) line: 49 ComponentPageElementImpl$SetupRenderPhase(ComponentPageElementImpl$AbstractPhase).callback(boolean, MarkupWriter) line: 159 ComponentPageElementImpl$SetupRenderPhase.render(MarkupWriter, RenderQueue) line: 189 RenderQueueImpl.run(MarkupWriter) line: 74 PageRenderQueueImpl.render(MarkupWriter) line: 121 $PageRenderQueue_122a97bad5c.render(MarkupWriter) line: not available $PageRenderQueue_122a97bad5b.render(MarkupWriter) line: not available MarkupRendererTerminator.renderMarkup(MarkupWriter) line: 37 TapestryModule$27.renderMarkup(MarkupWriter, MarkupRenderer) line: 1752 $MarkupRenderer_122a97bad60.renderMarkup(MarkupWriter) line: not available TapestryModule$26.renderMarkup(MarkupWriter, MarkupRenderer) line: 1733 $MarkupRenderer_122a97bad60.renderMarkup(MarkupWriter) line: not available TapestryModule$25.renderMarkup(MarkupWriter, MarkupRenderer) line: 1715 $MarkupRenderer_122a97bad60.renderMarkup(MarkupWriter) line: not available TapestryModule$24.renderMarkup(MarkupWriter, MarkupRenderer) line: 1701 $MarkupRenderer_122a97bad60.renderMarkup(MarkupWriter) line: not available TapestryModule$23.renderMarkup(MarkupWriter, MarkupRenderer) line: 1682 $MarkupRenderer_122a97bad60.renderMarkup(MarkupWriter) line: not available TapestryModule$22.renderMarkup(MarkupWriter, MarkupRenderer) line: 1663 $MarkupRenderer_122a97bad60.renderMarkup(MarkupWriter) line: not available $MarkupRenderer_122a97bad5a.renderMarkup(MarkupWriter) line: not available PageMarkupRendererImpl.renderPageMarkup(Page, MarkupWriter) line: 64 $PageMarkupRenderer_122a97bad56.renderPageMarkup(Page, MarkupWriter) line: not available PageResponseRendererImpl.renderPageResponse(Page) line: 61 -- View this message in context: http://www.nabble.com/SetupRender---why-is-it-called-from-PageResponseRendererImpl.renderPageResponse--tp24636416p24636416.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: @Secured annotation handling
I've got it working, but note that many event actions are called on the page before it figures out that it needs to secure the page. I'd run into errors before the secure tag kicked in and redirected to my login page. Odd, but workable. Norman Franke Answering Service for Directors, Inc. www.myasd.com On Jul 23, 2009, at 4:02 PM, Michael Gerzabek wrote: Don't get the point here. You secured a page? And if you want to access it, you get the AccessDeniedEx? This seems to be a valid case. The [WARN] intercept.AbstractSecurityInterceptor Could not validate configuration attributes as the ObjectDefinitionSource did not return a ConfigAttributeDefinition collection is a warning. It doesn't prevent TSS from functioning properly. Please follow the advice from the link you included with your previous mail. Many people got TSS working from that description or post your page class and your Module class so that we can see what happens here. /M Eldred Mullany schrieb: Has anyone got come code snippets for me on integrating T5.1.0.5 and Spring-Tapestry 2.1.0 Thanks -Original Message- From: Eldred Mullany Sent: Wednesday, July 22, 2009 1:55 PM To: 'Tapestry users' Subject: @Secured annotation handling Hi All I am spinning my head here trying to get Spring-Tapestry-security: 2.1.0 to work with Tapestry 5.1.0.5 . I have done the upgrade to 2.1.0 and when place my @secured annotation on the top of my class name is throws an access denied exception: Following that intercept.AbstractSecurityInterceptor could not validate configuration attributes as the ObjectDefinitionSource did not return a ConfigAttributeDefinition collection. Where am I supposed to configure configuration attributes if any? >From what I have read on http://www.localhost.nu/java/tapestry-spring-security/conf.html. Is there referring to the Contributions to the FilterSecurityInterceptor. Thanking you in advance Eldred Here is my output screen: [WARN] intercept.AbstractSecurityInterceptor Could not validate configuration attributes as the ObjectDefinitionSource did not return a ConfigAttributeDefinition collection [ERROR] billpmts.Bills Render queue error in BeginRender[billpmts/Bills]: Access is denied org.apache.tapestry5.ioc.internal.util.TapestryException: Access is denied at org .apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke( ComponentPageElementImpl.java:948) at org .apache.tapestry5.internal.structure.ComponentPageElementImpl.access$ 400(ComponentPageElementImpl.java:49) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl $Abstrac tPhase.callback(ComponentPageElementImpl.java:159) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl $BeginRe nderPhase.render(ComponentPageElementImpl.java:211) at org .apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueIm pl.java:74) at org .apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRe nderQueueImpl.java:121) at $ PageRenderQueue_122a244d649.render($PageRenderQueue_122a244d649.java) at $ PageRenderQueue_122a244d62b.render($PageRenderQueue_122a244d62b.java) at org .apache.tapestry5.internal.services.MarkupRendererTerminator.renderMa rkup(MarkupRendererTerminator.java:37) at org.apache.tapestry5.services.TapestryModule $27.renderMarkup(TapestryMod ule.java:1748) at $ MarkupRenderer_122a244d64b .renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule $26.renderMarkup(TapestryMod ule.java:1732) at $ MarkupRenderer_122a244d64b .renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule $25.renderMarkup(TapestryMod ule.java:1714) at $ MarkupRenderer_122a244d64b .renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule $24.renderMarkup(TapestryMod ule.java:1700) at $ MarkupRenderer_122a244d64b .renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule $23.renderMarkup(TapestryMod ule.java:1681) at $ MarkupRenderer_122a244d64b .renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule $22.renderMarkup(TapestryMod ule.java:1662) at $ MarkupRenderer_122a244d64b .renderMarkup($MarkupRenderer_122a244d64b.jav a) at $ MarkupRenderer_122a244d648 .renderMarkup($MarkupRenderer_122a244d648.jav a) at org .apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPage Markup(PageMarkupRendererImpl.java:64) at $ PageMarkupRenderer_122a244d645 .renderPageMarkup($PageMarkupRenderer_122 a244d645.java) at org .apache.tapestry5.internal.services.PageResponseRendererImpl.renderPa geResponse(PageResponseRendererImpl.java:61) at $ PageRespo
Re: search hints for Tapestry 5
Well, it's a bit more manual. :) For example: If you want to create a new validator then there is no better way to do it that checking the way the core validators are done. That's what i meant. On Thu, Jul 23, 2009 at 10:14 PM, Sergey Didenko wrote: > What sources and how do you check them against your keywords, Juan? > > Do you mean string search over the latest Tapestry core sources? > > On Thu, Jul 23, 2009 at 10:48 PM, Juan E. Maya wrote: >> i will add jumpstart and checking the sources in the svn repository > > - > 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: search hints for Tapestry 5
What sources and how do you check them against your keywords, Juan? Do you mean string search over the latest Tapestry core sources? On Thu, Jul 23, 2009 at 10:48 PM, Juan E. Maya wrote: > i will add jumpstart and checking the sources in the svn repository - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: @Secured annotation handling
Don't get the point here. You secured a page? And if you want to access it, you get the AccessDeniedEx? This seems to be a valid case. The [WARN] intercept.AbstractSecurityInterceptor Could not validate configuration attributes as the ObjectDefinitionSource did not return a ConfigAttributeDefinition collection is a warning. It doesn't prevent TSS from functioning properly. Please follow the advice from the link you included with your previous mail. Many people got TSS working from that description or post your page class and your Module class so that we can see what happens here. /M Eldred Mullany schrieb: Has anyone got come code snippets for me on integrating T5.1.0.5 and Spring-Tapestry 2.1.0 Thanks -Original Message- From: Eldred Mullany Sent: Wednesday, July 22, 2009 1:55 PM To: 'Tapestry users' Subject: @Secured annotation handling Hi All I am spinning my head here trying to get Spring-Tapestry-security:2.1.0 to work with Tapestry 5.1.0.5 . I have done the upgrade to 2.1.0 and when place my @secured annotation on the top of my class name is throws an access denied exception: Following that intercept.AbstractSecurityInterceptor could not validate configuration attributes as the ObjectDefinitionSource did not return a ConfigAttributeDefinition collection. Where am I supposed to configure configuration attributes if any? >From what I have read on http://www.localhost.nu/java/tapestry-spring-security/conf.html. Is there referring to the Contributions to the FilterSecurityInterceptor. Thanking you in advance Eldred Here is my output screen: [WARN] intercept.AbstractSecurityInterceptor Could not validate configuration attributes as the ObjectDefinitionSource did not return a ConfigAttributeDefinition collection [ERROR] billpmts.Bills Render queue error in BeginRender[billpmts/Bills]: Access is denied org.apache.tapestry5.ioc.internal.util.TapestryException: Access is denied at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke( ComponentPageElementImpl.java:948) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$ 400(ComponentPageElementImpl.java:49) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$Abstrac tPhase.callback(ComponentPageElementImpl.java:159) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRe nderPhase.render(ComponentPageElementImpl.java:211) at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueIm pl.java:74) at org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRe nderQueueImpl.java:121) at $PageRenderQueue_122a244d649.render($PageRenderQueue_122a244d649.java) at $PageRenderQueue_122a244d62b.render($PageRenderQueue_122a244d62b.java) at org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMa rkup(MarkupRendererTerminator.java:37) at org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryMod ule.java:1748) at $MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryMod ule.java:1732) at $MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryMod ule.java:1714) at $MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryMod ule.java:1700) at $MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryMod ule.java:1681) at $MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav a) at org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryMod ule.java:1662) at $MarkupRenderer_122a244d64b.renderMarkup($MarkupRenderer_122a244d64b.jav a) at $MarkupRenderer_122a244d648.renderMarkup($MarkupRenderer_122a244d648.jav a) at org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPage Markup(PageMarkupRendererImpl.java:64) at $PageMarkupRenderer_122a244d645.renderPageMarkup($PageMarkupRenderer_122 a244d645.java) at org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPa geResponse(PageResponseRendererImpl.java:61) at $PageResponseRenderer_122a244d641.renderPageResponse($PageResponseRender er_122a244d641.java) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.hand le(PageRenderRequestHandlerImpl.java:63) at org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.ja va:1943) at $PageRenderRequestHandler_122a244d642.handle($PageRenderRequestHandler_1 22a244d642.java) at $PageRenderRequestHandler_122a244d634.ha
Re: search hints for Tapestry 5
i will add jumpstart and checking the sources in the svn repository On Thu, Jul 23, 2009 at 8:41 PM, Sergey Didenko wrote: > Let's share how we search how to do certain things in Tapestry 5. > > That is my sequence: > > - search Guide. Google "site:tapestry.apache.org/tapestry5.1/guide keywords" > - search Nabble, Google "intitle:tapestry intitle:user site:nabble.com > keywords" > - search Wiki. Google "site:wiki.apache.org/tapestry/ keywords" > - search the internet. Google "(T5 OR tapestry5 OR "tapestry 5") keywords" > > - try to implement what you need in the most obvious way. What I like > about Tapestry is that this approach often works. > > - ask this mailing list > > Could you add your hints? Is this useful for you? > > Regards, Sergey. > > - > 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: Component API?
Dennis, I suggest you read Tapestry User Guide section in parallel with Jumpstart. P.S. I love Google email translating feature! :) >Hello Dennis, here your old work colleague Kai. If you somehow >Tapestry have the chance not to use: it is not used! It is a >Graus. It wants to do everything and do everything differently than everyone >else. >Better it will not. Details like to go private. I can only >recommended, because I must use it every day. >Greetings from the World Tapestry >Kai - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
search hints for Tapestry 5
Let's share how we search how to do certain things in Tapestry 5. That is my sequence: - search Guide. Google "site:tapestry.apache.org/tapestry5.1/guide keywords" - search Nabble, Google "intitle:tapestry intitle:user site:nabble.com keywords" - search Wiki. Google "site:wiki.apache.org/tapestry/ keywords" - search the internet. Google "(T5 OR tapestry5 OR "tapestry 5") keywords" - try to implement what you need in the most obvious way. What I like about Tapestry is that this approach often works. - ask this mailing list Could you add your hints? Is this useful for you? Regards, Sergey. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Component API?
Totally agree with Igor. On Thu, Jul 23, 2009 at 7:52 PM, Igor Drobiazko wrote: > Dear Kai, > > if you write such a mail to the tapestry mail list, you should write in > english and provide more technical arguments. > Yes, Tapestry takes a different approach to create web apps. But this > approach is what makes Tapestry so beautiful. > > @Dennis: Give Tapestry a try and you will see if it fits your needs. A > german book about Tapestry will be released shortly. > I hope it will help you to learn Tapestry. See here: > > http://www.amazon.de/Tapestry-Die-Entwicklung-Webanwendungen-Leichtigkeit/dp/3827328446/ref=sr_1_1?ie=UTF8&qid=1248371375&sr=8-1 > > > 2009/7/23 Kai Weber > >> * Dennis Kühn : >> >> Hallo Dennis, hier deiner alter Arbeitskollege Kai. Wenn du irgendwie >> die Chance hast Tapestry nicht zu benutzen: benutz es nicht! Es ist ein >> graus. Es will alles machen und macht alles anders als alle anderen. >> Besser wird es dadurch nicht. Details gerne mal privat. Ich kann nur >> abraten, denn ich muss es täglich benutzen. >> >> Grüße aus der Tapestry-Welt >> Kai >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > -- > Best regards, > > Igor Drobiazko > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Component API?
Dear Kai, if you write such a mail to the tapestry mail list, you should write in english and provide more technical arguments. Yes, Tapestry takes a different approach to create web apps. But this approach is what makes Tapestry so beautiful. @Dennis: Give Tapestry a try and you will see if it fits your needs. A german book about Tapestry will be released shortly. I hope it will help you to learn Tapestry. See here: http://www.amazon.de/Tapestry-Die-Entwicklung-Webanwendungen-Leichtigkeit/dp/3827328446/ref=sr_1_1?ie=UTF8&qid=1248371375&sr=8-1 2009/7/23 Kai Weber > * Dennis Kühn : > > Hallo Dennis, hier deiner alter Arbeitskollege Kai. Wenn du irgendwie > die Chance hast Tapestry nicht zu benutzen: benutz es nicht! Es ist ein > graus. Es will alles machen und macht alles anders als alle anderen. > Besser wird es dadurch nicht. Details gerne mal privat. Ich kann nur > abraten, denn ich muss es täglich benutzen. > > Grüße aus der Tapestry-Welt > Kai > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Best regards, Igor Drobiazko
Re: Return type org.apache.tapestry5.json.JSONObject can not be handled
Okay, I've heard, indirectly, from the customer. The laptop does have JavaScript enabled. However, it does not have networking fully configured and is never used on the Internet. They say "This laptop has no IP address." (They are very security-conscious; perhaps this is to to make unauthorized access more difficult.) I believe they are using FireFox 3.0. Dojo is generating the should-be-AJAX requests. Perhaps this is ultimately a Dojo problem, that the laptop's configuration is causing Dojo to omit the XHR header. If you have any other ideas, I'd love to hear them, but otherwise, thanks for your time. Howard Lewis Ship wrote: > > To expand: that error is associated with an event handler method > returning a value (JSONObject) that is appropriate for an Ajax > response, but doing so during a traditional (i.e., non-Ajax) request. > So for some reason, either it was a traditional request, or something > on the browser side prevented Tapestry from recognizing the request as > Ajax (it looks for an XHR header). > -- View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3311186.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
Re: Component API?
* Dennis Kühn : Hallo Dennis, hier deiner alter Arbeitskollege Kai. Wenn du irgendwie die Chance hast Tapestry nicht zu benutzen: benutz es nicht! Es ist ein graus. Es will alles machen und macht alles anders als alle anderen. Besser wird es dadurch nicht. Details gerne mal privat. Ich kann nur abraten, denn ich muss es täglich benutzen. Grüße aus der Tapestry-Welt Kai - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Return type org.apache.tapestry5.json.JSONObject can not be handled
>> I wondered that also, and I'm waiting on an answer. >> Does disabling JavaScript make the Ajax stuff invisible to Tapestry? If >> so, it'd be great to have a better error message. >AJAX is all about using Javascript to update a part of a page without >refreshing it. ;) Thus, no Javascript, no AJAX. Yes, I realize that. What I meant was, rather than just saying "I don't know what to do with a JSONObject," it would be more helpful to the developer if it said "You can't return a JSONObject to a non-AJAX request." The former message leaves me wondering if I've somehow misconfigured Tapestry. The latter message gives me a much better clue as to where to start looking for the problem. -- View this message in context: http://n2.nabble.com/Return-type-org.apache.tapestry5.json.JSONObject-can-not-be-handled-tp3295186p3311089.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
AW: Component API?
Juan and Thiago, Thanks a lot for your tipps - this is exactly what I was looking for! -Ursprüngliche Nachricht- Von: Juan E. Maya [mailto:maya.j...@gmail.com] Gesendet: Donnerstag, 23. Juli 2009 18:05 An: Tapestry users Betreff: Re: Component API? Hi Dennis, u may want to check tap5 book: http://www.packtpub.com/tapestry-5/book however be careful because some things have changed since it was written. Another great source to learn is Tapestry Jumpstart : http://jumpstart.doublenegative.com.au/home.html It's not a step by step tutorial but very useful to know how things work. Also the don't forget to check the wiki http://wiki.apache.org/tapestry/Tapestry5HowTos On Thu, Jul 23, 2009 at 4:36 PM, Dennis Kühn wrote: > Hi everyone, > > I'm a Tapestry beginner and am getting started with T5 now. > All I've seen so far looks really good and I found myself giggling while > coding my first pages .. a good sign I guess ;) > > Before Tapestry I have evaluated JSF and found it quite neat how you can > manipulate a component on the server side. In Tapestry, I found I can inject > a component instance into my page class via @InjectComponent. However, when I > tried this with a checkbox component, I noticed there are no methods for > changing the component (e.g. myCheckbox.setDisabled(true)). What's the > preferred way to do this? > > I also wonder if there is something like a user guide - the tutorials and > wiki are nice but there is no step-by-step style guide to learning Tapestry. > Any pointers would be much appreciated! > > Thank you in advance, > Dennis > > ___ > > Dennis Kühn > mediaworx berlin AG > > Fon (0 30) 2 75 80 - 293 > Fax (0 30) 2 75 80 - 200 > > - 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: Documentation of T5 URLs & post-redirect-get
> > I was just trying to explain the way T5 pages in a package xyz can be > > called XyzResults and the URL will be xyz/results to one of my team, > and > > I couldn't find the documentation for this on the Tapestry site. > > Take a look at > http://tapestry.apache.org/tapestry5.1/guide/component-classes.html, > section "Subfolders/Subpackages". Thanks Thiago, I was looking for page documentation. This could be a little more easy to find I feel. I knew the answer, but we were trying to put a link to T5 documentation in a wiki page explaining something. > > I was also struggling to find where the post-redirect-get paradigm is > > documented. > > Post-redirect-get is most known as redirect after post, so searching > for > it in Google will yield better results. > Take a look at http://en.wikipedia.org/wiki/Post/Redirect/Get and then > http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPos > t. I meant Tapestry use of it, and how it affects render/event processing. I'm sure the old documentation had a section on this. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Component API?
Em Thu, 23 Jul 2009 11:36:46 -0300, Dennis Kühn escreveu: Hi everyone, Hi! I'm a Tapestry beginner and am getting started with T5 now. Welcome to Tapestry and the mailing list! :) All I've seen so far looks really good and I found myself giggling while coding my first pages .. a good sign I guess ;) That's a very good sign: it seems you're learning quickly and enjoying the framework. :) Before Tapestry I have evaluated JSF and found it quite neat how you can manipulate a component on the server side. But it's quite hard to understando and implement . . . In Tapestry, I found I can inject a component instance into my page class via @InjectComponent. However, when I tried this with a checkbox component, I noticed there are no methods for changing the component (e.g. myCheckbox.setDisabled(true)). What's the preferred way to do this? Use Checkbox's disabled parameter and bind it to a page property: public boolean isCheckboxDisabled() { // logic here } -- 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
Re: having big trouble with evalJSON() - am I really at war with it?
Thanks so much, you really saved my day! Am 23.07.2009 um 17:18 schrieb Sven Homburg: dont use the evanJSON() function, its not needed anymore with regards Sven Homburg Founder of the Chenille Kit Project http://www.chenillekit.org 2009/7/23 Max Weißböck (info) : Based on the example from Hugo Palma (see http://markmail.org/message/4bdwo2yrx6tavdgh) I implemented a dependend checkbox. Event handling is fine, but I lost hours finding out while response.evalJSON() fails and I still have no clue... Im always getting this erreor; Error communication with the server: Result of expression 'response.evalJSON' [undefined] is not a function. Looks like evalJSON ist not defined (I'm not a JavaScript guy at all) How do I import the js library that includes the evalJSON function? I tried everithing I can think of and this is my current js import @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", "context:js/RESelection.js", "${tapestry.scriptaculous}/ prototype.js" }) public class RealEstateCreate { Any help is VERY welcome, as I'm at a dead end now Thanks, Max This are the js, tml and class files -- RESelection.js - function onCompleteChangeReSubType(response) { selectElement = $('resubtype'); Tapestry.debug(response); Tapestry.debug("1"); responseJSON = response.evalJSON(); Tapestry.debug("2"); while (selectElement.options.length > 0) { selectElement.options[0] = null; } for (index = 0; index < responseJSON.length; index++) { selectElement.options[index] = new Option(responseJSON [index].label, responseJSON [index].value); } Tapestry.ElementEffect.highlight($("resubtype")); } class--- - tml RealEstateCreate.tml http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> ${message} class RealEstateCreate.java -- package net.weissboeck.gimmo.pages.realestate; import java.util.List; import net.weissboeck.gimmo.annotations.InjectSelectionModel; import net.weissboeck.gimmo.beans.WebUser; import net.weissboeck.gimmo.entities.Agent; import net.weissboeck.gimmo.entities.RESubType; import net.weissboeck.gimmo.entities.REType; import net.weissboeck.gimmo.entities.RealEstate; import net.weissboeck.gimmo.services.DataService; import net.weissboeck.gimmo.services.RealEstateService; import net.weissboeck.gimmo.services.UserService; import net.weissboeck.gimmo.util.ExceptionParser; import org.apache.tapestry5.PersistenceConstants; import org.apache.tapestry5.annotations.Component; import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; import org.apache.tapestry5.annotations.InjectPage; import org.apache.tapestry5.annotations.Log; import org.apache.tapestry5.annotations.Mixins; import org.apache.tapestry5.annotations.OnEvent; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.annotations.SessionState; import org.apache.tapestry5.corelib.components.Form; import org.apache.tapestry5.corelib.components.Select; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.json.JSONArray; import org.apache.tapestry5.json.JSONObject; import org.chenillekit.access.annotations.Restricted; import org.slf4j.Logger; @Restricted(groups = { "AGENT" }) @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", "context:js/RESelection.js", "${tapestry.scriptaculous}/ prototype.js" }) public class RealEstateCreate { @Inject private Logger logger; @SessionState private WebUser webUser; @Component private Form form; @Persist @Property private RealEstate realEstate; @SuppressWarnings("unused") @Property @Persist(PersistenceConstants.FLASH) private String message; @InjectPage private RealEstateEdit editPage; @Inject private RealEstateService realEstateService; @Inject private DataService dataService; @Inject private UserService userService; @InjectSelectionModel(labelField = "name", idField = "oid") private List reTypes; @InjectSelectionModel(labelField = "name", idField = "oid") private List reSubTypes; @Component(parameters = {"event=change", "onCompleteCallback=literal:onCompleteChangeReSubType"}) @Mixins({"ck/OnEvent"}) private Select reType; @Log @OnEvent(component="reType", value="change") public JSONArray onChangeRETypeEvent(String value) { JSONArray jsonArray = new JSONArray(); List subTypes = dataService .ge
Session lost when cookies disabled?
Hi, i've implemented authorization via dispatcher and page annotations as described in the Wiki. Everything works fine as long as cookies are enabled. If i disable them, the JSessionID will be appended to all url's as expected, but nevertheless the session could not be found / rebound to requests. So every request results in a redirect to the login. What i'm doing wrong here? Thanks, Stefan smime.p7s Description: S/MIME cryptographic signature
Re: Component API?
Hi Dennis, u may want to check tap5 book: http://www.packtpub.com/tapestry-5/book however be careful because some things have changed since it was written. Another great source to learn is Tapestry Jumpstart : http://jumpstart.doublenegative.com.au/home.html It's not a step by step tutorial but very useful to know how things work. Also the don't forget to check the wiki http://wiki.apache.org/tapestry/Tapestry5HowTos On Thu, Jul 23, 2009 at 4:36 PM, Dennis Kühn wrote: > Hi everyone, > > I'm a Tapestry beginner and am getting started with T5 now. > All I've seen so far looks really good and I found myself giggling while > coding my first pages .. a good sign I guess ;) > > Before Tapestry I have evaluated JSF and found it quite neat how you can > manipulate a component on the server side. In Tapestry, I found I can inject > a component instance into my page class via @InjectComponent. However, when I > tried this with a checkbox component, I noticed there are no methods for > changing the component (e.g. myCheckbox.setDisabled(true)). What's the > preferred way to do this? > > I also wonder if there is something like a user guide - the tutorials and > wiki are nice but there is no step-by-step style guide to learning Tapestry. > Any pointers would be much appreciated! > > Thank you in advance, > Dennis > > ___ > > Dennis Kühn > mediaworx berlin AG > > Fon (0 30) 2 75 80 - 293 > Fax (0 30) 2 75 80 - 200 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Documentation of T5 URLs & post-redirect-get
Em Thu, 23 Jul 2009 11:32:51 -0300, Blower, Andy escreveu: I was just trying to explain the way T5 pages in a package xyz can be called XyzResults and the URL will be xyz/results to one of my team, and I couldn't find the documentation for this on the Tapestry site. Take a look at http://tapestry.apache.org/tapestry5.1/guide/component-classes.html, section "Subfolders/Subpackages". Quick answer: create a xyz package and create a Results class inside it. Page URLs follow the page classes names and structure. I was also struggling to find where the post-redirect-get paradigm is documented. Post-redirect-get is most known as redirect after post, so searching for it in Google will yield better results. Take a look at http://en.wikipedia.org/wiki/Post/Redirect/Get and then http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost. -- 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
Re: having big trouble with evalJSON() - am I really at war with it?
dont use the evanJSON() function, its not needed anymore with regards Sven Homburg Founder of the Chenille Kit Project http://www.chenillekit.org 2009/7/23 Max Weißböck (info) : > Based on the example from Hugo Palma (see > http://markmail.org/message/4bdwo2yrx6tavdgh) > I implemented a dependend checkbox. > > Event handling is fine, but I lost hours finding out while > response.evalJSON() fails and I still have no clue... > > Im always getting this erreor; > Error communication with the server: Result of expression > 'response.evalJSON' [undefined] is not a function. > > Looks like evalJSON ist not defined (I'm not a JavaScript guy at all) > > How do I import the js library that includes the evalJSON function? I tried > everithing I can think of and this is my > current js import > > @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", > "context:js/RESelection.js", "${tapestry.scriptaculous}/prototype.js" }) > public class RealEstateCreate { > > Any help is VERY welcome, as I'm at a dead end now > > > Thanks, Max > > > This are the js, tml and class files > > -- RESelection.js - > > function onCompleteChangeReSubType(response) { > selectElement = $('resubtype'); > Tapestry.debug(response); > Tapestry.debug("1"); > responseJSON = response.evalJSON(); > Tapestry.debug("2"); > > while (selectElement.options.length > 0) { > selectElement.options[0] = null; > } > > for (index = 0; index < responseJSON.length; index++) { > selectElement.options[index] = new Option(responseJSON > [index].label, responseJSON [index].value); > } > > Tapestry.ElementEffect.highlight($("resubtype")); > } > > > class--- > > > > > > - tml RealEstateCreate.tml > > sidebarTitle="message:sidebarTitle" > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; > xmlns:p="tapestry:parameter"> > > > > > > > > validate="required"/> > > > > value="realestate.retype" > model="reTypesSelectionModel" > encoder="reTypesValueEncoder" validate="required"/> > > > value="realestate.resubtype" > model="reSubTypesSelectionModel" > encoder="reSubTypesValueEncoder" validate="required"/> > > > > > value="realestate.description"/> > > > > > > > > > > > > ${message} > > > > > > > > > > > > > class RealEstateCreate.java -- > > > package net.weissboeck.gimmo.pages.realestate; > > import java.util.List; > > import net.weissboeck.gimmo.annotations.InjectSelectionModel; > import net.weissboeck.gimmo.beans.WebUser; > import net.weissboeck.gimmo.entities.Agent; > import net.weissboeck.gimmo.entities.RESubType; > import net.weissboeck.gimmo.entities.REType; > import net.weissboeck.gimmo.entities.RealEstate; > import net.weissboeck.gimmo.services.DataService; > import net.weissboeck.gimmo.services.RealEstateService; > import net.weissboeck.gimmo.services.UserService; > import net.weissboeck.gimmo.util.ExceptionParser; > > import org.apache.tapestry5.PersistenceConstants; > import org.apache.tapestry5.annotations.Component; > import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; > import org.apache.tapestry5.annotations.InjectPage; > import org.apache.tapestry5.annotations.Log; > import org.apache.tapestry5.annotations.Mixins; > import org.apache.tapestry5.annotations.OnEvent; > import org.apache.tapestry5.annotations.Persist; > import org.apache.tapestry5.annotations.Property; > import org.apache.tapestry5.annotations.SessionState; > import org.apache.tapestry5.corelib.components.Form; > import org.apache.tapestry5.corelib.components.Select; > import org.apache.tapestry5.ioc.annotations.Inject; > import org.apache.tapestry5.json.JSONArray; > import org.apache.tapestry5.json.JSONObject; > import org.chenillekit.access.annotations.Restricted; > import org.slf4j.Logger; > > > @Restricted(groups = { "AGENT" }) > @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", > "context:js/RESelection.js", "${tapestry.scriptaculous}/prototype.js" }) > public class RealEstateCreate { > > �...@inject > private Logger logger; > > �...@sessionstate > private WebUser webUser; > > �...@component > private Form form; > > �...@persist > �...@property > private RealEstate realEstate; > > �...@suppresswarnings("unused") > �...@property > �...@persist(PersistenceConstants.FLASH) > private String message; > > �...@injectpage > private RealEstateEdit editPage; > > �...@inject > private RealEstateService realEstateService; > > �...@in
having big trouble with evalJSON() - am I really at war with it?
Based on the example from Hugo Palma (see http://markmail.org/message/4bdwo2yrx6tavdgh) I implemented a dependend checkbox. Event handling is fine, but I lost hours finding out while response.evalJSON() fails and I still have no clue... Im always getting this erreor; Error communication with the server: Result of expression 'response.evalJSON' [undefined] is not a function. Looks like evalJSON ist not defined (I'm not a JavaScript guy at all) How do I import the js library that includes the evalJSON function? I tried everithing I can think of and this is my current js import @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", "context:js/ RESelection.js", "${tapestry.scriptaculous}/prototype.js" }) public class RealEstateCreate { Any help is VERY welcome, as I'm at a dead end now Thanks, Max This are the js, tml and class files -- RESelection.js - function onCompleteChangeReSubType(response) { selectElement = $('resubtype'); Tapestry.debug(response); Tapestry.debug("1"); responseJSON = response.evalJSON(); Tapestry.debug("2"); while (selectElement.options.length > 0) { selectElement.options[0] = null; } for (index = 0; index < responseJSON.length; index++) { selectElement.options[index] = new Option(responseJSON [index].label, responseJSON [index].value); } Tapestry.ElementEffect.highlight($("resubtype")); } class--- - tml RealEstateCreate.tml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> validate="required"/> model="reTypesSelectionModel" encoder="reTypesValueEncoder" validate="required"/> model="reSubTypesSelectionModel" encoder="reSubTypesValueEncoder" validate="required"/> value="realestate.description"/> ${message} class RealEstateCreate.java -- package net.weissboeck.gimmo.pages.realestate; import java.util.List; import net.weissboeck.gimmo.annotations.InjectSelectionModel; import net.weissboeck.gimmo.beans.WebUser; import net.weissboeck.gimmo.entities.Agent; import net.weissboeck.gimmo.entities.RESubType; import net.weissboeck.gimmo.entities.REType; import net.weissboeck.gimmo.entities.RealEstate; import net.weissboeck.gimmo.services.DataService; import net.weissboeck.gimmo.services.RealEstateService; import net.weissboeck.gimmo.services.UserService; import net.weissboeck.gimmo.util.ExceptionParser; import org.apache.tapestry5.PersistenceConstants; import org.apache.tapestry5.annotations.Component; import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; import org.apache.tapestry5.annotations.InjectPage; import org.apache.tapestry5.annotations.Log; import org.apache.tapestry5.annotations.Mixins; import org.apache.tapestry5.annotations.OnEvent; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.annotations.SessionState; import org.apache.tapestry5.corelib.components.Form; import org.apache.tapestry5.corelib.components.Select; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.json.JSONArray; import org.apache.tapestry5.json.JSONObject; import org.chenillekit.access.annotations.Restricted; import org.slf4j.Logger; @Restricted(groups = { "AGENT" }) @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", "context:js/ RESelection.js", "${tapestry.scriptaculous}/prototype.js" }) public class RealEstateCreate { @Inject private Logger logger; @SessionState private WebUser webUser; @Component private Form form; @Persist @Property private RealEstate realEstate; @SuppressWarnings("unused") @Property @Persist(PersistenceConstants.FLASH) private String message; @InjectPage private RealEstateEdit editPage; @Inject private RealEstateService realEstateService; @Inject private DataService dataService; @Inject private UserService userService; @InjectSelectionModel(labelField = "name", idField = "oid") private List reTypes; @InjectSelectionModel(labelField = "name", idField = "oid") private List reSubTypes; @Component(parameters = {"event=change", "onCompleteCallback=literal:onCompleteChangeReSubType"}) @Mixins({"ck/OnEvent"}) private Select reType; @Log @OnEvent(component="reType", value="change") public JSONArray onChangeRETypeEvent(String value)
Component API?
Hi everyone, I'm a Tapestry beginner and am getting started with T5 now. All I've seen so far looks really good and I found myself giggling while coding my first pages .. a good sign I guess ;) Before Tapestry I have evaluated JSF and found it quite neat how you can manipulate a component on the server side. In Tapestry, I found I can inject a component instance into my page class via @InjectComponent. However, when I tried this with a checkbox component, I noticed there are no methods for changing the component (e.g. myCheckbox.setDisabled(true)). What's the preferred way to do this? I also wonder if there is something like a user guide - the tutorials and wiki are nice but there is no step-by-step style guide to learning Tapestry. Any pointers would be much appreciated! Thank you in advance, Dennis ___ Dennis Kühn mediaworx berlin AG Fon (0 30) 2 75 80 - 293 Fax (0 30) 2 75 80 - 200
Documentation of T5 URLs & post-redirect-get
I was just trying to explain the way T5 pages in a package xyz can be called XyzResults and the URL will be xyz/results to one of my team, and I couldn't find the documentation for this on the Tapestry site. I was also struggling to find where the post-redirect-get paradigm is documented. Can anyone point me to the right places please?
having big trouble with evalJSON() - am I really at war with it?
Based on the example from Hugo Palma (see http://markmail.org/message/4bdwo2yrx6tavdgh) I implemented a dependend checkbox. Event handling is fine, but I lost hours finding out while response.evalJSON() fails and I still have no clue... Im always getting this erreor; Error communication with the server: Result of expression 'response.evalJSON' [undefined] is not a function. Looks like evalJSON ist not defined (I'm not a JavaScript guy at all) How do I import the js library that includes the evalJSON function? I tried everithing I can think of and this is my current js import @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", "context:js/ RESelection.js", "${tapestry.scriptaculous}/prototype.js" }) public class RealEstateCreate { Any help is VERY welcome, as I'm at a dead end now Thanks, Max This are the js, tml and class files -- RESelection.js - function onCompleteChangeReSubType(response) { selectElement = $('resubtype'); Tapestry.debug(response); Tapestry.debug("1"); responseJSON = response.evalJSON(); Tapestry.debug("2"); while (selectElement.options.length > 0) { selectElement.options[0] = null; } for (index = 0; index < responseJSON.length; index++) { selectElement.options[index] = new Option(responseJSON [index].label, responseJSON [index].value); } Tapestry.ElementEffect.highlight($("resubtype")); } class--- - tml RealEstateCreate.tml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> validate="required"/> model="reTypesSelectionModel" encoder="reTypesValueEncoder" validate="required"/> model="reSubTypesSelectionModel" encoder="reSubTypesValueEncoder" validate="required"/> value="realestate.description"/> ${message} class RealEstateCreate.java -- package net.weissboeck.gimmo.pages.realestate; import java.util.List; import net.weissboeck.gimmo.annotations.InjectSelectionModel; import net.weissboeck.gimmo.beans.WebUser; import net.weissboeck.gimmo.entities.Agent; import net.weissboeck.gimmo.entities.RESubType; import net.weissboeck.gimmo.entities.REType; import net.weissboeck.gimmo.entities.RealEstate; import net.weissboeck.gimmo.services.DataService; import net.weissboeck.gimmo.services.RealEstateService; import net.weissboeck.gimmo.services.UserService; import net.weissboeck.gimmo.util.ExceptionParser; import org.apache.tapestry5.PersistenceConstants; import org.apache.tapestry5.annotations.Component; import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; import org.apache.tapestry5.annotations.InjectPage; import org.apache.tapestry5.annotations.Log; import org.apache.tapestry5.annotations.Mixins; import org.apache.tapestry5.annotations.OnEvent; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.annotations.SessionState; import org.apache.tapestry5.corelib.components.Form; import org.apache.tapestry5.corelib.components.Select; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.json.JSONArray; import org.apache.tapestry5.json.JSONObject; import org.chenillekit.access.annotations.Restricted; import org.slf4j.Logger; @Restricted(groups = { "AGENT" }) @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", "context:js/ RESelection.js", "${tapestry.scriptaculous}/prototype.js" }) public class RealEstateCreate { @Inject private Logger logger; @SessionState private WebUser webUser; @Component private Form form; @Persist @Property private RealEstate realEstate; @SuppressWarnings("unused") @Property @Persist(PersistenceConstants.FLASH) private String message; @InjectPage private RealEstateEdit editPage; @Inject private RealEstateService realEstateService; @Inject private DataService dataService; @Inject private UserService userService; @InjectSelectionModel(labelField = "name", idField = "oid") private List reTypes; @InjectSelectionModel(labelField = "name", idField = "oid") private List reSubTypes; @Component(parameters = {"event=change", "onCompleteCallback=literal:onCompleteChangeReSubType"}) @Mixins({"ck/OnEvent"}) private Select reType; @Log @OnEvent(component="reType", value="change") public JSONArray onChangeRETypeEvent(String value)
Re: Activation Context of the Login page
It seems that you are reinventing tapestry action links. As I understand you can just declare Logout on pages that have "Logout" functionality. For example by including UserPane component that contains this actionlink. Then you just call you logout logic inside onActionFromLogoutLink handler, following by optional redirect to any page you want. See tapestry docs. On Thu, Jul 23, 2009 at 10:21 AM, Stephan Windmüller wrote: > Sergey Didenko wrote: > >> Stephan, why do you invalidate the session inside onActivate()? >> onActivate is for activating pages. I guess onAction* handlers are >> better place for this code. > > The session should be invalidated when the logout page is loaded. Then > the page redirects to the login page. > > Is there a better way to perform this task? > > - Stephan > > - > 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
Context Activate - Unit testing pages
I am trying to pass an activation context to a page during unit testing but It seems the documentation on: http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html is out of date. According to the page the code to pass the context is as follow: PageTester tester = new PageTester(appPackage, appName, "src/main/webapp"); Object[] context = new Object[]{ "abc", 123 }; Document doc = tester.invoke(new ComponentInvocation(new PageLinkTarget("MyPage"), context)); but neither the method invoice nor ComponentInvocation exist anymore (Tapestry 5.1.0.5). I was trying to check the source code for examples but i didn't find anything. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Activation Context of the Login page
Sergey Didenko wrote: > Stephan, why do you invalidate the session inside onActivate()? > onActivate is for activating pages. I guess onAction* handlers are > better place for this code. The session should be invalidated when the logout page is loaded. Then the page redirects to the login page. Is there a better way to perform this task? - Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org