Re: Questions for Tapestry 5
Hi Jacques * Is there a searchable archive of mailing list? > See here: http://wiki.apache.org/tapestry/Tapestry5HowTos (top of the > page) - using Google. Cheers, Erik
Re: Startup error - java.lang.NoSuchMethodError: org.apache.tapestry.services.ApplicationInitializer.initialize
You can't, and don't want to, mix and match tapestry-spring 5.0.5 with Tapestry 4. There's some confusion here, because there's a legacy Tapestry/Spring integration library for Tapestry 4. Tapestry 5 has that as an sub-project of Tapestry 5 ... in T4 it was external. On 9/28/07, mxc <[EMAIL PROTECTED]> wrote: > > > I am using a maven based build for my tapestry project. I build and deploy > the app but it throws an error when I try and connect via a web browser > tomcat throughs the following error. I assume I am mssing something from > my > pom.xml. > > > > java.lang.NoSuchMethodError: > org.apache.tapestry.services.ApplicationInitializer.initialize > (Ljavax/servlet/http/HttpServlet;)V > at > org.apache.tapestry.ApplicationServlet.initializeApplication( > ApplicationServlet.java:302) > at > org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:201) > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java > :1044) > at > org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java > :701) > at > org.apache.catalina.core.StandardWrapperValve.invoke( > StandardWrapperValve.java:144) > at > org.apache.catalina.core.StandardValveContext.invokeNext( > StandardValveContext.java:104) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java > :520) > at > org.apache.catalina.core.StandardContextValve.invokeInternal( > StandardContextValve.java:198) > at > org.apache.catalina.core.StandardContextValve.invoke( > StandardContextValve.java:152) > at > org.apache.catalina.core.StandardValveContext.invokeNext( > StandardValveContext.java:104) > > > > org.apache.tapestry > tapestry-spring > 5.0.5 > > > org.apache.tapestry > tapestry-contrib > 4.1.3 > > > org.apache.tapestry > tapestry-annotations > 4.1.3 > > > org.apache.tapestry > tapestry-framework > 4.1.3 > > > Any help appreciated. > > Thanks > > -- > View this message in context: > http://www.nabble.com/Startup-error---java.lang.NoSuchMethodError%3A-org.apache.tapestry.services.ApplicationInitializer.initialize-tf4533213.html#a12936924 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
RE: Default package file
Would be glad to provide both... where in the source code should I start looking to add? > -Original Message- > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] > Sent: Friday, September 28, 2007 12:11 PM > To: Tapestry users > Subject: Re: Default package file > > That's not a feature currently supported. If interested, add a JIRA issue > (and a patch would be nice). > > On 9/28/07, Jean-Philippe Steinmetz <[EMAIL PROTECTED]> wrote: > > > > So part of my app has a series of packages for pages to make URLs (and > > life) > > easier. My question is how do I create an index-like class for these > > packages? I have tried creating a new Start.java in each of them and > that > > seems to have not made a difference. Thanks. > > > > > > > > Jean-Philippe Steinmetz > > > > > > > -- > Howard M. Lewis Ship > Partner and Senior Architect at Feature50 > > Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Upgrade to 5.0.6-SNAPSHOT
from http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ - Tapestry templates now use the extension .tml (not .html). Page templates in the context are now stored at the root, not under WEB-INF. from http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/templates.html - Component templates are stored with the component class file. The files have a ".tml" extension (i.e., *T*apestry *M*arkup *L*anguage), and are stored in the same package as corresponding component class ( src/main/resources/.../components/). - For *pages* (not *components*), a second location will be searched: in the web application context. The location is based on the logical name of the page, in the previous example, the template would be MyPage.tml in the root folder of the web application. A template on the classpath ( src/main/resources/.../pages/) takes precedence over a file in the web application context. Thank you Borut. Marcus
Re: Questions for Tapestry 5
Thanks Robin, I'm now using 5.0.6 snapshot. I get a warning about log4j but I don't need this for now. - Jacques Robin Helgelin wrote: > >> Hi! > > Hi. > >> I am a Tapestry newbie and want to start directly by using Tapesry 5. I >> think that Tapestry have a lot of potential and that it can grow into a >> large community. > > Good choice :) > >> * How can I modify the QuickStart archetype >> (http://tapestry.formos.com/nightly/tapestry5/quickstart/) to load in >> Meaven the 5.0.6 nightlies and not 5.0.5? > > Look at the end of that page, "About snapshots". Just change > -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository > to the new snapshot repository at tapestry.formos.com. Maybe you have > to edit the pom.xml after the quickstart as well, not sure. > > -- > regards, > Robin > -- View this message in context: http://www.nabble.com/Questions-for-Tapestry-5-tf4535742.html#a12947060 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default package file
That's not a feature currently supported. If interested, add a JIRA issue (and a patch would be nice). On 9/28/07, Jean-Philippe Steinmetz <[EMAIL PROTECTED]> wrote: > > So part of my app has a series of packages for pages to make URLs (and > life) > easier. My question is how do I create an index-like class for these > packages? I have tried creating a new Start.java in each of them and that > seems to have not made a difference. Thanks. > > > > Jean-Philippe Steinmetz > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: T5: Upgrade to 5.0.6-SNAPSHOT
On 9/28/07, Marcus <[EMAIL PROTECTED]> wrote: > Hi Borut, > > It works if i rename Start.html to Start.tml and put in webapp folder. > But, it's correct? all my templates have to renamed to *.tml? > Seems like a very strange behavior, at least for me. That is because T5 needs it's markup files to be strict xml, as opposite from the output which can be SGML (HTML4) or XML (XHTML), or ... -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Questions for Tapestry 5
On 9/28/07, BLIER, Jacques <[EMAIL PROTECTED]> wrote: > Hi! Hi. > I am a Tapestry newbie and want to start directly by using Tapesry 5. I think > that Tapestry have a lot of potential and that it can grow into a large > community. Good choice :) > * How can I modify the QuickStart archetype > (http://tapestry.formos.com/nightly/tapestry5/quickstart/) to load in Meaven > the 5.0.6 nightlies and not 5.0.5? Look at the end of that page, "About snapshots". Just change -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository to the new snapshot repository at tapestry.formos.com. Maybe you have to edit the pom.xml after the quickstart as well, not sure. -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Default package file
So part of my app has a series of packages for pages to make URLs (and life) easier. My question is how do I create an index-like class for these packages? I have tried creating a new Start.java in each of them and that seems to have not made a difference. Thanks. Jean-Philippe Steinmetz
Re: T5: Upgrade to 5.0.6-SNAPSHOT
See http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/templates.html under Template location. 2007/9/28, Marcus <[EMAIL PROTECTED]>: > > Hi Borut, > > It works if i rename Start.html to Start.tml and put in webapp folder. > But, it's correct? all my templates have to renamed to *.tml? > Seems like a very strange behavior, at least for me. > I think i will wait for oficial release 5.0.6. > > Thanks. > > Marcus >
Re: Questions for Tapestry 5
OK! Question 3 and 4 are resolved since I finally found out about this forum. jblier wrote: > > Here are a few questions: > > * When do you plan to release 5.0.6? > * How can I modify the QuickStart archetype > (http://tapestry.formos.com/nightly/tapestry5/quickstart/) to load in > Meaven the 5.0.6 nightlies and not 5.0.5? > * Do you plan to open a developer forum? > * Is there a searchable archive of mailing list? > * Finally, are there training available for Typestry 5? And if so, what > are the costs and accomodations? > -- View this message in context: http://www.nabble.com/Questions-for-Tapestry-5-tf4535742.html#a12945957 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Navigation Issue
That's a relief. On 9/28/07, Jean-Philippe Steinmetz <[EMAIL PROTECTED]> wrote: > > So nevermind about this one... I'm an idiot and forgot to set the variable > in onActivate. Since I use the variable to pull data it didn't seem > obvious > at first. Thanks for the help > > > -Original Message- > > From: Jean-Philippe Steinmetz [mailto:[EMAIL PROTECTED] > > Sent: Friday, September 28, 2007 11:09 AM > > To: 'Tapestry users' > > Subject: RE: [T5] Navigation Issue > > > > Here is a copy of the stdout I am getting when I first request the page > > and > > then when I request the following grid page. > > > > I do not use a form in my page. It's strictly a detail view. > > > > > -Original Message- > > > From: Marcus [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, September 27, 2007 6:08 PM > > > To: Tapestry users > > > Subject: Re: [T5] Navigation Issue > > > > > > Hi Jean, > > > > > > Can you show the stacktrace? > > > Your template have grid component inside a form? If yes, remove a form > > > tag. > > > I had some problems with grid inside a form when my source list is too > > > big. > > > > > > Marcus > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: [T5] Navigation Issue
It's odd. t:ac query parameter should be the page's activation context, it should be "15". I'll have to check the code. On 9/28/07, Jean-Philippe Steinmetz <[EMAIL PROTECTED]> wrote: > > Here is a copy of the stdout I am getting when I first request the page > and > then when I request the following grid page. > > I do not use a form in my page. It's strictly a detail view. > > > -Original Message- > > From: Marcus [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 27, 2007 6:08 PM > > To: Tapestry users > > Subject: Re: [T5] Navigation Issue > > > > Hi Jean, > > > > Can you show the stacktrace? > > Your template have grid component inside a form? If yes, remove a form > > tag. > > I had some problems with grid inside a form when my source list is too > > big. > > > > Marcus > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
RE: [T5] Navigation Issue
So nevermind about this one... I'm an idiot and forgot to set the variable in onActivate. Since I use the variable to pull data it didn't seem obvious at first. Thanks for the help > -Original Message- > From: Jean-Philippe Steinmetz [mailto:[EMAIL PROTECTED] > Sent: Friday, September 28, 2007 11:09 AM > To: 'Tapestry users' > Subject: RE: [T5] Navigation Issue > > Here is a copy of the stdout I am getting when I first request the page > and > then when I request the following grid page. > > I do not use a form in my page. It's strictly a detail view. > > > -Original Message- > > From: Marcus [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 27, 2007 6:08 PM > > To: Tapestry users > > Subject: Re: [T5] Navigation Issue > > > > Hi Jean, > > > > Can you show the stacktrace? > > Your template have grid component inside a form? If yes, remove a form > > tag. > > I had some problems with grid inside a form when my source list is too > > big. > > > > Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [T5] Navigation Issue
Here is a copy of the stdout I am getting when I first request the page and then when I request the following grid page. I do not use a form in my page. It's strictly a detail view. > -Original Message- > From: Marcus [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 27, 2007 6:08 PM > To: Tapestry users > Subject: Re: [T5] Navigation Issue > > Hi Jean, > > Can you show the stacktrace? > Your template have grid component inside a form? If yes, remove a form > tag. > I had some problems with grid inside a form when my source list is too > big. > > Marcus java.lang.NullPointerException [ERROR] Delete Listener ComponentPageElement[Classrooms/Delete] failed during page detach: Error persisting field Classrooms/Delete:classID: java.lang.NullPointerException org.apache.tapestry.ioc.internal.util.TapestryException: Error persisting field Classrooms/Delete:classID: java.lang.NullPointerException at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:935) at org.apache.tapestry.internal.structure.ComponentPageElementImpl.containingPageDidDetach(ComponentPageElementImpl.java:729) at org.apache.tapestry.internal.structure.PageImpl.detached(PageImpl.java:122) at org.apache.tapestry.internal.services.PagePoolImpl.release(PagePoolImpl.java:79) at $PagePool_1154d4bd301.release($PagePool_1154d4bd301.java) at org.apache.tapestry.internal.services.RequestPageCacheImpl.threadDidCleanup(RequestPageCacheImpl.java:61) at org.apache.tapestry.ioc.internal.services.ThreadCleanupHubImpl.cleanup(ThreadCleanupHubImpl.java:68) at org.apache.tapestry.ioc.internal.RegistryImpl.cleanupThread(RegistryImpl.java:257) at org.apache.tapestry.ioc.internal.RegistryWrapper.cleanupThread(RegistryWrapper.java:36) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:143) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.tapestry.ioc.internal.util.TapestryException: Error persisting field Classrooms/Delete:classID: java.lang.NullPointerException at org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.persistFieldChange(InternalComponentResourcesImpl.java:180) at edu.usc.k12.cpanel.pages.Classrooms.Delete._$write_classID(Delete.java) at edu.usc.k12.cpanel.pages.Classrooms.Delete.pageDetached(Delete.java:89) at edu.usc.k12.cpanel.pages.Classrooms.Delete.containingPageDidDetach(Delete.java) at org.apache.tapestry.internal.structure.ComponentPageElementImpl$2.run(ComponentPageElementImpl.java:84) at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:923) ... 21 more Caused by: java.lang.NullPointerException at $Request_1154d4bd312.getSession($Request_1154d4bd312.java) at $Request_1154d4bd2e4.getSession($Request_1154d4bd2e4.java) at org.apache.tapestry.internal.services.AbstractSessionPersistentFieldStrategy.postChange(AbstractSessionPersistentFieldStrategy.java:109) at org.apache.tapestry.internal.services.PersistentFieldManagerImpl.postChange(PersistentFieldManagerImpl.java:78) at $PersistentFieldManager_1154d4bd305.postChange($PersistentFieldManager_1154d4bd305.java) at org.apache.tapestry.internal.structure.PageImpl.persistFieldChange(PageImpl.java:168) at org.apache.tapestry.internal.structure.ComponentPageElementImpl.persistFieldChange(ComponentPageElementImpl.java:954) at org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.persistFieldChange(InternalComponentResourcesImpl.java:176) ... 26 more [ERROR] PagePool Page Page[Classrooms/Delete en] is dirty, and will be discarded (rather than returned to the page pool). [ERROR] Details Render queue error in Expansion[PropBinding[expansion Classrooms/Details(currentCla
Re: T5: Upgrade to 5.0.6-SNAPSHOT
Hi Borut, It works if i rename Start.html to Start.tml and put in webapp folder. But, it's correct? all my templates have to renamed to *.tml? Seems like a very strange behavior, at least for me. I think i will wait for oficial release 5.0.6. Thanks. Marcus
Questions for Tapestry 5
Hi! I am a Tapestry newbie and want to start directly by using Tapesry 5. I think that Tapestry have a lot of potential and that it can grow into a large community. Here are a few questions: * When do you plan to release 5.0.6? * How can I modify the QuickStart archetype (http://tapestry.formos.com/nightly/tapestry5/quickstart/) to load in Meaven the 5.0.6 nightlies and not 5.0.5? * Do you plan to open a developer forum? * Is there a searchable archive of mailing list? * Finally, are there training available for Typestry 5? And if so, what are the costs and accomodations? Regards, Jacques R. Blier R&D Airwide Solutions (Montréal)
Re: Specifying BlockingDialog Resources
Vity: Thanks for the help; that's good to know. In the meantime, the simple resources are working for me. There's one odd thing though: I have this Task set to BlockingScope.WINDOW, and when the dialog comes up, it is centered on the button that launched the Task. It loos odd, since I'd expect it to be centered on the Window. Does anyone know if this is actually the intended behavior? Ciao! -Steev. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: when/where to contribute a PageRenderCommand
I'm creating something like DocumentScriptBuilder for inserting stylesheets, much like DocumentScriptBuilderImpl does for javascripts. I have this method in my app module, inspired by the method in TapestryModule: public void contributePageRenderInitializer(OrderedConfiguration configuration) { configuration.add("DocumentStyleBuilder", new PageRenderCommand() { public void cleanup(Environment environment) { DocumentStyleBuilder builder = environment.pop(DocumentStyleBuilder.class); Document doc = environment.peek(Document.class); builder.updateDocument(doc); } public void setup(Environment environment) { environment.push(DocumentStyleBuilder.class, new DocumentStyleBuilderImpl()); } }, "before:PageRenderSupport"); } When I try to inject this via @Environmental, a RuntimeException is thrown with this message: "No object of type xxx.services.DocumentStyleBuilder is available from the Environment. Available types are ." With logging I've verified that this is thrown _before_ my contribution is called, suggesting that the page using the @Environmental (my Start page) is initialized before my contribution is called. I tried using "before:PageRenderSupport" as a constraint to no avail. How can I get my object into the environment, since mimicking what's in TapestryModule doesn't seem to work? thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Upgrade to 5.0.6-SNAPSHOT
On 9/28/07, Marcus <[EMAIL PROTECTED]> wrote: > Hi lasitha, > Same error, but I'm using 5.0.6_SNAPSHOT, I'm sure the template is there. > > Nick, > Yes, I rename the file to Start.html. That should be Start.tml from a few days again. -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Checking for a logged in user globally
The logic used by the IoC container is the same whether its injecting via a service binder method or by the constructor of the implementation class. On 9/28/07, Chris Lewis <[EMAIL PROTECTED]> wrote: > > The only interface I implement is Dispatcher, so all should be good. > Thanks for the pointer on bind() - I will use it. Will I then need to > use @Inject/@InjectService in my constructor, or will the container > "see" the needed arguments? > > Howard Lewis Ship wrote: > > Looks pretty reasonable to me. > > > > You're building the hard way: > > > > public static void bind(ServiceBinder binder) { > > binder.bind(Dispatcher.class, SingletonAccessControllerImpl.class > > ).withId("AccessController"); > > } > > > > The only other issue (I'd have to check) is to ensure that the > interfaces > > you are implementing are all public, not internal. > > > > On 9/27/07, Chris Lewis <[EMAIL PROTECTED]> wrote: > > > >> Hi Ben, > >> > >> I asked a question like this some time ago, and I've made some good > >> progress like this. I have the same basic requirements as you and > >> specifically do not want my pages to deal with > >> authentication/restriction AT ALL. I did some reading about request > >> handling as well as digging through the source (specifically > >> TapestryModule) and realized I should be able to achieve this by > >> contributing a Dispatcher to the MasterDispatcher service, such that it > >> sits before the render and action dispatchers. My attention has been > >> temporarily diverted so I haven't worked on it the last few days, but > >> here's the basic code for I've done so far. > >> > >> In my app module: > >> > >> public Dispatcher buildAccessController( > >> Map configuration, > >> @InjectService("ApplicationStateManager") > >> ApplicationStateManager asm > >> ) { > >> return new SingletonAccessControllerImpl(configuration, asm); > >> } > >> > >> public void > >> contributeMasterDispatcher(OrderedConfiguration > configuration, > >> @InjectService("AccessController") Dispatcher accessControl) { > >> configuration.add("AccessController", accessControl, > >> "before:PageRender"); > >> } > >> > >> I intend to use ApplicationStateManager to grab client/session/request > >> specific ASOs (namely a User/permissions object), so I can use a > >> singleton access controller and still access user-specific data. The > >> contribution puts my dispatcher ahead of the page and action > >> dispatchers. AFAIK this is not in the docs but its quite clear in the > >> TapestryModule. > >> > >> And here is my (test) dispatch implementation: > >> > >> public boolean dispatch(Request request, Response response) throws > >> IOException { > >> boolean canAccess = true; > >> > >> //...Access control logic using the ApplicationStateManager > >> > >> return ! canAccess; > >> } > >> > >> The inverted return will halt processing of the request if canAccess is > >> true (see docs/src for Dispatcher). Throwing a kind of access exception > >> would probably do the trick as well. > >> > >> I hope this helps, and if you make good progress do share. > >> > >> Also, Howard if you see anything obviously wrong or "bad" with this > >> method, please share :-). > >> > >> chris > >> > >> Ben Tomasini wrote: > >> > >>> Hi, > >>> > >>> I am working on an application that requires a logged in user for > access > >>> > >> to > >> > >>> any of the pages. My plan is to create a login form and store the > >>> > >> logged in > >> > >>> user in an ASO. I understand that I can implement an onActivate() on > >>> > >> each > >> > >>> of my pages, check to see if the user exists in the ASO, and if not, > >>> redirect the user to the login page. I could put this method into an > >>> abstract page which all of my pages extend from; however, I would > rather > >>> > >> not > >> > >>> put that kind of constraint and burden on page development. > >>> > >>> Is there a more global way to enforce that an ASO exists, and if not, > >>> redirect to a page? > >>> > >>> Ben > >>> > >>> > >>> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > > > > > > > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
Re: T5: Upgrade to 5.0.6-SNAPSHOT
I downloaded the sources, build them and installed artifacts. I did not put anything in jetty/ext (some jars were already there, including log4j 1.2.8). I ran the quickstart archetype, corrected tapestry-release-version and log4j version, renamed Start.html to Start.tml and moved it to webapp directory. Started jetty and it worked. 2007/9/28, Marcus <[EMAIL PROTECTED]>: > > Hi lasitha, > Same error, but I'm using 5.0.6_SNAPSHOT, I'm sure the template is there. > > Nick, > Yes, I rename the file to Start.html. > > Robin, > Yes, I tried all 3 possible locations (webapp, webapp/WEB-INF, and > /src/main/resources//pages). > > Borut, > Like I said, I'm using mvn ... -DremoteRepositories= > http://tapestry.formos.com/maven-snapshot-repository to create a new > project. > > > but still not working :) > > thanks. > > Marcus >
Re: T5: Upgrade to 5.0.6-SNAPSHOT
Hi lasitha, Same error, but I'm using 5.0.6_SNAPSHOT, I'm sure the template is there. Nick, Yes, I rename the file to Start.html. Robin, Yes, I tried all 3 possible locations (webapp, webapp/WEB-INF, and /src/main/resources//pages). Borut, Like I said, I'm using mvn ... -DremoteRepositories= http://tapestry.formos.com/maven-snapshot-repository to create a new project. but still not working :) thanks. Marcus
Re: Table with large data set
Any news on this? I am facing the same problem; large datasets in a HTML table. Greetings, Marcel James Carman wrote: > > Chris, > > Well, some of the code uses other classes that are part of the project I'm > on. I need to refactor it out so that it can stand alone. I'll try to do > that soon. Sorry for the delay. > > James > >> James, >> >> Any chance you could share that HibernateTableModel code? >> >> Much Appreciated, >> >> ~chris >> >> On 7/19/06, Jonathan Barker <[EMAIL PROTECTED]> wrote: >>> >>> +1 for wiki or SVN >>> >>> Jonathan >>> >>> >>> -Original Message- >>> From: James Carman [mailto:[EMAIL PROTECTED] >>> Sent: Wednesday, July 19, 2006 4:38 PM >>> To: 'Tapestry users' >>> Subject: RE: Table with large data set >>> >>> I have a HibernateTableModel (an IBasicTableModel impl) if you're >>> interested. There's only one issue which I couldn't really overcome >>> nicely. >>> It has to do with the sorting of the columns. I didn't want to give up >>> the >>> ability to easily define my columns in the HTML (using the columns >>> attribute >>> of the @contrib:Table component), so I put in a little hack. Basically, >>> what you return from your DAO methods is a PagingQueryResult object >>> which >>> is >>> what the HibernateTableModel uses to ask for the data for each page. >>> But, >>> in each PagingQueryResult you have to "register" what columns are >>> sortable >>> and how you sort them. Anyway, I'll email it to you Chris if you want >>> it. >>> Or, if there is more interest, I'll package it up nicely and put it in >>> my >>> SVN repository. >>> >>> >>> -Original Message- >>> From: Chris Chiappone [mailto:[EMAIL PROTECTED] >>> Sent: Wednesday, July 19, 2006 2:23 PM >>> To: Tapestry List >>> Subject: Table with large data set >>> >>> I was wondering what the best approach would be for creating a >>> contrib:Table >>> with a large data set. My dataSet my contain thousands of entry's and >>> loading the page using contrib:Table would take forever not to mention >>> consume large amounts of memory. Currently I am getting the data from >>> Hibernate. What have you guys done to load just the data needed for the >>> current page then load the next pages data when using tablePages. >>> >>> Thanks, >>> >>> -- >>> ~chris >>> >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> -- >> ~chris >> > > > James Carman, President > Carman Consulting, Inc. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Table-with-large-data-set-tf1968004.html#a12939173 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] Problem with multiple forms in a loop
I have a problem with using forms in components where the data model is passed to the components via parameter inside a T5 loop component. When a form is submitted the data model seems to be lost. What I'm trying to do is to iterate through a collection of users and construct a form for each user where a user name can be edited. Each form resides in a component that handles submission. The user model data is passed to the component inside a page where a loop loops through a collection of users. The idea is to have a form for each user so when submitting a form, only the user edited will get updated. However, when a form is submitted the user data model is lost and ends up as a null pointer. I wouldn't be surprised if I've missed something obvious or if the way I try to achieve a form for each user isn't a valid usage of T5. Any thoughts or suggestions? I've attached a simple example demonstrating my approach in this email. /Olof // User.java Data Model package org.example; public class User { private String name; public User(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } } //Users.java T5 Page package org.example.testapp.pages; import java.util.ArrayList; import java.util.List; import org.apache.tapestry.annotations.Persist; import org.example.User; public class Users { private User user; @Persist("flash") private List users; public void onActivate() { if (users == null) { users = new ArrayList(); users.add(new User("Ted")); users.add(new User("Olof")); } } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public List getUsers() { return users; } } // Users.html T5 Template http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> //EditUser.java T5 Component package org.example.testapp.components; import org.apache.tapestry.annotations.Parameter; import org.example.User; public class EditUser { @Parameter(required = true) private User user; public void setUser(User user) { this.user = user; } public User getUser() { return user; } public void onSuccess() { // save user } } //EditUser.html T5 Template http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: the scanner and JBoss
Geoff Callender wrote: > T5 isn't picking up changes to templates and component classes in my > environment. T5.0.5 is a jar in an exploded WAR in an exploded EAR, > which JBoss has been told to use (it's pointed to in > jboss-service.xml). When I make changes to the web app they are copied > immediately to the exploded ear but T5 just isn't picking them up. > > I saw on Howard's blog that he'd had a problem with JBoss/Tomcat... > > http://tapestryjava.blogspot.com/2007/02/fighting-with-tomcat.html > http://issues.apache.org/bugzilla/show_bug.cgi?id=41664 > > ...but the 5.0.5 source looks like it has the necessary fix. Besides, > I'm using an ear that's already exploded so I shouldn't be getting > Howard's problem. True? > > Does anyone have a theory on why it isn't working? > Alternatively can anyone point me to the scanner class so I can debug > what it isn't doing? > > Geoff The problem with Tomcat was identified in the following email as a classloader caching issue. I've not tested this though. Cheers, Nick. Original Message Subject: RE: T5 developing with WTP and TOMCAT Date: Wed, 5 Sep 2007 17:59:14 +0200 From: Brysbaert Gregory <[EMAIL PROTECTED]> Reply-To: Tapestry users To: Tapestry users Hello, About this topic, I tried some investigations on my side, and I found out that the reason why classes don't auto-reload is that the WebappClassLoader of tomcat 5 (I currently use tomcat 5.0, but I guess it's the same on Tomcat 5.5) keeps in cache (in a Hashtable more precisely) all classes it already loaded once. And this cache is never cleared, except when the WebappClassLoader is stopped. So, when the class file is modified on the disk, tapestry 5 clears its own cache, and then asks to the parent classloader (WebAppClassLoader) to reload the class, which then serves the previous version of the class from its cache. The result is that the class is never actually updated until the next restart of tomcat. So, as a temporary solution, I tried to develop a class extending WebappClassLoader that does not cache classes for packages containing ".pages." and ".components.". The source of this class is : public class Tapestry5DevClassLoader extends WebappClassLoader{ private static String[] noCacheElements={".pages.","/pages/",".components.","/components/"}; public Tapestry5DevClassLoader() { super(); } public Tapestry5DevClassLoader(ClassLoader arg0) { super(arg0); } @Override protected InputStream findLoadedResource(String arg0) { InputStream is=super.findLoadedResource(arg0); if (is!=null){ if (isNoCacheElement(arg0)) return null; } return is; } private boolean isNoCacheElement(String name){ for (int i=0;i=0) return true; } return false; } } To make it work, you have to do 2 things : - Compile the class and add it to the server/classes (or server/lib if you package it in a jar) directory of your tomcat installation directory. - in your server.xml file, modify the context declaration and disable tomcat's auto-reloading functionality, and declare the newly created classloader instead of the default one : This is of course a temporary solution, but I tried it and it works for me. Waiting for something better, I hope it can help. Gregory Brysbaert -Message d'origine- De : Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED] Envoye : jeudi 16 aout 2007 18:59 A : Tapestry users Objet : Re: T5 developing with WTP and TOMCAT On Thu, 16 Aug 2007 12:54:31 -0300, Denny <[EMAIL PROTECTED]> wrote: > Ok, now, I am using jettylauncher eclipse plugin to develop T5. I hope T5 > can fix the problem about working with tomcat. There are many people > using tomcat for develop and product. It's a Tomcat issue, not a Tapestry one. Howard explains the problem here: http://tapestryjava.blogspot.com/2007/02/fighting-with-tomcat.html -- Thiago H. de Paula Figueiredo Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da Informacao Ltda. http://www.eteg.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Upgrade to 5.0.6-SNAPSHOT
On 9/28/07, Borut Bolčina <[EMAIL PROTECTED]> wrote: > What is the 5.0.6-SNAPSHOT repository url? http://tapestryjava.blogspot.com/2007/09/tapestry-5-nightly-builds.html tapestry-snapshot http://tapestry.formos.com/maven-snapshot-repository true -- regards, Robin
T5: the scanner and JBoss
T5 isn't picking up changes to templates and component classes in my environment. T5.0.5 is a jar in an exploded WAR in an exploded EAR, which JBoss has been told to use (it's pointed to in jboss- service.xml). When I make changes to the web app they are copied immediately to the exploded ear but T5 just isn't picking them up. I saw on Howard's blog that he'd had a problem with JBoss/Tomcat... http://tapestryjava.blogspot.com/2007/02/fighting-with-tomcat.html http://issues.apache.org/bugzilla/show_bug.cgi?id=41664 ...but the 5.0.5 source looks like it has the necessary fix. Besides, I'm using an ear that's already exploded so I shouldn't be getting Howard's problem. True? Does anyone have a theory on why it isn't working? Alternatively can anyone point me to the scanner class so I can debug what it isn't doing? Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Upgrade to 5.0.6-SNAPSHOT
What is the 5.0.6-SNAPSHOT repository url? I get ... from the specified remote repositories: tapestry-snapshots ( http://people.apache.org/~hlship/tapestry-snapshot-repository/), central (http://repo1.maven.org/maven2), codehaus.snapshots (http://snapshots.repository.codehaus.org), openqa (http://maven.openqa.org/) Cheers, Borut 2007/9/27, Davor Hrg <[EMAIL PROTECTED]>: > > I think that quickstart hasn't changed since 5.0.5 > > maybe 5.0.5 is good enough for now ? > > after that you can change pom.xml to use 5.0.6-SNAPSHOT easily > > Davor Hrg > > On 9/27/07, Marcus <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I'm trying to create a new application using 5.0.6-SNAPSHOT. > > > > mvn archetype:create > > -DarchetypeGroupId=org.apache.tapestry-DarchetypeArtifactId=quickstart > > -DarchetypeVersion= > > 5.0.6-SNAPSHOT -DgroupId=org.exemplo -DartifactId=t506test > -DpackageName= > > org.exemplo.t506test -DremoteRepositories= > > http://tapestry.formos.com/maven-snapshot-repository > > > > but... > > > > [ERROR] ResourceManager : unable to find resource > > 'archetype-resources/src/main/webapp/WEB-INF/Start.html' in any resource > > loader. > > > > thanks > > > > Marcus > > >
Re: Checking for a logged in user globally
The only interface I implement is Dispatcher, so all should be good. Thanks for the pointer on bind() - I will use it. Will I then need to use @Inject/@InjectService in my constructor, or will the container "see" the needed arguments? Howard Lewis Ship wrote: Looks pretty reasonable to me. You're building the hard way: public static void bind(ServiceBinder binder) { binder.bind(Dispatcher.class, SingletonAccessControllerImpl.class ).withId("AccessController"); } The only other issue (I'd have to check) is to ensure that the interfaces you are implementing are all public, not internal. On 9/27/07, Chris Lewis <[EMAIL PROTECTED]> wrote: Hi Ben, I asked a question like this some time ago, and I've made some good progress like this. I have the same basic requirements as you and specifically do not want my pages to deal with authentication/restriction AT ALL. I did some reading about request handling as well as digging through the source (specifically TapestryModule) and realized I should be able to achieve this by contributing a Dispatcher to the MasterDispatcher service, such that it sits before the render and action dispatchers. My attention has been temporarily diverted so I haven't worked on it the last few days, but here's the basic code for I've done so far. In my app module: public Dispatcher buildAccessController( Map configuration, @InjectService("ApplicationStateManager") ApplicationStateManager asm ) { return new SingletonAccessControllerImpl(configuration, asm); } public void contributeMasterDispatcher(OrderedConfiguration configuration, @InjectService("AccessController") Dispatcher accessControl) { configuration.add("AccessController", accessControl, "before:PageRender"); } I intend to use ApplicationStateManager to grab client/session/request specific ASOs (namely a User/permissions object), so I can use a singleton access controller and still access user-specific data. The contribution puts my dispatcher ahead of the page and action dispatchers. AFAIK this is not in the docs but its quite clear in the TapestryModule. And here is my (test) dispatch implementation: public boolean dispatch(Request request, Response response) throws IOException { boolean canAccess = true; //...Access control logic using the ApplicationStateManager return ! canAccess; } The inverted return will halt processing of the request if canAccess is true (see docs/src for Dispatcher). Throwing a kind of access exception would probably do the trick as well. I hope this helps, and if you make good progress do share. Also, Howard if you see anything obviously wrong or "bad" with this method, please share :-). chris Ben Tomasini wrote: Hi, I am working on an application that requires a logged in user for access to any of the pages. My plan is to create a login form and store the logged in user in an ASO. I understand that I can implement an onActivate() on each of my pages, check to see if the user exists in the ASO, and if not, redirect the user to the login page. I could put this method into an abstract page which all of my pages extend from; however, I would rather not put that kind of constraint and burden on page development. Is there a more global way to enforce that an ASO exists, and if not, redirect to a page? Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Startup error - java.lang.NoSuchMethodError: org.apache.tapestry.services.ApplicationInitializer.initialize
I am using a maven based build for my tapestry project. I build and deploy the app but it throws an error when I try and connect via a web browser tomcat throughs the following error. I assume I am mssing something from my pom.xml. java.lang.NoSuchMethodError: org.apache.tapestry.services.ApplicationInitializer.initialize(Ljavax/servlet/http/HttpServlet;)V at org.apache.tapestry.ApplicationServlet.initializeApplication(ApplicationServlet.java:302) at org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:201) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:701) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) org.apache.tapestry tapestry-spring 5.0.5 org.apache.tapestry tapestry-contrib 4.1.3 org.apache.tapestry tapestry-annotations 4.1.3 org.apache.tapestry tapestry-framework 4.1.3 Any help appreciated. Thanks -- View this message in context: http://www.nabble.com/Startup-error---java.lang.NoSuchMethodError%3A-org.apache.tapestry.services.ApplicationInitializer.initialize-tf4533213.html#a12936924 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Upgrade to 5.0.6-SNAPSHOT
On 9/28/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > Did you heed Robert's sagely advice, and change *.html to *.tml? I also think that the page tml-files should be in webroot now, not inside WEB-INF as hls made changes so that you never can access a .tml file directly. -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]: binding issue: supplying parameter to component --> always null
you were right on both remarks. I now tried "model=dataModel" but still model --> null. could it be (just guessing here) that grid.dataModel isn't initialized (and thus null) on the moment an action event goes off in the gridcolumns-class? anyway I looked further in the GridColumns-class and there's a field: @Parameter(value = "componentResources.container") private GridModelProvider _dataProvider; through this the original GridColumns-class is asking for the datamodel i wanted to get, for instance: public List getColumnNames() { return _dataProvider.getDataModel().getPropertyNames(); } however when i try to access the field in the same manner in my action-event handler I keep getting null: void onActionFromSort(String columnId) { for (String name : _dataProvider.getDataModel().getPropertyNames()) { //some code.. } } It must be the time of accessing this field in the component life-cycle that causes this problem I guess. Is this correct? And how to workaround this issue? Geert-Jan Josh Canfield-2 wrote: > > I'm not well versed in grid/gridcell... but one thing that jumps out is > that > you have "_model=_model" in your parameters. Shouldn't that be > "model=_model" ? Also, are you passing the model parameter in your > template? > Your Parameter isn't required so null may be the correct value. > > > I also haven't done inheritance like you are doing, but it looks like you > are redefining the _model attribute from the superclass? Should you maybe > be > using datamodel provided by the superclass instead? "model=datamodel"? > > http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/Grid.html > > I haven't written the code, but that seems to be what makes sense to me... > Josh > > > On 9/27/07, Britske <[EMAIL PROTECTED]> wrote: >> >> >> Hi all, >> >> I guess I'm missing something here, maybe a trival thing so bear with me >> please.;-) >> >> I'm trying to extend the T5 grid / griddatasource for my requirements. >> For >> some event-handling in GridColumn I need to reference the field _model of >> type BeanModel which exists in the Grid-class from GridColumn. So I both >> extended Grid --> LazyConfigurableGrid and GridColumns --> >> LazyGridColumns. >> >> next,I supplied field _model as a parameter from the gridclass to the >> gridcolum-class. >> >> My problem: >> _model==null in GridColumn all the time. I guess this is some >> binding-thing >> that I can't quite get my head around. (_model == null on initialization >> of >> the component, but i thought it would be updated later on) >> >> The general question: how to pass objects by reference as parameters, >> since >> they always seem to be null. >> >> the relevant bits: >> >> LazyConfigurableGrid: >> >> @Parameter >> private BeanModel _model; >> >> @SuppressWarnings("unused") >> @Component(parameters = >> { "sortColumnId=sortColumnId", "sortAscending=sortAscending", >> "source=_source", "_model=_model" }) >> private LazyGridColumns _columns; >> >> >> LazyGridColumns: >> >> @Parameter >> private BeanModel _model; >> >> Thanks in advance, >> Geert-Jan >> >> >> -- >> View this message in context: >> http://www.nabble.com/-T5-%3A-binding-issue%3A--supplying-parameter-to-component---%3E-always-null-tf4530634.html#a12928987 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > -- View this message in context: http://www.nabble.com/-T5-%3A-binding-issue%3A--supplying-parameter-to-component---%3E-always-null-tf4530634.html#a12936000 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Comparison
yes :-) I have great concern for pages source size, but I guess I will have to get my hands dirty and try GWT to see the results. Unfortunately time is luxury. Would anyone of you guys use GWT to build "portal" like pageflakes or netvibes? What technology stack do you see most appropriate? I was attending Seam workshop yesterday. What I liked was Conversation and Business scopes - perfect for making wizard like page flows. I didn't get straight answers on how to make custom components and best practices regarding programmer-designer interaction though. I will post more when I try things out. 2007/9/27, Howard Lewis Ship <[EMAIL PROTECTED]>: > > Does that qualify as "damning with faint praise""? > > >