Re: [T5] GridDataSource: why call getAvailableRows before prepare?
I have the exact same problem/question? When I call prepare myself and update my availableRows parameter. Once the getAvailableRows run, the parameter is reseted by itself. How to use GridDatasource the correct way? Franz Amador wrote: I'm starting to use Grid to display the paged, sortable results of a Hibernate query, so I'm implementing GridDataSource. I was dismayed to see that getAvailableRows gets called before prepare. This means that I have to run my query twice: once to count the total rows (when getAvailableRows gets called), and again to do the sorting and get the correct page (when prepare gets called). If, instead, prepare got called first, then I could do the sorting and page extraction and get the total number of results all in one query (just add count(*) to the columns being returned). You might ask, how can the system know the page size to ask for when calling prepare if it hasn't called getAvailableRows first? No problem: just ask for the first full page and have prepare return the number of rows it actually found. (Or add a getter for that information.) For fast queries, running them twice isn't that great a sin, but for slow queries, such as in a user-specified search page, running them twice when you don't really have to seems extravagant to me. -- View this message in context: http://www.nabble.com/-T5--GridDataSource%3A-why-call-getAvailableRows-before-prepare--tp19616074p26108742.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: tapestry 5.1.0.5 and AJAX project/example?
I would love to see your code samples! Also, a blog posting some good examples from your work would probably be another great resource for the T5-community. You're very right that we need good examples of complex interactions made easy by T5. Regards Inge On Thu, Oct 29, 2009 at 4:15 AM, Vangel V. Ajanovski a...@ii.edu.mk wrote: On 28.10.2009 08:36, Inge Solvoll wrote: I would love to see a positive and helpful response to this request. His approach might annoy a few people here, but I encourage you to take this kind of thing seriously. I believe there are a lot of people feeling the way Argo feels about the framework, and he does hit a few good points on the way, about good examples and documentation. Before going with Tapestry I have read lot's of comments and powerpoints and blog discussions and web framework comparison talks and all of them had a single major drawback about Tapestry, no matter if version 3 or 4 or 5. It was supposedly very hard to learn, but once you would get into it there should be no limits. :) If one has previously worked with php and asp, then learning the whole java stack and the specifics of Tapestry will require at least a month of hard experimentation and reading. Some of you suggest mixins (while he may not know what a mixin is), some of you suggest 3rd party components (some of which have almost zero documentation on installation and usage). I think that the tapestry site really really needs a demo where one can see a page or two from a full-blown application with complicated user interaction and rich web interface and a complete up2date tutorial on how would one build that page. Jumpstart is great for learning the working of various components, but when one is a beginner he will need a full set of relevant tutorials and guides how to build something that is complicated. I have a similar misshap as Argo has these days, I have to code a semi complex interaction that mimics an OLAP database and drag-and-drop modules for reporting with pivot tables and I have to build it in under one week with ASP.NET and MySQL. And the last time i have tried a Microsoft development tool was when Visual Basic 1.0 was Beta and it came on three 5.25 installation floppy disks. So I think that I fully understand Argo-s worries, being in a similar position. I could send you a link to the latest Tapestry application that we are building which does have several complicated dynamic pages and ajax, but there is almost no documentation in English at this point and there is a huge database schema that sits behind the application whch makes it harder to delve into. It will open-source once we decide on the licencing model and finish the release requirements, so I wouldn't put it completely in public, but I can send the code of some of the more complicated web pages to anyone that is interested in learning, just send me an email. Once I have some spare time I promise that I will try to strip them apart from unnnecessary bulk and setup a showcase demo site.
Tapestry 5.2.0.0-SNAPSHOT with GAE SDK 1.2.6
Hi, I updated my app to tapestry5.2.0.0-SNAPSHOT and GAE SDK 1.2.6 and had errors like: * java.lang.VerifyError Stack size too large * java.lang.ClassFormatError: Invalid length 65050 in LocalVariableTable in class file org/apache/tapestry5/corelib/components/Form The first error seemed to be caused by ANTLR grammar (see https://issues.apache.org/jira/browse/TAP5-913 with patch) And the other one is with GAE SDK Javaagent. I had to turn it off to avoid the issues. I wrote a blog entry with details how to turn it off: http://dmitrygusev.blogspot.com/2009/10/develope-java-applications-with-gae-sdk.html HTH -- Dmitry Gusev AnjLab Team http://anjlab.com
Error in integrating Tapestry5 with Hibernate.
Hi, I am trying to integrate tapestry5 with Hibernate. I have done all steps which are defined in http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate . It is compiling without errors but when i run HbAction page it gives me exceptions. org.example.example1.web.pages.HbAction.onAction(HbAction.java:29) org.example.example1.web.services.AppModule$1.service(AppModule.java:90) Please help if you have any ideas? Thank you, my codes are as bellow: Hello.java package org.example.example1.web.entities; /** * * @author mirlan */ import javax.persistence.*; @Entity @Table(name=hello) public class Hello { @Id @GeneratedValue private long id; private String message; public long getId() { return id;} public void setId(long id) { this.id = id; } public String getMessage() { return message;} public void setMessage(String message) { this.message = message;} } HbAction.java import java.util.List; import org.apache.tapestry5.ioc.annotations.Inject; import org.example.example1.web.entities.Hello; import org.hibernate.Session; public class HbAction { @Inject private Session _session; private Hello current; public void onAction() { Hello h = new Hello(); h.setMessage(Hello World); _session.save(h); _session.close(); } public List getList() { return _session.createCriteria(Hello.class).list(); } public Hello getCurrent() { return current; } public void setCurrent(Hello current) { this.current = current; } } AppModule.java package org.example.example1.web.services; import java.io.IOException; import org.apache.tapestry5.*; import org.apache.tapestry5.ioc.MappedConfiguration; import org.apache.tapestry5.ioc.OrderedConfiguration; import org.apache.tapestry5.ioc.ServiceBinder; import org.apache.tapestry5.ioc.annotations.Local; import org.apache.tapestry5.services.Request; import org.apache.tapestry5.services.RequestFilter; import org.apache.tapestry5.services.RequestHandler; import org.apache.tapestry5.services.Response; import org.slf4j.Logger; /** * This module is automatically included as part of the Tapestry IoC Registry, it's a good place to * configure and extend Tapestry, or to place your own service definitions. */ public class AppModule { public static void bind(ServiceBinder binder) { // binder.bind(MyServiceInterface.class, MyServiceImpl.class); // Make bind() calls on the binder object to define most IoC services. // Use service builder methods (example below) when the implementation // is provided inline, or requires more initialization than simply // invoking the constructor. } public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { // Contributions to ApplicationDefaults will override any contributions to // FactoryDefaults (with the same key). Here we're restricting the supported // locales to just en (English). As you add localised message catalogs and other assets, // you can extend this list of locales (it's a comma separated series of locale names; // the first locale name is the default when there's no reasonable match). configuration.add(SymbolConstants.SUPPORTED_LOCALES, en); // The factory default is true but during the early stages of an application // overriding to false is a good idea. In addition, this is often overridden // on the command line as -Dtapestry.production-mode=false configuration.add(SymbolConstants.PRODUCTION_MODE, false); // The application version number is incorprated into URLs for some // assets. Web browsers will cache assets because of the far future expires // header. If existing assets are changed, the version number should also // change, to force the browser to download new versions. configuration.add(SymbolConstants.APPLICATION_VERSION, 1.0-SNAPSHOT); } /** * This is a service definition, the service will be named TimingFilter. The interface, * RequestFilter, is used within the RequestHandler service pipeline, which is built from the * RequestHandler service configuration. Tapestry IoC is responsible for passing in an * appropriate Logger instance. Requests for static resources are handled at a higher level, so * this filter will only be invoked for Tapestry related requests. * * p * Service builder methods are useful when the implementation is inline as an inner class * (as here) or require some other kind of special initialization. In most cases, * use the static bind() method instead. * * p * If this method was named build, then the service id would be taken from the * service interface and would be RequestFilter.
Re: Error in integrating Tapestry5 with Hibernate.
Em Thu, 29 Oct 2009 09:04:00 -0200, mirlan mip1...@yahoo.com escreveu: Hi, Hi! It is compiling without errors but when i run HbAction page it gives me exceptions. Without the stack traces, it's nearly impossible to help you. -- 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
T5 : Pop up with grid
Hi, I have a pop up with a grid. When i click in a line of my grid, i want to get the object for the clicked row. here is the parent .tml which call the pop up : script type=text/javascript function popup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, windowname, 'width=800,height=600,scrollbars=yes'); return false; } /script ... pt:label for=departure ${message:search-departure} /t:label t:textfield t:id=departure t:value=departure.name t:validate=required / a t:type=pagelink t:page=itinerary/AddressListPopUp t:context='0' onClick=return popup(this,'AddressListPopUp');Listes d'adresses /p Here is the .tml for the pop up. sgPoi is an object with : id, name div id=poiList h3${message:sgPoiList-title}/h3 table t:id=sgPoiGrid t:model=sgPoiGridModel t:type=grid t:row=sgPoi t:source=sgPoiList t:rowIndex=rowIndex t:rowClass=rowClass t:rowsPerPage=${message:rowsPerPage} t:inplace=true t:parameter name=selectCell t:actionlink t:id=selectAddressPoi t:context=sgPoi.id ${message:select-label} /t:actionlink /t:parameter /table /div Here is the java controller for my actionlink: @OnEvent(value = action, component = selectAddressPoi) public void onSelectEvent(Integer id) { String name = this.sgPoiManager.getSgPoiById(id).getName; //TODO how to complete the textfield departure in the parent window ??? } I don't know what is the best way to complete the textfield departure in the parent window with the Name of the SgPoi selected. How can i get the opener page in my java class ? Thanks by advance. -- View this message in context: http://www.nabble.com/T5-%3A-Pop-up-with-grid-tp26112459p26112459.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: Good news about Tapestry 5 in Google App Engine
Thanks for opening TAP5-913, Dmitry. I'll try to apply this tonight. Unfortunately the test system for Tapestry doesn't work for Snow Leopard, so I have to run in a VM to verify everything is passing. -- Kevin On Wed, Oct 28, 2009 at 7:31 AM, Dmitry Gusev dmitry.gu...@gmail.com wrote: I've made a Pull request on github with fixes for java.lang.VerifyError. Here's the commit details: http://github.com/dmitrygusev/tapestry5/commit/35197745d13ffed1fb89d730dbc85f750bf50bb0 On Mon, Sep 14, 2009 at 07:14, Alex Kotchnev akoch...@gmail.com wrote: A follow up question to the committers on this : Is Jun's approach below something acceptable to do in the meantime ? I was trying to deploy a test 5.1 app to GAE and I ran into the same issue. As he indicated these methods had emtpy try-catch blocks, removing which is supposed to resolve the issue. THe part that worries me are the magical $ANTLR comments that I think can somehow be used by ANTLR. Any tips ? Cheers, Alex K On Fri, Sep 4, 2009 at 3:50 AM, Jun Tsai jun.t...@gmail.com wrote: I had manually fixed the problem.Remove some empty method body in PropertyExpressionLexer.java maked by antlr. // $ANTLR start INTEGER public final void mINTEGER() throws RecognitionException { } // $ANTLR end INTEGER // $ANTLR start DEREF public final void mDEREF() throws RecognitionException { } // $ANTLR end DEREF // $ANTLR start RANGEOP public final void mRANGEOP() throws RecognitionException { } // $ANTLR end RANGEOP // $ANTLR start DECIMAL public final void mDECIMAL() throws RecognitionException { } and repacked. It works fine. 2009/9/4 Jun Tsai jun.t...@gmail.com The ticket had been fixed.I had tested on GAE using 1.2.5 SDK. But when I write simple pagelink t:pagelink page=about about/t:pagelink ,some exception thrown. java.lang.VerifyError: (class: org/apache/tapestry5/internal/antlr/PropertyExpressionLexer, method: mRANGEOP signature: ()V) Stack size too large at org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.parse(PropertyConduitSourceImpl.java:1229) at org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.build(PropertyConduitSourceImpl.java:1124) at org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.create(PropertyConduitSourceImpl.java:1080) Who can give me an idea about the exception. thanks. 2009/9/4 Thiago H. de Paula Figueiredo thiag...@gmail.com --- Mensagem encaminhada --- De: codesite-nore...@google.com Assunto: Issue 1277 in googleappengine: Add javax.xml.stream to whitelist Data: Thu, 03 Sep 2009 19:34:42 -0300 Updates: Status: Fixed Labels: Version-1.2.5 Comment #12 on issue 1277 by sly...@google.com: Add javax.xml.stream to whitelist http://code.google.com/p/googleappengine/issues/detail?id=1277 This has been fixed in the 1.2.5 release. http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes Support for the Stax API, javax.xml.stream. You can now use both the JDK's Stax parser as well as third-party Stax libraries like Woodstox. Can anyone confirm that a vanilla Tapestry 5.1.0.5 works in GAE now? -- 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 -- regards, Jun Tsai -- regards, Jun Tsai -- Dmitry Gusev AnjLab Team http://anjlab.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
how to use PageEvent in tapestry4 to sendRedirect to another page
public void pageValidate(PageEvent event) { //how to use pageEvent to sendRedirect to google.com ? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 : Pop up with grid
Sorry i have said something wrong, RenderSupport is not available in Action Request, only in Ajax Action Request. 2009/10/29 vos sovireak.moe...@gmail.com Hi Christophe, Thanks for your answer. I tried to code with the renderSupport as you told me. here is the javascript for my pop up script type=text/javascript function choisir(choix){ window.opener.document.forms[add_search_form].elements[departure].value=choix; self.close(); } /script and the .java : @Environmental private RenderSupport renderSupport; @OnEvent(value = action, component = selectAddressPoi) public void onSelectEvent(Integer id) { System.out.println(id); String name = this.sgPoiManager.getSgPoiById(id).getName(); this.renderSupport.addScript(choisir( + name + );); } I got this exception when i clicked on my button : No object of type org.apache.tapestry5.RenderSupport is available from the Environment. Available types are org.apache.tapestry5.services.ComponentEventResultProcessor. what is the problem with the renderSupport ? Thanks by advance -- View this message in context: http://www.nabble.com/T5-%3A-Pop-up-with-grid-tp26112459p26113362.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
Login page + post login page .... OR Getting a page from a dispatcher
Hi! I just switched from my own brewed secured page implementation that was based on checking access rights in onActivate() to the smarter more transparent solution outlined in Jumpstart app. I.e. ProtectedPage annotation + ProtecetdPageGateKeeper dispatcher. It works like a charm except for the fact that I have trouble informing the Login page about the failed page so that it can continue on to it after a successful login. My dumb solution managed this The problem I am having is that I dont know how to get hold of the Login page from within the ProtectedPageGateKeeper dispatcher. // Setup Login page to redirect to the secured page after the login Login login = (Login) componentSource.getPage(Login.class); login.setRedirectTo(page); This fails with ... [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.Login java.lang.ClassCastException: com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.Login I have also tried @InjectPage but got null instead of a page. Thanks in advance, Gunnar Eketrapp
Re: how to use PageEvent in tapestry4 to sendRedirect to another page
http://tapestry.apache.org/tapestry5.1/guide/pagenav.html Am 29.10.2009 14:54 schrieb asianCoolz: public void pageValidate(PageEvent event) { //how to use pageEvent to sendRedirect to google.com ? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: how to use PageEvent in tapestry4 to sendRedirect to another page
Em Thu, 29 Oct 2009 12:12:37 -0200, Ulrich Stärk u...@spielviel.de escreveu: http://tapestry.apache.org/tapestry5.1/guide/pagenav.html asianCoolz is asking about Tapestry 4. From the documentation at http://tapestry.apache.org/tapestry4.1/usersguide/events.html: Throw PageRedirectException to activate a different page. -- 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: how to use PageEvent in tapestry4 to sendRedirect to another page
The question was about Tapestry 4. And the answer I guess is to throw a PageRedirectException. Andrus On Oct 29, 2009, at 4:12 PM, Ulrich Stärk wrote: http://tapestry.apache.org/tapestry5.1/guide/pagenav.html Am 29.10.2009 14:54 schrieb asianCoolz: public void pageValidate(PageEvent event) { //how to use pageEvent to sendRedirect to google.com ? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Login page + post login page .... OR Getting a page from a dispatcher
Have your page implement an interface that provides methods for setting the desired information and cast the result from componentSource.getPage() to that interface. The reason behind this is that the thing returned from componentSource is a bytecode-enhanced version of your Login page and thus cannot be cast to your Login class type directly. Uli Am 29.10.2009 15:09 schrieb Gunnar Eketrapp: Hi! I just switched from my own brewed secured page implementation that was based on checking access rights in onActivate() to the smarter more transparent solution outlined in Jumpstart app. I.e. ProtectedPage annotation + ProtecetdPageGateKeeper dispatcher. It works like a charm except for the fact that I have trouble informing the Login page about the failed page so that it can continue on to it after a successful login. My dumb solution managed this The problem I am having is that I dont know how to get hold of the Login page from within the ProtectedPageGateKeeper dispatcher. // Setup Login page to redirect to the secured page after the login Login login = (Login) componentSource.getPage(Login.class); login.setRedirectTo(page); This fails with ... [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.Login java.lang.ClassCastException: com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.Login I have also tried @InjectPage but got null instead of a page. Thanks in advance, Gunnar Eketrapp - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: how to use PageEvent in tapestry4 to sendRedirect to another page
Ahh, I'm so sorry. Yeah, PageRedirectException can be used to force a redirect. Uli Am 29.10.2009 15:15 schrieb Thiago H. de Paula Figueiredo: Em Thu, 29 Oct 2009 12:12:37 -0200, Ulrich Stärk u...@spielviel.de escreveu: http://tapestry.apache.org/tapestry5.1/guide/pagenav.html asianCoolz is asking about Tapestry 4. From the documentation at http://tapestry.apache.org/tapestry4.1/usersguide/events.html: Throw PageRedirectException to activate a different page. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Login page + post login page .... OR Getting a page from a dispatcher
Thanks a lot !!! 2009/10/29 Ulrich Stärk u...@spielviel.de Have your page implement an interface that provides methods for setting the desired information and cast the result from componentSource.getPage() to that interface. The reason behind this is that the thing returned from componentSource is a bytecode-enhanced version of your Login page and thus cannot be cast to your Login class type directly. Uli Am 29.10.2009 15:09 schrieb Gunnar Eketrapp: Hi! I just switched from my own brewed secured page implementation that was based on checking access rights in onActivate() to the smarter more transparent solution outlined in Jumpstart app. I.e. ProtectedPage annotation + ProtecetdPageGateKeeper dispatcher. It works like a charm except for the fact that I have trouble informing the Login page about the failed page so that it can continue on to it after a successful login. My dumb solution managed this The problem I am having is that I dont know how to get hold of the Login page from within the ProtectedPageGateKeeper dispatcher. // Setup Login page to redirect to the secured page after the login Login login = (Login) componentSource.getPage(Login.class); login.setRedirectTo(page); This fails with ... [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.Login java.lang.ClassCastException: com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.Login I have also tried @InjectPage but got null instead of a page. Thanks in advance, Gunnar Eketrapp - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo
Re: Login page + post login page .... OR Getting a page from a dispatcher
Hum ... your advice seemed quite straighforward By some reason I can't cast to the interface either ... Weirdo ... I have rebuild the project and restarted the APP since i thought that the old Login.class could spoke me ... java.lang.ClassCastException com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.ILogin Stack trace - com.tellpoker.services.ProtectedPageGateKeeper.checkAccess(ProtectedPageGateKeeper.java:147) - com.tellpoker.services.ProtectedPageGateKeeper.dispatch(ProtectedPageGateKeeper.java:64) - $Dispatcher_124a0b9d291.dispatch($Dispatcher_124a0b9d291.java) - $Dispatcher_124a0b9d286.dispatch($Dispatcher_124a0b9d286.java) - org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) - com.tellpoker.services.AppModule$1.service(AppModule.java:144) - $RequestFilter_124a0b9d285.service($RequestFilter_124a0b9d285.java) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) - org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - $RequestHandler_124a0b9d27c.service($RequestHandler_124a0b9d27c.java) - org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) - org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) - $HttpServletRequestFilter_124a0b9d27b.service($HttpServletRequestFilter_124a0b9d27b.java) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - $HttpServletRequestHandler_124a0b9d279.service($HttpServletRequestHandler_124a0b9d279.java) - org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) 2009/10/29 Gunnar Eketrapp gunnar.eketr...@gmail.com Thanks a lot !!! 2009/10/29 Ulrich Stärk u...@spielviel.de Have your page implement an interface that provides methods for setting the desired information and cast the result from componentSource.getPage() to that interface. The reason behind this is that the thing returned from componentSource is a bytecode-enhanced version of your Login page and thus cannot be cast to your Login class type directly. Uli Am 29.10.2009 15:09 schrieb Gunnar Eketrapp: Hi! I just switched from my own brewed secured page implementation that was based on checking access rights in onActivate() to the smarter more transparent solution outlined in Jumpstart app. I.e. ProtectedPage annotation + ProtecetdPageGateKeeper dispatcher. It works like a charm except for the fact that I have trouble informing the Login page about the failed page so that it can continue on to it after a successful login. My dumb solution managed this The problem I am having is that I dont know how to get hold of the Login page from within the ProtectedPageGateKeeper dispatcher. // Setup Login page to redirect to the secured page after the login Login login = (Login) componentSource.getPage(Login.class); login.setRedirectTo(page); This fails with ... [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.Login java.lang.ClassCastException: com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.Login I have also tried @InjectPage but got null instead of a page. Thanks in advance, Gunnar
Re: How to write a Testify test for an onActivate() that returns a URL?
olle.hal...@gmail.com wrote on 09/10/2009 16:24:43: I'm struggling with writing a test for a page that just redirects to an external page. The page basically looks like this: public class Redirecter { @Inject private UrlManager urlManager; public Object onActivate() { java.net.URL url = new URL(urlManager.getExternalUrlFor(some-string)); return url; } } I have managed to mock urlManager.getExternalUrlFor(), but then Testify throws java.lang.RuntimeException: TestableResponse: Method sendRedirect() not yet implemented. Sorry for the delay replying - I've been on holiday. TestableResponse and its implementation TestableResponseImpl are a part of Tapestry not Testify. They are bound as a service into the IOC registry in org.apache.tapestry5.internal.test.PageTesterModule so you should be able to get round the problem by subclassing TestableResponseImpl to provide an implementation and then overriding the service. However, there is something unusual happening in PageTesterModule where the service is getting attached to aliases so there might be some fun involved - I haven't got much time to think about it myself at the moment :-(. Also, please raise a JIRA against Tapestry ( https://issues.apache.org/jira/browse/TAP5 ) if you'd like the implementation fixed properly in Tapestry. Paul --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: Testify problem: TapestryTest not in base package
Hi Mats, Sorry for the delay replying - I've been on holiday. Did you get this resolved? I think you'd get this kind of error if you put your tests inside one of Tapestry's controlled packages (e.g. the pages or components packages). Or make your pages subclasses of the test classes. However, if that comment doesn't help let me know and I'll put some more thought into it :-) Paul Mats Henricson m...@henricson.se wrote on 21/10/2009 12:19:30: I'm trying to create a simple smoke test of all pages, like this: @Test public void testRenderPages() { CollectionString pages = classNameLocator.locateClassNames(PAGES_PACKAGE); tellMockitoHowToMock(); for (String page : pages) { String pagePath = getPagePath(page); Document p = tester.renderPage(pagePath); // Assert p doesn't contain Application Exception } } The getPagePath() function converts from com.x.pages.y.Foo to y/Foo. But I get this exception: Caused by: java.lang.RuntimeException: Base class com.formos.tapestry.testify.junit4.TapestryTest (super class of com.x.base.TestifyTest) is not in a controlled package and is therefore not valid. You should try moving the class to package com.x.base. But that is slightly hard to achieve, of course. Anyone has an idea how to solve this problem? Mats --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: Testify and activation context problems
Hi Mats, I use Testify to smoke test our pages, and currently I have problems with a non-empty onActivate() function: public Object onActivate(Long id) { // ... } What do I need to mock to get this onActivate() function to be called? To get the onActivate called, you need to have the id in the URL that you render. For example: tester.renderPage(mypage/1234); // 1234 is the id Based on your other email, I think that means you need to write a smarter getPagePath(page) method to add parameters where appropriate. Paul --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: Testify and activation context problems
Hi Angelo, I attempted to do some page/component testings with PageTester, finally gave up, lately tried again with Testify, and gave up as well, following the tutorials, it works, but when trying to apply the test to an existing project, can not make it work, probably we need some more tutorials to make Testify works, any ideas that you can share regarding page/component testing? I'm now back to test only services. Could you be a bit more specific about what's not working with your existing project? I saw some of your earlier emails, although it looked like you managed to solve your issues - but now I'm back from holiday I can help with anything you're still stuck on. Paul --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Testify question about @Parameter
Hi! I never understand how to inject mock members annotated with @Parameter into a page when testing with Testify. Anyone knows how to do that? Mats PS. Oh, what about @Environmental members? Same question. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 : Pop up with grid
Hi You can also have a look at http://www.chenillekit.org/demo/tapcomp/oneventdemo to see how Ajax call can be made easily with Tapestry and ChenilleKit 2009/10/29 cordenier christophe christophe.corden...@gmail.com And Render Request of course. So you can also re-render the page and use the RenderSupport to add your Javascript. When the user click on the link, try to update the a state in your page (keep it via @Persist or Activation/Passivation), and during re-render, add your javascript call in SetupRender. And Ajax update is maybe cleaner... Excuse me for my previous confusing answers. Regards, Christope. 2009/10/29 cordenier christophe christophe.corden...@gmail.com Sorry i have said something wrong, RenderSupport is not available in Action Request, only in Ajax Action Request. 2009/10/29 vos sovireak.moe...@gmail.com Hi Christophe, Thanks for your answer. I tried to code with the renderSupport as you told me. here is the javascript for my pop up script type=text/javascript function choisir(choix){ window.opener.document.forms[add_search_form].elements[departure].value=choix; self.close(); } /script and the .java : @Environmental private RenderSupport renderSupport; @OnEvent(value = action, component = selectAddressPoi) public void onSelectEvent(Integer id) { System.out.println(id); String name = this.sgPoiManager.getSgPoiById(id).getName(); this.renderSupport.addScript(choisir( + name + );); } I got this exception when i clicked on my button : No object of type org.apache.tapestry5.RenderSupport is available from the Environment. Available types are org.apache.tapestry5.services.ComponentEventResultProcessor. what is the problem with the renderSupport ? Thanks by advance -- View this message in context: http://www.nabble.com/T5-%3A-Pop-up-with-grid-tp26112459p26113362.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
Dictionary ordering in Grid
The ordering in Grid sorts by character value (uppercase before lowercase), not by dictionary order e.g. ADrian Aardvark Adrian Is there an easy way to change this? Szemere
Re: Dictionary ordering in Grid
I guess you're using a List or a Collection as the grid's source. Yes. Thanks for the suggestion, I will take a look at it. I think however that it would be natural to use dictionary order as the default ordering. Do others agree? Szemere
Re: Testify question about @Parameter
I never understand how to inject mock members annotated with @Parameter into a page when testing with Testify. I'm not sure I understand the question. I thought @Parameter only made sense for components - not pages. PS. Oh, what about @Environmental members? Same question. I haven't tried this for testing but, to get things to be available through @Environment, you get hold of (inject or lookup) the Environment service and use the push() and pop() methods. Have a look at this documentation: http://tapestry.apache.org/tapestry5/guide/env.html - Paul --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: [T5] GridDataSource: why call getAvailableRows before prepare?
This could be naive since I don't use the grid, but can't you just store the results in a property of the page/component when getAvailableRows is called? It sounds like you can successfully run the query twice so you must have the info you need at that point. Use a getter method for your query that caches the results? I imagine you must be holding on to them already in order to use them while rendering the page I must be missing something. On Mon, Sep 22, 2008 at 2:18 PM, Franz Amador fgama...@yahoo.com wrote: I'm starting to use Grid to display the paged, sortable results of a Hibernate query, so I'm implementing GridDataSource. I was dismayed to see that getAvailableRows gets called before prepare. This means that I have to run my query twice: once to count the total rows (when getAvailableRows gets called), and again to do the sorting and get the correct page (when prepare gets called). If, instead, prepare got called first, then I could do the sorting and page extraction and get the total number of results all in one query (just add count(*) to the columns being returned). You might ask, how can the system know the page size to ask for when calling prepare if it hasn't called getAvailableRows first? No problem: just ask for the first full page and have prepare return the number of rows it actually found. (Or add a getter for that information.) For fast queries, running them twice isn't that great a sin, but for slow queries, such as in a user-specified search page, running them twice when you don't really have to seems extravagant to me. -- View this message in context: http://www.nabble.com/-T5--GridDataSource%3A-why-call-getAvailableRows-before-prepare--tp19616074p19616074.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 -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Testify question about @Parameter
Em Thu, 29 Oct 2009 15:45:36 -0200, Paul Field paul.fi...@db.com escreveu: I never understand how to inject mock members annotated with @Parameter into a page when testing with Testify. I'm not sure I understand the question. I thought @Parameter only made sense for components - not pages. That's exactly one of the few differences between components and pages in Tapestry 5: components have parameters, pages don't. -- 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: [T5] GridDataSource: why call getAvailableRows before prepare?
Em Thu, 29 Oct 2009 16:00:01 -0200, Josh Canfield j...@thedailytube.com escreveu: This could be naive since I don't use the grid, but can't you just store the results in a property of the page/component when getAvailableRows is called? That's a nice idea. I would just store the results in a property of the GridDataSource implementation, not in the page itself. The idea of having getAvailableRows() invoked before prepare() is that, in the prepare() method, you only fetch the row that will be shown in a given grid rendering. This way, if you have a search that returns 1000 rows but you're only showing 25 per page, you fetch these 25 rows, not 1000. My GridDataSource implementation, in its getAvailableRows() method, executes a query that only returns a count(*), not the rows themselves. They're fetched in prepare(). -- 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
T5: ClasspathResource and performance
Hello out there, We're running a quite busy website with tapestry 5.0.18 and we're hitting a performance problem with the ClasspathResource class. We're using classpath asset and none of them is localised. For each hit on a page using a classpath asset, we end having 2 missed queries on the ClassLoader for potential localized version of the asset. It does not really slow down the application throughput but we end with an __huge__ CPU consumption. The javacore stack shows numerous threads scanning jar files: 3XMTHREADINFO [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' (TID:0x3700E400, sys_thread_t:0x3393D030, state:B, native ID:0x009AB0B3) prio=5 4XESTACKTRACE at java/util/zip/ZipFile.getEntry(ZipFile.java:287(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getEntry(JarFile.java:283(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getJarEntry(JarFile.java:266(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.getResource(URLClassPath.java:949(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.findResource(URLClassPath.java:938(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath.findResource(URLClassPath.java:299(Compiled Code)) 4XESTACKTRACE at java/net/URLClassLoader$3.run(URLClassLoader.java:784(Compiled Code)) 4XESTACKTRACE at java/security/AccessController.doPrivileged(AccessController.java:219) 4XESTACKTRACE at java/net/URLClassLoader.findResource(URLClassLoader.java:781(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:420(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:170(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/FilteringClassLoader.getResourceInternal(FilteringClassLoader.java:89(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:155(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:190(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/ChangeAwareClassLoader.getResource(ChangeAwareClassLoader.java:118(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/ClasspathResource.toURL(ClasspathResource.java:59(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.exists(AbstractResource.java:137(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.forLocale(AbstractResource.java:100(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.findRelativeAsset(AssetSourceImpl.java:99(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.getAsset(AssetSourceImpl.java:93(Compiled Code)) 4XESTACKTRACE at $AssetSource_124955c0e4c.getAsset($AssetSource_124955c0e4c.java(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/transform/AbstractIncludeAssetWorker$1.perform(AbstractIncludeAssetWorker.java:79(Compiled Code)) 4XESTACKTRACE at fr/poleemploi/d2i/tapestry/navigation/unifiee/components/Bandeau.setupRender(Bandeau.java(Compiled Code)) The stack comes from weblogic/aix run but the problem is the same on other platforms as well. Does anyone has ever experienced such problems ? The performance penalty seems to be located in the AbstractResource.forLocale() method, especially the potential.exists() call. This part of code haven't evolved with the 5.1.x version. Does anybody have any idea on how to get around this problem ? Thanks in advance -- ChristianZen - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Login page + post login page .... OR Getting a page from a dispatcher
That's weird. It's exactly how I'm doing it: PageCallbackContainer login = (PageCallbackContainer) componentSource.getPage(Login.class); login.setCallback(new PageCallback(pageName, pageActivationContext, linkSource)); Link link = linkSource.createPageRenderLink(Login.class); response.sendRedirect(link); PageCallbackContainer is the interface implemented by the Login page class. I'm calling it from inside a ComponentRequestFilter but that shouldn't matter. Are you sure that Login really implements ILogin? Cheers, Uli Am 29.10.2009 15:41 schrieb Gunnar Eketrapp: Hum ... your advice seemed quite straighforward By some reason I can't cast to the interface either ... Weirdo ... I have rebuild the project and restarted the APP since i thought that the old Login.class could spoke me ... java.lang.ClassCastException com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.ILogin Stack trace - com.tellpoker.services.ProtectedPageGateKeeper.checkAccess(ProtectedPageGateKeeper.java:147) - com.tellpoker.services.ProtectedPageGateKeeper.dispatch(ProtectedPageGateKeeper.java:64) - $Dispatcher_124a0b9d291.dispatch($Dispatcher_124a0b9d291.java) - $Dispatcher_124a0b9d286.dispatch($Dispatcher_124a0b9d286.java) - org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) - com.tellpoker.services.AppModule$1.service(AppModule.java:144) - $RequestFilter_124a0b9d285.service($RequestFilter_124a0b9d285.java) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) - org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - $RequestHandler_124a0b9d27c.service($RequestHandler_124a0b9d27c.java) - org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) - org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) - $HttpServletRequestFilter_124a0b9d27b.service($HttpServletRequestFilter_124a0b9d27b.java) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - $HttpServletRequestHandler_124a0b9d279.service($HttpServletRequestHandler_124a0b9d279.java) - org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) 2009/10/29 Gunnar Eketrapp gunnar.eketr...@gmail.com Thanks a lot !!! 2009/10/29 Ulrich Stärk u...@spielviel.de Have your page implement an interface that provides methods for setting the desired information and cast the result from componentSource.getPage() to that interface. The reason behind this is that the thing returned from componentSource is a bytecode-enhanced version of your Login page and thus cannot be cast to your Login class type directly. Uli Am 29.10.2009 15:09 schrieb Gunnar Eketrapp: Hi! I just switched from my own brewed secured page implementation that was based on checking access rights in onActivate() to the smarter more transparent solution outlined in Jumpstart app. I.e. ProtectedPage annotation + ProtecetdPageGateKeeper dispatcher. It works like a charm except for the fact that I have trouble informing the Login page about the failed page so that it can continue on to it after a successful login. My dumb solution managed this The problem I am having is that I dont know how to get hold of the Login page from within the ProtectedPageGateKeeper dispatcher. // Setup Login page to redirect to the secured page after the login
Re: T5: ClasspathResource and performance
Doesn't limiting the supported locales to just the ones you support help? http://tapestry.apache.org/tapestry5.0/guide/conf.html Uli Am 29.10.2009 19:39 schrieb Christiansen Merel: Hello out there, We're running a quite busy website with tapestry 5.0.18 and we're hitting a performance problem with the ClasspathResource class. We're using classpath asset and none of them is localised. For each hit on a page using a classpath asset, we end having 2 missed queries on the ClassLoader for potential localized version of the asset. It does not really slow down the application throughput but we end with an __huge__ CPU consumption. The javacore stack shows numerous threads scanning jar files: 3XMTHREADINFO [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' (TID:0x3700E400, sys_thread_t:0x3393D030, state:B, native ID:0x009AB0B3) prio=5 4XESTACKTRACE at java/util/zip/ZipFile.getEntry(ZipFile.java:287(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getEntry(JarFile.java:283(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getJarEntry(JarFile.java:266(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.getResource(URLClassPath.java:949(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.findResource(URLClassPath.java:938(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath.findResource(URLClassPath.java:299(Compiled Code)) 4XESTACKTRACE at java/net/URLClassLoader$3.run(URLClassLoader.java:784(Compiled Code)) 4XESTACKTRACE at java/security/AccessController.doPrivileged(AccessController.java:219) 4XESTACKTRACE at java/net/URLClassLoader.findResource(URLClassLoader.java:781(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:420(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:170(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/FilteringClassLoader.getResourceInternal(FilteringClassLoader.java:89(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:155(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:190(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/ChangeAwareClassLoader.getResource(ChangeAwareClassLoader.java:118(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/ClasspathResource.toURL(ClasspathResource.java:59(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.exists(AbstractResource.java:137(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.forLocale(AbstractResource.java:100(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.findRelativeAsset(AssetSourceImpl.java:99(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.getAsset(AssetSourceImpl.java:93(Compiled Code)) 4XESTACKTRACE at $AssetSource_124955c0e4c.getAsset($AssetSource_124955c0e4c.java(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/transform/AbstractIncludeAssetWorker$1.perform(AbstractIncludeAssetWorker.java:79(Compiled Code)) 4XESTACKTRACE at fr/poleemploi/d2i/tapestry/navigation/unifiee/components/Bandeau.setupRender(Bandeau.java(Compiled Code)) The stack comes from weblogic/aix run but the problem is the same on other platforms as well. Does anyone has ever experienced such problems ? The performance penalty seems to be located in the AbstractResource.forLocale() method, especially the potential.exists() call. This part of code haven't evolved with the 5.1.x version. Does anybody have any idea on how to get around this problem ? Thanks in advance -- ChristianZen - 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: T5: ClasspathResource and performance
Hello i have already encounter this kind of problem, we solved it by using a decorator to cache asset access with something like, it was for Tapestry 5.0.18 : public class AssetSourceCacheDecorator implements AssetSource { private final MapMultiKey, *Asset* cache = CollectionFactory.newConcurrentMap(); private final AssetSource delegate; public AssetSourceCacheDecorator(AssetSource delegate) { this.delegate = delegate; } public *Asset* getAsset(Resource baseResource, String path, Locale locale) { MultiKey key = new MultiKey(path, locale); if (cache.get(key) == null) { * Asset* *asset* = delegate.getAsset(baseResource, path, locale); cache.put(key, *asset*); return *asset*; } return cache.get(key); } public *Asset* getClasspathAsset(String path) { return this.getClasspathAsset(path, null); } public *Asset* getClasspathAsset(String path, Locale locale) { return this.getAsset(null, path, locale); } } Regards, Christophe. 2009/10/29 Christiansen Merel c.me...@otakeh.com Hello out there, We're running a quite busy website with tapestry 5.0.18 and we're hitting a performance problem with the ClasspathResource class. We're using classpath asset and none of them is localised. For each hit on a page using a classpath asset, we end having 2 missed queries on the ClassLoader for potential localized version of the asset. It does not really slow down the application throughput but we end with an __huge__ CPU consumption. The javacore stack shows numerous threads scanning jar files: 3XMTHREADINFO [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' (TID:0x3700E400, sys_thread_t:0x3393D030, state:B, native ID:0x009AB0B3) prio=5 4XESTACKTRACE at java/util/zip/ZipFile.getEntry(ZipFile.java:287(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getEntry(JarFile.java:283(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getJarEntry(JarFile.java:266(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.getResource(URLClassPath.java:949(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.findResource(URLClassPath.java:938(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath.findResource(URLClassPath.java:299(Compiled Code)) 4XESTACKTRACE at java/net/URLClassLoader$3.run(URLClassLoader.java:784(Compiled Code)) 4XESTACKTRACE at java/security/AccessController.doPrivileged(AccessController.java:219) 4XESTACKTRACE at java/net/URLClassLoader.findResource(URLClassLoader.java:781(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:420(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:170(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/FilteringClassLoader.getResourceInternal(FilteringClassLoader.java:89(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:155(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:190(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/ChangeAwareClassLoader.getResource(ChangeAwareClassLoader.java:118(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/ClasspathResource.toURL(ClasspathResource.java:59(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.exists(AbstractResource.java:137(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.forLocale(AbstractResource.java:100(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.findRelativeAsset(AssetSourceImpl.java:99(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.getAsset(AssetSourceImpl.java:93(Compiled Code)) 4XESTACKTRACE at $AssetSource_124955c0e4c.getAsset($AssetSource_124955c0e4c.java(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/transform/AbstractIncludeAssetWorker$1.perform(AbstractIncludeAssetWorker.java:79(Compiled Code)) 4XESTACKTRACE at
Re: T5 : Pop up with grid
I have a simple parent-child page demo at http://lombok.demon.co.uk/tapestry5Demo/test/parentwindow The parent page displays number 1,2,..., n. The child page is a pop up to change n. The entered n from the pop up is returned to the parent page and the parent page is redisplay with the new n. It works in firefox, but not in IE. Shing --- On Thu, 29/10/09, cordenier christophe christophe.corden...@gmail.com wrote: From: cordenier christophe christophe.corden...@gmail.com Subject: Re: T5 : Pop up with grid To: Tapestry users users@tapestry.apache.org Date: Thursday, 29 October, 2009, 10:13 PM And Render Request of course. So you can also re-render the page and use the RenderSupport to add your Javascript. When the user click on the link, try to update the a state in your page (keep it via @Persist or Activation/Passivation), and during re-render, add your javascript call in SetupRender. And Ajax update is maybe cleaner... Excuse me for my previous confusing answers. Regards, Christope. 2009/10/29 cordenier christophe christophe.corden...@gmail.com Sorry i have said something wrong, RenderSupport is not available in Action Request, only in Ajax Action Request. 2009/10/29 vos sovireak.moe...@gmail.com Hi Christophe, Thanks for your answer. I tried to code with the renderSupport as you told me. here is the javascript for my pop up script type=text/javascript function choisir(choix){ window.opener.document.forms[add_search_form].elements[departure].value=choix; self.close(); } /script and the .java : @Environmental private RenderSupport renderSupport; @OnEvent(value = action, component = selectAddressPoi) public void onSelectEvent(Integer id) { System.out.println(id); String name = this.sgPoiManager.getSgPoiById(id).getName(); this.renderSupport.addScript(choisir( + name + );); } I got this exception when i clicked on my button : No object of type org.apache.tapestry5.RenderSupport is available from the Environment. Available types are org.apache.tapestry5.services.ComponentEventResultProcessor. what is the problem with the renderSupport ? Thanks by advance -- View this message in context: http://www.nabble.com/T5-%3A-Pop-up-with-grid-tp26112459p26113362.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: ClasspathResource and performance
Also on there is the tapestry.file-check-interval which specifies how long Tapestry should wait before rechecking for changes. In production, I set that to 1y because the files aren't going to change. However I don't know if this affects asset loading or not, but I *think* that once the first hit returns null it won't keep checking? It's worth a try and it certainly won't harm. Ulrich Stärk wrote: Doesn't limiting the supported locales to just the ones you support help? http://tapestry.apache.org/tapestry5.0/guide/conf.html Uli Am 29.10.2009 19:39 schrieb Christiansen Merel: Hello out there, We're running a quite busy website with tapestry 5.0.18 and we're hitting a performance problem with the ClasspathResource class. We're using classpath asset and none of them is localised. For each hit on a page using a classpath asset, we end having 2 missed queries on the ClassLoader for potential localized version of the asset. It does not really slow down the application throughput but we end with an __huge__ CPU consumption. The javacore stack shows numerous threads scanning jar files: 3XMTHREADINFO [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' (TID:0x3700E400, sys_thread_t:0x3393D030, state:B, native ID:0x009AB0B3) prio=5 4XESTACKTRACE at java/util/zip/ZipFile.getEntry(ZipFile.java:287(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getEntry(JarFile.java:283(Compiled Code)) 4XESTACKTRACE at java/util/jar/JarFile.getJarEntry(JarFile.java:266(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.getResource(URLClassPath.java:949(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath$JarLoader.findResource(URLClassPath.java:938(Compiled Code)) 4XESTACKTRACE at sun/misc/URLClassPath.findResource(URLClassPath.java:299(Compiled Code)) 4XESTACKTRACE at java/net/URLClassLoader$3.run(URLClassLoader.java:784(Compiled Code)) 4XESTACKTRACE at java/security/AccessController.doPrivileged(AccessController.java:219) 4XESTACKTRACE at java/net/URLClassLoader.findResource(URLClassLoader.java:781(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:420(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:170(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/FilteringClassLoader.getResourceInternal(FilteringClassLoader.java:89(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResourceInternal(GenericClassLoader.java:155(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:187(Compiled Code)) 4XESTACKTRACE at java/lang/ClassLoader.getResource(ClassLoader.java:415(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/GenericClassLoader.getResource(GenericClassLoader.java:190(Compiled Code)) 4XESTACKTRACE at weblogic/utils/classloaders/ChangeAwareClassLoader.getResource(ChangeAwareClassLoader.java:118(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/ClasspathResource.toURL(ClasspathResource.java:59(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.exists(AbstractResource.java:137(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/ioc/internal/util/AbstractResource.forLocale(AbstractResource.java:100(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.findRelativeAsset(AssetSourceImpl.java:99(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/services/AssetSourceImpl.getAsset(AssetSourceImpl.java:93(Compiled Code)) 4XESTACKTRACE at $AssetSource_124955c0e4c.getAsset($AssetSource_124955c0e4c.java(Compiled Code)) 4XESTACKTRACE at org/apache/tapestry5/internal/transform/AbstractIncludeAssetWorker$1.perform(AbstractIncludeAssetWorker.java:79(Compiled Code)) 4XESTACKTRACE at fr/poleemploi/d2i/tapestry/navigation/unifiee/components/Bandeau.setupRender(Bandeau.java(Compiled Code)) The stack comes from weblogic/aix run but the problem is the same on other platforms as well. Does anyone has ever experienced such problems ? The performance penalty seems to be located in the AbstractResource.forLocale() method, especially the potential.exists() call. This part of code haven't evolved with the 5.1.x version. Does anybody have any idea on how to get around this problem
Re: Login page + post login page .... OR Getting a page from a dispatcher
Hi! Yeaa 100% sure ! // Setup Login page to redirect to the secured page after the login Object obj = componentSource.getPage(Login.class); ILogin login = (ILogin) obj; login.setRedirectTo(page); I am using T5.1.0.5 by the way. /Gunnar 2009/10/29 Ulrich Stärk u...@spielviel.de That's weird. It's exactly how I'm doing it: PageCallbackContainer login = (PageCallbackContainer) componentSource.getPage(Login.class); login.setCallback(new PageCallback(pageName, pageActivationContext, linkSource)); Link link = linkSource.createPageRenderLink(Login.class); response.sendRedirect(link); PageCallbackContainer is the interface implemented by the Login page class. I'm calling it from inside a ComponentRequestFilter but that shouldn't matter. Are you sure that Login really implements ILogin? Cheers, Uli Am 29.10.2009 15:41 schrieb Gunnar Eketrapp: Hum ... your advice seemed quite straighforward By some reason I can't cast to the interface either ... Weirdo ... I have rebuild the project and restarted the APP since i thought that the old Login.class could spoke me ... java.lang.ClassCastException com.tellpoker.pages.Login cannot be cast to com.tellpoker.pages.ILogin Stack trace - com.tellpoker.services.ProtectedPageGateKeeper.checkAccess(ProtectedPageGateKeeper.java:147) - com.tellpoker.services.ProtectedPageGateKeeper.dispatch(ProtectedPageGateKeeper.java:64) - $Dispatcher_124a0b9d291.dispatch($Dispatcher_124a0b9d291.java) - $Dispatcher_124a0b9d286.dispatch($Dispatcher_124a0b9d286.java) - org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) - com.tellpoker.services.AppModule$1.service(AppModule.java:144) - $RequestFilter_124a0b9d285.service($RequestFilter_124a0b9d285.java) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) - org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) - org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java) - $RequestHandler_124a0b9d27c.service($RequestHandler_124a0b9d27c.java) - org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) - org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) - $HttpServletRequestFilter_124a0b9d27b.service($HttpServletRequestFilter_124a0b9d27b.java) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java) - $HttpServletRequestHandler_124a0b9d279.service($HttpServletRequestHandler_124a0b9d279.java) - org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) 2009/10/29 Gunnar Eketrapp gunnar.eketr...@gmail.com Thanks a lot !!! 2009/10/29 Ulrich Stärk u...@spielviel.de Have your page implement an interface that provides methods for setting the desired information and cast the result from componentSource.getPage() to that interface. The reason behind this is that the thing returned from componentSource is a bytecode-enhanced version of your Login page and thus cannot be cast to your Login class type directly. Uli Am 29.10.2009 15:09 schrieb Gunnar Eketrapp: Hi! I just switched from my own brewed secured page implementation that was based on checking access rights in onActivate() to the smarter more transparent solution outlined in Jumpstart app. I.e. ProtectedPage annotation + ProtecetdPageGateKeeper dispatcher. It works like a charm except for the
Re: Login page + post login page .... OR Getting a page from a dispatcher
Em Thu, 29 Oct 2009 18:23:37 -0200, Gunnar Eketrapp gunnar.eketr...@gmail.com escreveu: Hi! Hi! Yeaa 100% sure ! So where is ILogin located? It shouldn't be in the pages, components, mixins nor base packages, as it would be enhanced by Tapestry. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Login page + post login page .... OR Getting a page from a dispatcher
Aha! One moment! 2009/10/29 Thiago H. de Paula Figueiredo thiag...@gmail.com Em Thu, 29 Oct 2009 18:23:37 -0200, Gunnar Eketrapp gunnar.eketr...@gmail.com escreveu: Hi! Hi! Yeaa 100% sure ! So where is ILogin located? It shouldn't be in the pages, components, mixins nor base packages, as it would be enhanced by Tapestry. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo
Re: Login page + post login page .... OR Getting a page from a dispatcher
Super thanks now it works! 2009/10/29 Gunnar Eketrapp gunnar.eketr...@gmail.com Aha! One moment! 2009/10/29 Thiago H. de Paula Figueiredo thiag...@gmail.com Em Thu, 29 Oct 2009 18:23:37 -0200, Gunnar Eketrapp gunnar.eketr...@gmail.com escreveu: Hi! Hi! Yeaa 100% sure ! So where is ILogin located? It shouldn't be in the pages, components, mixins nor base packages, as it would be enhanced by Tapestry. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo
Re: Adding servlets to a T5 app ...
Hi! For some reason my method to ignore path's does not get called! public static void contributeIgnoredPathsFilter(ConfigurationString configuration) { } Any clue anyone? Thanks in advance! /Gunnar Eketrapp 2009/10/27 Gunnar Eketrapp gunnar.eketr...@gmail.com Great and Thanks! 2009/10/26 Thiago H. de Paula Figueiredo thiag...@gmail.com Em Mon, 26 Oct 2009 14:46:32 -0200, Gunnar Eketrapp gunnar.eketr...@gmail.com escreveu: Hi! Hi! So I would like to configure some url:s within my app to be served by these servlets. Out-of-the-box, you shouldn't have any problems, as Tapestry is a servlet filter, not a servlet. It is possible that Tapestry handles some requests that should be handled by something else (i.e. your servlets). In this case, take a look at the Ignored Paths section in http://tapestry.apache.org/tapestry5.1/guide/conf.html. -- 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 -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo
Re: Adding servlets to a T5 app ...
I was wrong it does get called but it seems like T5 handles my servlet pathes anyway 2009/10/29 Gunnar Eketrapp gunnar.eketr...@gmail.com Hi! For some reason my method to ignore path's does not get called! public static void contributeIgnoredPathsFilter(ConfigurationString configuration) { } Any clue anyone? Thanks in advance! /Gunnar Eketrapp 2009/10/27 Gunnar Eketrapp gunnar.eketr...@gmail.com Great and Thanks! 2009/10/26 Thiago H. de Paula Figueiredo thiag...@gmail.com Em Mon, 26 Oct 2009 14:46:32 -0200, Gunnar Eketrapp gunnar.eketr...@gmail.com escreveu: Hi! Hi! So I would like to configure some url:s within my app to be served by these servlets. Out-of-the-box, you shouldn't have any problems, as Tapestry is a servlet filter, not a servlet. It is possible that Tapestry handles some requests that should be handled by something else (i.e. your servlets). In this case, take a look at the Ignored Paths section in http://tapestry.apache.org/tapestry5.1/guide/conf.html. -- 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 -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo
Re: Adding servlets to a T5 app ...
Em Thu, 29 Oct 2009 19:37:37 -0200, Gunnar Eketrapp gunnar.eketr...@gmail.com escreveu: I was wrong it does get called but it seems like T5 handles my servlet pathes anyway Please post your whole contributeIgnoredPathsFilter method. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Adding servlets to a T5 app ...
Hi Thiago! I found the problem. I had added /foo/.* and /bar/.* but that didn't ignore /foo + /bar so I had to add them as well. Thanks anyway and sorry for disturbing you! Thanks again for the help with Login / ILogin. /Gunnar 2009/10/29 Thiago H. de Paula Figueiredo thiag...@gmail.com Em Thu, 29 Oct 2009 19:37:37 -0200, Gunnar Eketrapp gunnar.eketr...@gmail.com escreveu: I was wrong it does get called but it seems like T5 handles my servlet pathes anyway Please post your whole contributeIgnoredPathsFilter method. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo
T5.1.0.5 on JBoss 5.1.0 = no standard components
hi, i'm trying to deploy my application on JBoss and just run into a problem. although deployment went fine, seems that tapestry components have not been registered. i got a message about available pages components: 01:12:03,575 INFO [STDOUT] - Available pages: ApplicationBasePage: org.myapp.web.tapestry.pages.ApplicationBasePage .. .. 01:12:03,575 INFO [STDOUT] - Available components: Filter: org.myapp.web.tapestry.components.Filter .. .. but there is nothing about internal Tapestry components (like if, loop or output for example). this results of course with exceptions when visiting pages. I thought it may be problem of duplicated jar files (javassist and simmilar) but now, my war contains actually tapestry and spring jars only and nothing has changed. any ideas what might be the reason? thanks, m. -- View this message in context: http://www.nabble.com/T5.1.0.5-on-JBoss-5.1.0-%3D-no-standard-components-tp26123165p26123165.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: T5.1.0.5 on JBoss 5.1.0 = no standard components
It's just a wild guess, but check if the Tapestry JARs are corrupted. This can cause all sorts of strange behaviour. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5.1.0.5 on JBoss 5.1.0 = no standard components
I don't of any a solution to making T5 work with JBoss 5.1.*, but it's fine with 5.0.1 if you follow http://wiki.apache.org/tapestry/HowToRunTapestry5OnJBoss5 . On 30/10/2009, at 11:42 AM, Thiago H. de Paula Figueiredo wrote: It's just a wild guess, but check if the Tapestry JARs are corrupted. This can cause all sorts of strange behaviour. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5:how to support AJAX submit
Currently the Editor component does not support an asynchronous submit (AJAX). for example: 1.build a form with submit button to save data to database. 2.add a mixins which listening click event to this submit button with ajax request callback. 3.when user click this submit button,the form will submit return. 4.so ajax request maybe be handled,but callback will lost,since the form submit. and how to use post way in ajax, so that tapestry event handler counld accept the ajax post? do you have idea on it? -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: www.cleverpig.name Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org