Re: need help to connect MS ACCESS
You might want to investigate using this library: http://jackcess.sourceforge.net/ On 9/4/07, dinesh kumar [EMAIL PROTECTED] wrote: hi , i am currently learning tapestry and im interested in knowing how MSACCESS is accessed via tapestry . if u know how plz help me. --dinesh- On 9/1/07, Jonathan Barker [EMAIL PROTECTED] wrote: I think MS Access is a great tool, and I've built some amazing stuff on it, but I don't recommend having it as the backend to a web app. Consider choosing something else if you can. You can use the JDBC-ODBC bridge if you have to use an Access backend. -Original Message- From: dinesh kumar [mailto:[EMAIL PROTECTED] Sent: Friday, August 31, 2007 7:02 AM To: Tapestry users Subject: need help to connect MS ACCESS hi iam a newbie for tapestry creating a small online shipping cart web page , i need to connect tapestry to MS-ACCESS database to sore the data from the registration from .html and the card page.html. Can any one say me in detailed how to make the connection? any special package need to imported? how set the connection in java class file i use netbeans 5.5. -- dinesh-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Daniel Gredler http://daniel.gredler.net/
Re: Hackish(?) Workaround for Entities In Templates
If you specify a doctype in your templates (like XHTML 1.0 Strict), you can use entities like copy; !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xmlns:t= http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; Copyright copy; Me /html On 6/8/07, Steven Coco [EMAIL PROTECTED] wrote: I just implemented a set of properties in WEB-INF/Application.properties. They look like this: # HTML entities: entity.copy: copy; entity.trade: trade; ... Now in templates I can use them like so: t:OutputRaw value=message:entity.trade/ Such is life. Ciao. -Steven Coco. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Daniel Gredler http://daniel.gredler.net/
Re: Tapestry5 ready for use in a new project?
I think client persistence was just committed today by Howard. On 5/16/07, Juan Maya [EMAIL PROTECTED] wrote: I miss right now tacos library and other ajax components. However i think they are a lot easier to implement in T5 and according to the road map i have seen on the web page the ajax support will be ready soon. Also, i would really like to have client side persistence . Right now Session and Flash are available. (although flash is not documented on the website). On 5/16/07, Martin Grotzke [EMAIL PROTECTED] wrote: Hi Juan, thanx a lot for your feedback, On Wed, 2007-05-16 at 08:48 -0500, Juan Maya wrote: Hi martin, I have been using T5 since a few weeks and it has been great! The increased productivity is really amazing and i haven't faced major bugs. sounds very well! However i couldn't tell u anything about performance and scalability. I've read that T5 shall be faster than T4, but concerning scalability it would be good to have some info... My application is still pretty basic and runs smoothly...but it's not enough to say that i will recommend to to use tapestry 5 in a production environment. Ok, I totally understand :) Are you missing any functionality that you perhaps know from T4 (in case you used T4 before), or some other features? Thanx cheers, Martin On 5/16/07, Martin Grotzke [EMAIL PROTECTED] wrote: hello, the missing feedback sounds like hmm, no, better don't use T5 for a new project now... please correct me if i'm wrong :) cheers, martin On Mon, 2007-05-14 at 00:00 +0200, Martin Grotzke wrote: hi, we're considering to use tapestry for a new project that shall go into production at the end of september this year. of course the best is to use a tested and stable framework (like tapestry 4.1), although i want to ask if it would be worth to use tapestry 5 for the new project. (posts on the users mailing list like this one http://www.mail-archive.com/users@tapestry.apache.org/msg11384.html sound promising) according to the roadmap (http://tapestry.apache.org/tapestry5/) there are several features outstanding - is this description up-to-date? is there functionality in tapestry 4.1 that is not yet available in tapestry 5, and is there a summary of what is still missing in t5? what is the plan with component libs like tacos in respect to t5 (is it still needed)? if there's anybody out there already using tapestry 5 it would be nice to get some feedback on the current status of t5, and what is working and what is not. thanx a lot in advance for your advice, cheers, martin -- Martin Grotzke http://www.javakaffee.de/blog/ -- Martin Grotzke http://www.javakaffee.de/blog/
Re: T5: Improve pretty url support
+1, unless there's something technical I'm not seeing... add it to JIRA :-) On 4/24/07, janjonge [EMAIL PROTECTED] wrote: +1 for me! Jan Jérôme BERNARD wrote: Hi, I'd like to have my AboutUs page mapped to the URL /about-us.html. I can't find a trivial way to do it, and wonder why it could not be done transparently when the name of the page is AboutUs (meaning the Camel syntax would mean add a dash before the uppercase letter). This is something really important for SEO reasons as the dash is the only word separator accepted (otherwise I have /aboutus.html). Thanks in advance. Regards, Jérôme. -- Jérôme BERNARD, Kalixia, SARL. http://weblog.kalixia.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-Improve-pretty-url-support-tf3639138.html#a10163861 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: Does tapestry5 don't support jdk1.4
Nope, one of the results being that configuration can be done in Java code, as opposed to XML. Two big thumbs up from me ;-) On 4/17/07, li li [EMAIL PROTECTED] wrote: Does tapestry5 don't support jdk1.4?! *thumbs down*
Re: I thought this was a newsgroup about Tapestry ;-)
I wasn't a very big fan of Maven 1, but I really like Maven 2. I've spent a couple of days in the aggregate tearing my hair out over various Maven 2 quirks, but I think there's tremendous value in imposing some sort of standard build lifecycle and directory structure, not to mention transitive dependency management. On 3/27/07, Borut Bolčina [EMAIL PROTECTED] wrote: Hello, Konstantin Ignatyev wrote: http://www.bileblog.org/?p=59 This pretty insulting blog was posted on July 17th, 2005. I share my oppinion with http://www.theserverside.com/news/thread.tss?thread_id=44285#227686 Best, Borut P.S. This thread is a paradox, quite funny. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]Question on ASO configuration
I haven't looked into this stuff yet, but if I were dealing with it I'd probably just make a new ApplicationState class with a user property that I could set at will, and let Tapestry instantiate the ApplicationState whenever it wants to. Of course, once T5 supports ASO flags, you'd want to start using those in order to prevent unnecessary session creation. On 3/16/07, Peter Beshai [EMAIL PROTECTED] wrote: I am trying to store a user as an ASO. I am able to set the user, but when I want to log out, I figured the right way to do it was to just set the user ASO to null. I believe this works fine, just that now when I chcek to see if the user is null or not, as expected, the application state manager will attempt to create a new instance of it. I figured this wouldn't be a problem, since I could just override the configuration to have something like: public void contributeApplicationStateManager(MappedConfigurationClass, ApplicationStateContribution configuration) { ApplicationStateCreatorUser creator = new ApplicationStateCreatorUser() { public User create() { return null; } }; configuration.add(User.class, new ApplicationStateContribution(session, creator)); } however this didn't seem to make any difference. I still get a java.lang.InstantiationException. Is there something I am missing? -- Peter Beshai Pure Mathematics/Computer Science Student University of Waterloo
Re: [OT] [T5] tapestry project structure
Yeah, I've run into this at work as well. The main problem I ran into was that the project depended on the maven-installed versions of the different modules, even if the modules in question were a part of the overall project... so for example tapestry-core's dependency on tapestry-ioc would trigger a build path dependency on the tapestry-ioc jar in the m2 repo, rather than just ignoring it in favor of the actual code in the project. It seems like this should be solvable by the maven people, even without nested project support in eclipse... And speaking of nested project support, I just added my vote here... https://bugs.eclipse.org/bugs/show_bug.cgi?id=35973 On 3/14/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Yes, mostly. Eclipse just has the one .classpath/.project file to identify all the source paths and libraries for a module; it doesn't have a concept of a nested project with its own .classpath/.project. It'll fight you on this! Meanwhile, the pom.xml for the project doesn't have all the depenencies needed by sub-projects. On 3/14/07, DJ Gredler [EMAIL PROTECTED] wrote: I've wondered about this, too. I think there are benefits to the modular design even if the version numbers are kept in sync -- in fact, I think keeping the version numbers in sync makes it easier for users to decide what bits they need, since the decision is based only on required functionality, and not on transitive dependency concerns. When you say that Eclipse can't handle the nested structure, do you mean the maven2 plugin? On 3/14/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: This is more compatible with Eclipse; Eclipse can't handle a nested project structure. In addition, I expect that the release numbers of some of the sub-projects will decouple. That is, tapestry-spring may become stable at, say, 5.0.4 and we'll leave it alone as we rev tapestry-core up to, say, 5.0.9. Anyway, that's the theory. The practice is looking a little different, because of JIRA. Having just TAPESTRY as the issue tracker key limits the ability to meaningfully track version numbers across the components (such as tapestry-core). One option would be to start creating sub-projects within the Tapestry category (currently, there's just the TAPESTRY project), so that each could track its bugs itself. Another option would be to re-organize it, as you mentioned, with tapestry5/trunk/tapestry-xxx and tapestry/tags/tapestry-xxx ... that would certainly make things easier when creating a new release (much less tagging!). SVN does let us change our mind after the fact, to a large degree. On 3/14/07, Dan Adams [EMAIL PROTECTED] wrote: I noticed in the tapestry sources that while it's a multi-module maven project, all of the modules are at the same level in the source tree and each have their own set of branches/tags/trunk folders rather than having each module contained within it's parent module. What have you found to be the advantages of this? How does having each in a separate folder effect doing releases? Do you keep the version numbers in sync? Thanks. :) -- Dan Adams Senior Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Upload component?
I'm going to need it soon as well, but haven't looked into it at all. Go for it! On 3/12/07, Pablo Ruggia [EMAIL PROTECTED] wrote: Does anyone implemented this Upload component ? I need it, so if nobody has gone there yet, i'll give it a try. On 3/9/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Yep, not yet implemented. On 3/9/07, Hugo Palma [EMAIL PROTECTED] wrote: I can't see any upload component here http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html so i guess that means it's still not implemented. Peter Beshai wrote: How do we use input type=file in T5? Is this functionality implemented yet? -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - Context parameters and style sheets links
I've never had to operate out of a context other than root, so I've just hardcoded it to /mystyle.css or whatever... On 3/12/07, Bogdan Calmac [EMAIL PROTECTED] wrote: Consider a UserDetail page that has an URL like http://server/context/UserDetail/jdoe;. Here I'm using the tapestry style of passing parameters, as part of the context. The problem here is that if you have a styleset link to mystyle.css, it will try to look for http://server/context/userdetail/mystyle.css which of course does not exit. The alternative to use the full path to the css, /context/mystyle.css is also bad because you don't want to hardcode the name of the context. There are 2 correct solutions to this problem which would be nice to be part of the framework: 1. Allow context information to (optionally) be passed to a page as query parameters, so the above URL would be http://server/context/UserDetail?userid=jdoe;. The relative link to the stylesheet would be fine now, but I don't know if this fits with the design of the framework. 2. Create something like an AssetLink component that takes care to prepend so context, so that: link t:type=AssetLink href=/mystyle.css rel=stylesheet type=text/css/ would generate; link href=/context/mystyle.css rel=stylesheet type=text/css/ I would expect there were others who encountered the same quirk. How did you address it? Thank you, Bogdan Calmac. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5:How to use Select component's model
You can also use a Map (probably a TreeMap), and once TAPESTRY-1292 ( https://issues.apache.org/jira/browse/TAPESTRY-1292) is resolved, you'll be able to use a List as well. On 2/27/07, Ted Steen [EMAIL PROTECTED] wrote: In T5 you use SelectModel. see http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/SelectModel.html 2007/2/27, Weisu [EMAIL PROTECTED]: Hi, I am converting my app to T5, in T4, I use IPropertySelectionModel to create the dropdown for select, what model can I use in T5. -- View this message in context: http://www.nabble.com/T5%3AHow-to-use-Select-component%27s-model-tf3298500.html#a9175667 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- /ted - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: onActivate error handling?
Hi, I'm using the activate / passivate infrastructure in T5, and have a question about it. I have the following methods on a search page: public String onPassivate() { return this.jurisdiction; } public void onActivate(String jurisdiction) { this.jurisdiction = jurisdiction; } This works for URLs of the form http://www.host.com/search/atlanta;. However, if a user ever goes to http://www.host.com/search;, he will get an ugly error page for an IllegalArgumentException, with a message like Method com.of.pages.AbstractJurisdictionPage.onActivate(java.lang.String) has more parameters than there are context values for this component event. I'd like to be able to handle this condition myself, and thought I might be able to do so if I added a parameter-less onActivate( ) method, but no cigar: public void onActivate() { // redirect to home page, or use a default jurisdiction } What are my options here? Daniel
Re: T5: onActivate error handling?
The onActivate(Object[]) solution works well, thanks. I've opened an enhancement request in JIRA to track this change, too: https://issues.apache.org/jira/browse/TAPESTRY-1295 On 2/23/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Yes, this is tricky and I'm thinking I'm not happy with the way it currently works. Your best option is to implement onActivate(Object[]) and do any coercions from there. This will be invoked regardless of the number of values in the context (even zero). I'm thinking the change will be: a method will be invoked if the context has at least as many values as the method has parameters, and will silently skip those that request too many. Nope, that still doesn't handle it for the common case that you want to catch the no activation context scenario. On 2/23/07, DJ Gredler [EMAIL PROTECTED] wrote: Hi, I'm using the activate / passivate infrastructure in T5, and have a question about it. I have the following methods on a search page: public String onPassivate() { return this.jurisdiction; } public void onActivate(String jurisdiction) { this.jurisdiction = jurisdiction; } This works for URLs of the form http://www.host.com/search/atlanta;. However, if a user ever goes to http://www.host.com/search;, he will get an ugly error page for an IllegalArgumentException, with a message like Method com.of.pages.AbstractJurisdictionPage.onActivate(java.lang.String) has more parameters than there are context values for this component event. I'd like to be able to handle this condition myself, and thought I might be able to do so if I added a parameter-less onActivate( ) method, but no cigar: public void onActivate() { // redirect to home page, or use a default jurisdiction } What are my options here? Daniel -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Spring Integration
You can just inject the following into your pages: @Inject private ApplicationGlobals globals; And then use the servlet context inside the globals object to get the application context via WebApplicationContextUtils.getRequiredWebApplicationContext (servletContext); Once you have the application context, you just call getBean(String) to get your managed beans. On 2/19/07, SergeEby [EMAIL PROTECTED] wrote: Hi, I know Spring integration will be included later in T5, but was wondering if someone has already figured out how to do that. I am playing around converting an existing application to T5. Thanks, /Serge -- View this message in context: http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869 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: Spring Integration
Good catch :-) You also have to add the following line to your web.xml: listenerlistener-class org.springframework.web.context.ContextLoaderListener /listener-class/listener On 2/19/07, James Carman [EMAIL PROTECTED] wrote: Of course, you have to set up the ContextLoaderListener, right? On 2/19/07, DJ Gredler [EMAIL PROTECTED] wrote: You can just inject the following into your pages: @Inject private ApplicationGlobals globals; And then use the servlet context inside the globals object to get the application context via WebApplicationContextUtils.getRequiredWebApplicationContext (servletContext); Once you have the application context, you just call getBean(String) to get your managed beans. On 2/19/07, SergeEby [EMAIL PROTECTED] wrote: Hi, I know Spring integration will be included later in T5, but was wondering if someone has already figured out how to do that. I am playing around converting an existing application to T5. Thanks, /Serge -- View this message in context: http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869 Sent from the Tapestry - User mailing list archive at Nabble.com. - 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]
T5: Activate + Passivate + Validation
Hi, I'm using T5, and I have a page that uses activate and passivate events to store a primary key (as explained at http://tapestry.apache.org/tapestry5/tapestry-core/guide/event.html). I'm having some trouble, though, when I do custom validation in my onSuccessFromForm( ) method. If the validation fails, I return null so that the user comes back to the same page. However, the primary key has been lost, and I get the following error: * java.lang.IllegalArgumentException Method com.of.pages.AbstractJurisdictionPage.onActivate( java.lang.String) has more parameters than there are context values for this component event. Stack trace o org.apache.tapestry.internal.services.ComponentEventImpl.coerceContext( ComponentEventImpl.java:92) o com.of.pages.AbstractJurisdictionPage.handleComponentEvent( AbstractJurisdictionPage.java) o com.of.pages.Search.handleComponentEvent(Search.java) o org.apache.tapestry.internal.structure.ComponentPageElementImpl.handleEvent( ComponentPageElementImpl.java:900) o org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerEvent (ComponentPageElementImpl.java:1009) o org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle( PageLinkHandlerImpl.java:49) o org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle( PageLinkHandlerImpl.java:39) o $PageLinkHandler_110d8085cb5.handle($PageLinkHandler_110d8085cb5.java) o $PageLinkHandler_110d8085c6a.handle($PageLinkHandler_110d8085c6a.java) o org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch( PageRenderDispatcher.java:88) o $Dispatcher_110d8085c6c.dispatch($Dispatcher_110d8085c6c.java) o $Dispatcher_110d8085c6d.dispatch($Dispatcher_110d8085c6d.java) o $Dispatcher_110d8085c59.dispatch($Dispatcher_110d8085c59.java) o org.apache.tapestry.services.TapestryModule$5.service( TapestryModule.java:418) o org.apache.tapestry.services.TapestryModule$6.service( TapestryModule.java:451) o $RequestHandler_110d8085c5a.service($RequestHandler_110d8085c5a.java) o org.apache.tapestry.internal.services.StaticFilesFilter.service( StaticFilesFilter.java:49) o $RequestHandler_110d8085c5a.service($RequestHandler_110d8085c5a.java) o com.of.services.AppModule$1.service(AppModule.java:44) o $RequestFilter_110d8085c56.service($RequestFilter_110d8085c56.java) o $RequestHandler_110d8085c5a.service($RequestHandler_110d8085c5a.java) o org.apache.tapestry.internal.services.LocalizationFilter.service( LocalizationFilter.java:43) o $RequestHandler_110d8085c5a.service($RequestHandler_110d8085c5a.java) o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke( CheckForUpdatesFilter.java:91) o org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke( CheckForUpdatesFilter.java:82) o org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead( ConcurrentBarrier.java:77) o org.apache.tapestry.internal.services.CheckForUpdatesFilter.service( CheckForUpdatesFilter.java:104) o $RequestHandler_110d8085c5a.service($RequestHandler_110d8085c5a.java) o $RequestHandler_110d8085c5b.service($RequestHandler_110d8085c5b.java) o $RequestHandler_110d8085c51.service($RequestHandler_110d8085c51.java) o org.apache.tapestry.services.TapestryModule$3.service( TapestryModule.java:341) o $HttpServletRequestHandler_110d8085c52.service($HttpServletRequestHandler_110d8085c52.java) o $HttpServletRequestHandler_110d8085c50.service($HttpServletRequestHandler_110d8085c50.java) o org.apache.tapestry.TapestryFilter.doFilter( TapestryFilter.java:114) o org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter( WebApplicationHandler.java:821) o org.mortbay.jetty.servlet.WebApplicationHandler.dispatch( WebApplicationHandler.java:471) o org.mortbay.jetty.servlet.ServletHandler.handle( ServletHandler.java:568) o org.mortbay.http.HttpContext.handle(HttpContext.java:1530) o org.mortbay.jetty.servlet.WebApplicationContext.handle( WebApplicationContext.java:633) o org.mortbay.http.HttpContext.handle(HttpContext.java:1482) o org.mortbay.http.HttpServer.service(HttpServer.java:909) o org.mortbay.http.HttpConnection.service(HttpConnection.java :820) o org.mortbay.http.HttpConnection.handleNext( HttpConnection.java:986) o org.mortbay.http.HttpConnection.handle(HttpConnection.java :837) o org.mortbay.http.SocketListener.handleConnection( SocketListener.java:245) o org.mortbay.util.ThreadedServer.handle(ThreadedServer.java :357)
Re: Tapestry5: Passing parameters to pages
I'm interested in knowing the answer to this, as well. In fact, to take it one step further: Instead of parameters: http://www.mysite.com/view?country=spain http://www.mysite.com/view?country=usa http://www.mysite.com/view?country=france And instead of including the page name: http://www.mysite.com/view/spain http://www.mysite.com/view/usa http://www.mysite.com/view/france I'd like to have something like: http://www.mysite.com/spain http://www.mysite.com/usa http://www.mysite.com/france On 2/15/07, Dennis Kempin [EMAIL PROTECTED] wrote: Hi, I am experimenting with the tapestry snapshot version and want to write a little page class that takes an integer parameter to specify an content id to show. Just like passing a context with an Action link, but just without the HTTP redirect back to the Page URL. I could make use of a persistent field to store the id passed with the context of the ActionLink to show it after reloading, but well that seems to a be very hacky solution. Example: /nopaste/4 is handled by the /nopaste page, but how do I get the integer value after the slash? (well i could use the good old ?id=4 GET parameters, but the above example would look more consistent, IMHO) regards Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About Tapestry 5 ?
I've been trying it out over the past week or so, and my impression of the documentation is that it's a brain dump of how things work in general, but when you get down to basic questions like is there a label component? if so, how does it work? is there a select component? if so, how does it work? you end up having to go to google and search along the lines of label site: tapestry.apache.org/tapestry5. I like what comes out once you figure out how things work, though. The one other thing I've had trouble with is contributing to the application configuration... I have a search page which I want to render sometimes even when the URL doesn't contain the page name, and I had to do some major digging into the internal configuration to figure out how to do it. What I ended up with made heavy use of internal Tapestry classes, so this seems like an area that may not yet be complete. Overall it reminds me of Maven 2 at this point... slightly aggravating to figure out at first, but possibly a time saver in the long run. On 2/14/07, Dwi Ardi Irawan [EMAIL PROTECTED] wrote: i've heard about tapestry 5 preview release, what i want to ask : is tapestry 5 ready to be used in production ? thnx. dwi ardi irawan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 5 FormSupport Exception
I think I got this error when I tried to use an input component (Select or TextField or something) without a containing Form component. On 2/14/07, Dave Kallstrom [EMAIL PROTECTED] wrote: I hope this user list is ready for tap5 questions if not please disregard. I am working on my first tap5 hello world page and am having a little trouble with form submission. I copied the code right of the tap5 page and I am getting the following error. No object of type org.apache.tapestry.services.FormSupport is available from the Environment. Available types are org.apache.tapestry.MarkupWriter , org.apache.tapestry.ValidationDecorator, org.apache.tapestry.dom.Document, org.apache.tapestry.services.Heartbeat, org.apache.tapestry.services.PageRenderSupport. I am assuming I need to provide PageRenderSupport but could not find documentation on how to do so. Any help would be appreciated. -- Dave Kallstrom
Re: Tapestry prop: suggestion (or question)
Sometimes it might make sense to have a setObject( ) with a little bit different behavior... namely, if elements of the property path are null then try to instantiate them, but ignore setObject( ) calls where the value to set is null and one of the property path elements is also null. I've taken this approach in the past with reflection-based bindings, and it's been pretty nice. On 1/30/07, Gentry, Michael (Contractor) [EMAIL PROTECTED] wrote: PS. I didn't alter setObject() ... I'd consider that an actual error if you were trying to set things through nulls.
Re: @BeanForm for a Cat and its Owner (PropertySelection)
You will need to create a small class that implements IPropertySelectionModel (maybe inside your page class): private final static class OwnerPropertySelectionModel implements IPropertySelectionModel { private ListOwner owners; public OwnerPropertySelectionModel( ListOwner owners ) { this.owners = owners; } public int getOptionCount() { return this.owners.size(); } public Object getOption( int index ) { return this.owners.get( index ); } public String getLabel( int index ) { Owner owner = this.owners.get( index ); return ( owner != null ? owner.getName() : null ); } public String getValue( int index ) { return String.valueOf( index ); } public Object translateValue( String value ) { if( value == null ) return null; else return this.owners.get( Integer.valueOf( value ) ); } } You will then need to return an instance of this class from a method on your page: public IPropertySelectionModel getOwnerPSM() { ListOwner owners = ... return new OwnerPropertySelectionModel( owners ); } Then just add another binding to your BeanForm component: owner_model=ognl:ownerPSM All of this code was taken from the example webapp, specifically the binding override examples page. Check it out if you get a chance. Take care, Daniel On 1/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I got it working now...I saw some helpful additional comments on the sourceforge page. I used the annotations now and did without a page file. I also added a library line to the application file. Another error was that I forgot the PageBeginRender interface so that the object was null when the page loaded as the method to create an empty object was not called. But another questionI am trying to edit a an object that depends on another object/table which i would like to solve as a PropertySelection...preferrably without doing a PropertySelectionModel class for it. E.g.: Table with Cats ~~~ (mapped to Cat.java) id name owner_id 1 Felix2 2 Garfield 1 Table with Owners ~~ (mapped to Owner.java) id name 1 Sally 2 Peter So if I want to edit or create a new Cat I want the Owner to be selectable as PropertySelection. span jwcid=@bf:BeanForm bean=ognl:cat save=listener:save delete=listener:delete/ Just displays a text field for the owner_id has anyone got a good example how to do it? Or does it end up gettings a bit messy with lots of coding for a PropertySelectionModel class? Thanks! Original-Nachricht Datum: Fri, 19 Jan 2007 00:52:55 +0100 Von: DJ Gredler [EMAIL PROTECTED] An: Tapestry users users@tapestry.apache.org Betreff: Re: @BeanForm How do you use it ??? Hi, What version are you using? Can you post the full stack trace? I looked at the source code and I don't really see how line 149 of BeanForm.java can cause a NPE... Also, what library id are you using in the .application file? Those jwcid's should probably include the library id, no? Take care, Daniel On 1/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have tried: span jwcid=@BeanForm bean=ognl:foo properties=ognl:'name' save=listener:onSave / as well as: span jwcid=@BeanForm bean=ognl:foo beanProperties=ognl:'name' save=listener:onSave / but it comes up with: ognl.OgnlException beanProperties java.lang.NullPointerException Stack Trace: * com.domain.components.BeanForm.getBeanProperties(BeanForm.java:149) Any pointing in the right direction? Thanks! - 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: Nice speedup with prop
Actually, it looks like Jesse already has some numbers for us! http://blog.opencomponentry.com/2007/01/14/new-ognl-release-on-the-horizon-its-faster/ http://www.theserverside.com/news/thread.tss?thread_id=43837 On 1/15/07, DJ Gredler [EMAIL PROTECTED] wrote: I've had a similar experience. It will be very interesting to do some more performance testing if (when?) Jesse's OGNL enhancements get released. On 1/16/07, Henri Dupre [EMAIL PROTECTED] wrote: I switched many pages from our website to prop. The switch wasnt that straightforward (had to get rid of all the old properties in the .page files) but the speed boost is nice. Our main pages are almost 2x faster and the rendering time is now 100 ms!! -- Henri Dupre Actualis Center
Re: New Tapestry feature suggestion: EditForm generation
Are there still plans to modularize Trails a bit more so that developers who don't have a Trails application can still use some of the components it provides? I remember reading somewhere that this sort of component library approach was being considered, but never saw it come to fruition. On 1/14/07, Kalle Korhonen [EMAIL PROTECTED] wrote: And hopefully nobody's re-inventing the wheel here because Trails has a pretty extensive support even for the not-so-simple cases. I know Howard that you and Chris Nelson have talked a bit, so I hope you take a look at the existing Trails code and steal/borrow from it or ask for changes before you go and write the same for Tap5. I'm also (im)patiently waiting for Tapestry 4.1 release to upgrade Trails to use it and I'd be more than happy to assist in changes to make it easier to support Tap5. Kalle On 1/14/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: BeanForm exists for Tapestry 4, and Tapestry 5 will have some kind of similar support. I've been laying the groundwork for quite a while. On 1/14/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: Do you mean like http://beanform.sourceforge.net/ ? On 1/14/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: What about adding native Tapestry support for editing (complex) objects? For objects thats don't depend on other objects it would be easy ( e.g. simply generating text fields). For objects that depend on other objects, it could maybe be solved using Annotations? E.g. One object is Car and one is Engine. If you want to edit a car, a dropdown box with Engines would need to be displayed. As Tapestry needs to know which field is the one to display, this could either be done by using the getName() method, getDisplayName() method or by using Annotations e.h. @DisplayEditField. This would massively speed up Tapestry projects, you would then only need a single line in your page files and the rest is done by Tapestry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nice speedup with prop
I've had a similar experience. It will be very interesting to do some more performance testing if (when?) Jesse's OGNL enhancements get released. On 1/16/07, Henri Dupre [EMAIL PROTECTED] wrote: I switched many pages from our website to prop. The switch wasnt that straightforward (had to get rid of all the old properties in the .page files) but the speed boost is nice. Our main pages are almost 2x faster and the rendering time is now 100 ms!! -- Henri Dupre Actualis Center
Re: Beanform: Nested Beanforms with Binding Overrides
Well, I'm glad you sorted it out :-) On 1/11/07, Steve Wells [EMAIL PROTECTED] wrote: ok, after rolling back to just a simple one-off Beanform on its own and it still failing ,cleaning the hell out of everything, the problem seems to have (most unbelievably) been an empty left-over .page file; it only had the page-specification... Serve me right for leaving mess around. On 10/01/07, Steve Wells [EMAIL PROTECTED] wrote: Hi Daniel, None of them print correctly. I meant the only thing printed is the name of the property surrounded by '[]' eg: [PASSWORD]: text=literal:possibility was me experimenting trying to remove uncertainties. I found when you use a resource bundle for the page with BeanForm and use _title=ognl: messages.getMessage( components.bf.property.name + '_title' ) : 1. the field prompt text is taken from a properties file property with the same name as the Bean property and 2. the field label is taken from property_name So if I have a bean property text and in my page properties file text=Enter some text text_title=This is where you type stuff you will get: td class=bf_Left id=informal_0label for=nameEnter some text/label:/td td class=bf_Right id=informal_1input type=text name=name value= id=name title=This is where you type stuff class=text //td I've tried removing: _title=ognl:messages.getMessage( components.bf.property.name + '_title' ) and other combinations but nothing quite works...yet. On 10/01/07, DJ Gredler [EMAIL PROTECTED] wrote: I'm not sure why this would cause a problem. So looking at your code, you're saying that the titles for BeanForm bf print correctly, but the title for BeanForm bf_inner doesn't? Or neither of them work? What do you mean by all I see is the [PROPERTY_NAME] coming out? As an aside, what is the following binding on bf_inner supposed to be doing? text=literal:possibility On 1/11/07, Steve Wells [EMAIL PROTECTED] wrote: Hi, Bit of extreme BF'ing here. Titles are not printing; be it dynamically or literally when I do something of the form: form beanform1 for (iterate over a list) new beanform from each list item All I see is the [PROPERTY_NAME] coming out. Detailed Code as follows: form jwcid=[EMAIL PROTECTED] delegate=bean:delegate clientValidationEnabled=ognl:false table jwcid= [EMAIL PROTECTED]:BeanForm bean=prop:vote properties=literal:question=TextArea,explaination=TextArea,expiresOn _title=ognl:messages.getMessage( components.bf.property.name+ '_title' ) /table span jwcid=@For source=ognl:vote.possibilityList value=prop:possibility table jwcid=[EMAIL PROTECTED]:BeanForm bean=prop:possibility properties=text text=literal:possibility text_title=literal:possibility text /table /span input jwcid=[EMAIL PROTECTED] value=literal:create Vote listener=listener:createVote/ /form Any ideas? Thanks, Steve
Re: Beanform: Nested Beanforms with Binding Overrides
I'm not sure why this would cause a problem. So looking at your code, you're saying that the titles for BeanForm bf print correctly, but the title for BeanForm bf_inner doesn't? Or neither of them work? What do you mean by all I see is the [PROPERTY_NAME] coming out? As an aside, what is the following binding on bf_inner supposed to be doing? text=literal:possibility On 1/11/07, Steve Wells [EMAIL PROTECTED] wrote: Hi, Bit of extreme BF'ing here. Titles are not printing; be it dynamically or literally when I do something of the form: form beanform1 for (iterate over a list) new beanform from each list item All I see is the [PROPERTY_NAME] coming out. Detailed Code as follows: form jwcid=[EMAIL PROTECTED] delegate=bean:delegate clientValidationEnabled=ognl:false table jwcid=[EMAIL PROTECTED]:BeanForm bean=prop:vote properties=literal:question=TextArea,explaination=TextArea,expiresOn _title=ognl:messages.getMessage(components.bf.property.name + '_title' ) /table span jwcid=@For source=ognl:vote.possibilityList value=prop:possibility table jwcid=[EMAIL PROTECTED]:BeanForm bean=prop:possibility properties=text text=literal:possibility text_title=literal:possibility text /table /span input jwcid=[EMAIL PROTECTED] value=literal:create Vote listener=listener:createVote/ /form Any ideas? Thanks, Steve
Re: Can you comment on this?
Martin - Can you please change your email address? I rediscover it about once a month, usually as I'm about to take a gulp of hot coffee or tea. Reading programming-related mailing lists should not be dangerous to your health ;-) Regards, Daniel On 12/21/06, Martin Strand [EMAIL PROTECTED] wrote: I'm still troubled by the fact that nobody has come up with an answer to this: Is vi better than emacs or is it the other way around? Martin On Thu, 21 Dec 2006 09:53:44 +0100, Emmanuel Sowah [EMAIL PROTECTED] wrote: Jesse, This comment of yours that Wicket, in its current form, is technically inferior doesn't hold water for me. Can you cite concrete reasons why you think so? And when I read your comment that they get beaten up a lot I decided to go goggle and find out what that means and could see that the only bashing on Wicket was based on their abuse of the session but this I read in the link to the article I posted earlier that they are solving this issue by using the hard disk. Sorry, but I like fair discussions. Emmanuel On 12/20/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Why would Tapestry be losing any kind of battle because one person wrote an email saying they recommend using Wicket? When Wicket is actually technically / some other version of better that I can measure I'll admit it but I'm obviously biased towards Tapestry so my opinions are highly suspect. Good for them for getting some good press. They get beaten up a lot so I think it's good that some positive articles are floating around out there for them. On 12/20/06, Emmanuel Sowah [EMAIL PROTECTED] wrote: Hi Guys, I came across this article http://www.infoq.com/news/2006/12/wicket-vs-springmvc-and-jsf and thought probably someone here could comment. Is Tapestry really losing the battle against Wicket? Emmanuel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can you comment on this?
Karthik - Sorry if my post came across the wrong way -- I just think it's a good illustration of the kind of healthy cross-pollination I had been referring to earlier. I'm not implying that they can't or won't implement this sort of component, nor am I saying that something like this fits every project. I'm just pointing out a visible example of the free intellectual market at work. In fact, I'm eager to see how they improve on the concept, so that I can steal their ideas! ;-) Take care, Daniel On 12/21/06, karthik G [EMAIL PROTECTED] wrote: Both frameworks have excellent developers (which is great for users) and from what I see both have a different approach to a problem. I think everything can co-exist! Case in point ;-) http://www.nabble.com/Directly-map-a-bean-to-HTML-form-tf2845102.html#a7944709 http://www.nabble.com/Directly-map-a-bean-to-HTML-form-tf2845102.html#a7944709 Yes a built-in beanform doesn't seem to exist in Wicket now but that doesn't mean that it can't be done. Wicket has Panel components that can just about wrap any component. So you just need a TextFieldPanel that wraps a TextField for e.g. You can have similar such Panels for a checkbox, drop down etc. But at the end of the day they can all be treated as panels that need to be rendered in a loop?. Then its just about having a Wicket Repeater component that renders any of these panels depending upon the bean property. So a minimalistic generic template could look like this - span wicket:id=fields span wicket:id=fieldLabelLabel goes here/span span wicket:id=fieldComponentField Component/span /span IMHO the importance of beanform kind of component depends on the project you are working on. Our client has tied up with another company to design UI templates. We assemble the rest of the application. So in our case, the beanform is not of much help. Please do note that I'm not trying to trivialize the component implementation. But its important to realize that the dynamic forms are supported within Wicket constructs as well. Regards, Karthik On 12/21/06, DJ Gredler [EMAIL PROTECTED] wrote: Case in point ;-) http://www.nabble.com/Directly-map-a-bean-to-HTML-form-tf2845102.html#a7944709 On 12/20/06, DJ Gredler [EMAIL PROTECTED] wrote: Emmanuel - I tend to view this as a free intellectual market at work. There were inadequacies in Tapestry and strengths in Wicket that drove this one user to choose Wicket over Tapestry (and the other frameworks). If enough people agree with him, either Tapestry addresses these issues and becomes a better framework, or users migrate to Wicket (or some other framework du jour). Either way, we developers end up with a better framework. Given the amount of work that has already been invested in Tapestry and the community that has been built around it, I think the first option is much more likely, but then I'm no oracle :-) Daniel On 12/20/06, Emmanuel Sowah [EMAIL PROTECTED] wrote: Hi Guys, I came across this article http://www.infoq.com/news/2006/12/wicket-vs-springmvc-and-jsf and thought probably someone here could comment. Is Tapestry really losing the battle against Wicket? Emmanuel
Re: Can you comment on this?
LOL. Francis == Emmanuel? On 12/21/06, Francis Amanfo [EMAIL PROTECTED] wrote: Hi, Seems like you've missed some pasta today. I urge you to get yourself some Italian pasta and after that come back and make some sensible arguments. Emmanuel On 12/21/06, Angelo Turetta [EMAIL PROTECTED] wrote: Emmanuel Sowah wrote: Sorry, but I like fair discussions. Oh, do you? I don't know who you are, and I've been subscribed to this mailing list for very few months, so maybe I'm wrong: but the only thing I've seen you do (more than once) is desperately trying to start some idiotic flame-war. That's quite the opposite of 'fair discussion'. This list is intended for Tapestry users peer discussion: if you don't use (or like) Tapestry, you are wasting your time here, and ours too. Angelo Turetta Modena - Italy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Beware of bugs in the above code; I have only proved it correct, not tried it. -Donald Knuth I don't make predictions. I never have, and I never will. -Tony Blair
Re: Can you comment on this?
It's sock puppetry, if true, and thus germane to the discussion. *shrug* /thread-participation On 12/21/06, James Carman [EMAIL PROTECTED] wrote: Can you please take this off-line? The rest of us Tapestry users don't need to hear this, IMHO. On 12/21/06, DJ Gredler [EMAIL PROTECTED] wrote: LOL. Francis == Emmanuel? On 12/21/06, Francis Amanfo [EMAIL PROTECTED] wrote: Hi, Seems like you've missed some pasta today. I urge you to get yourself some Italian pasta and after that come back and make some sensible arguments. Emmanuel On 12/21/06, Angelo Turetta [EMAIL PROTECTED] wrote: Emmanuel Sowah wrote: Sorry, but I like fair discussions. Oh, do you? I don't know who you are, and I've been subscribed to this mailing list for very few months, so maybe I'm wrong: but the only thing I've seen you do (more than once) is desperately trying to start some idiotic flame-war. That's quite the opposite of 'fair discussion'. This list is intended for Tapestry users peer discussion: if you don't use (or like) Tapestry, you are wasting your time here, and ours too. Angelo Turetta Modena - Italy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Beware of bugs in the above code; I have only proved it correct, not tried it. -Donald Knuth I don't make predictions. I never have, and I never will. -Tony Blair - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can you comment on this?
Emmanuel - I tend to view this as a free intellectual market at work. There were inadequacies in Tapestry and strengths in Wicket that drove this one user to choose Wicket over Tapestry (and the other frameworks). If enough people agree with him, either Tapestry addresses these issues and becomes a better framework, or users migrate to Wicket (or some other framework du jour). Either way, we developers end up with a better framework. Given the amount of work that has already been invested in Tapestry and the community that has been built around it, I think the first option is much more likely, but then I'm no oracle :-) Daniel On 12/20/06, Emmanuel Sowah [EMAIL PROTECTED] wrote: Hi Guys, I came across this article http://www.infoq.com/news/2006/12/wicket-vs-springmvc-and-jsf and thought probably someone here could comment. Is Tapestry really losing the battle against Wicket? Emmanuel
Re: Can you comment on this?
Agree 100%. I guess I just consider the marketing aspects to be part of the free intellectual market :-) On 12/20/06, Marilen Corciovei [EMAIL PROTECTED] wrote: Daniel I think you are right but only partially. We must never neglect the marketing aspects. A thing either free or comercial is promoting itself only less than 50% by it's quality because only a very little number of decisions are taken by quality in todays world. Aspects like mouth to mouth, slashdot articles, and many others are also essentials. Ways must be found to promote Tapestry, this way it will receive the attention deserved and this will allow and motivate everyone in enhancing the framework. Len www.len.ro On Wed, 2006-12-20 at 10:15 -0500, DJ Gredler wrote: Emmanuel - I tend to view this as a free intellectual market at work. There were inadequacies in Tapestry and strengths in Wicket that drove this one user to choose Wicket over Tapestry (and the other frameworks). If enough people agree with him, either Tapestry addresses these issues and becomes a better framework, or users migrate to Wicket (or some other framework du jour). Either way, we developers end up with a better framework. Given the amount of work that has already been invested in Tapestry and the community that has been built around it, I think the first option is much more likely, but then I'm no oracle :-) Daniel On 12/20/06, Emmanuel Sowah [EMAIL PROTECTED] wrote: Hi Guys, I came across this article http://www.infoq.com/news/2006/12/wicket-vs-springmvc-and-jsf and thought probably someone here could comment. Is Tapestry really losing the battle against Wicket? Emmanuel
Re: Tapestry plugin for netbeans, new release!
I don't use netbeans, but may have to try it out ;-) On 12/20/06, andyhot [EMAIL PROTECTED] wrote: i did ? oh yea :) actually, better remove the old modules, and then use this update url : http://andyhot.di.uoa.gr/repository/nbtapestry/updates/updates.xml it's even more up-to-date + you'll always get the latest [EMAIL PROTECTED] wrote: Andy snuck out a new release on us! https://nbtapestrysupport.dev.java.net/ Downloading 0.2.0 now ;) Thanks Andy! -Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem implementing countdown timer
Not moving makes them easier to hit with a railgun, though! On 12/20/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: God damn campers. ;) On 12/20/06, Daniel Jue [EMAIL PROTECTED] wrote: Daniel, As an avid eBay user, I've been eagerly awaiting a feature like this! Now everyone can be a sniper. =) Now we just need some suspense music that streams in the background... Dan On 12/18/06, Leffel, Daniel [EMAIL PROTECTED] wrote: I have a really simple app that I'm trying to build. Shown on a page is an object that expires within 20-60 seconds. Once it expires, a new object is created with the same time to live (and so on and so on). The current object is loaded through a Tacos AjaxAutoInvoker. Additionally, I'm using the Tacos form submit on the page to enable users to manipulate the object. I'm trying to implement a countdown that shows in real time how many seconds are left until the object expires. I tried using another AjaxAutoInvoker without specifying a listener, but it makes an AJAX call anyway. I don't want to cause an AJAX call to happen every second to simply decrement the counter (the AjaxAutoInvoker otherwise refreshes the object every 5 seconds). So, I tried a little bit of Javascript. The problem is, this Javascript causes the AjaxForm to be submitted in a non-AJAX way (Debug message is: XMLHTTP Transport Error:0). Any ideas on the best way to accomplish this? script LANGUAGE=JavaScript var now = new Date(); var seconds = (event - now) / 1000; ID=window.setTimeout(update();, 1000); function update() { now = new Date(); seconds = (document.getElementById('ends').innerHTML-now)/1000; seconds = Math.round(seconds); document.getElementById('countdown').innerHTML = seconds; ID=window.setTimeout(update();,1000); } /script - 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] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can you comment on this?
Case in point ;-) http://www.nabble.com/Directly-map-a-bean-to-HTML-form-tf2845102.html#a7944709 On 12/20/06, DJ Gredler [EMAIL PROTECTED] wrote: Emmanuel - I tend to view this as a free intellectual market at work. There were inadequacies in Tapestry and strengths in Wicket that drove this one user to choose Wicket over Tapestry (and the other frameworks). If enough people agree with him, either Tapestry addresses these issues and becomes a better framework, or users migrate to Wicket (or some other framework du jour). Either way, we developers end up with a better framework. Given the amount of work that has already been invested in Tapestry and the community that has been built around it, I think the first option is much more likely, but then I'm no oracle :-) Daniel On 12/20/06, Emmanuel Sowah [EMAIL PROTECTED] wrote: Hi Guys, I came across this article http://www.infoq.com/news/2006/12/wicket-vs-springmvc-and-jsf and thought probably someone here could comment. Is Tapestry really losing the battle against Wicket? Emmanuel
Re: Can you comment on this?
Just call me Paris ;-) (mythology joke...) On 12/21/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Uh oh You just brought up their biggest Achilles heal. Good for you :) On 12/20/06, DJ Gredler [EMAIL PROTECTED] wrote: Case in point ;-) http://www.nabble.com/Directly-map-a-bean-to-HTML-form-tf2845102.html#a7944709 On 12/20/06, DJ Gredler [EMAIL PROTECTED] wrote: Emmanuel - I tend to view this as a free intellectual market at work. There were inadequacies in Tapestry and strengths in Wicket that drove this one user to choose Wicket over Tapestry (and the other frameworks). If enough people agree with him, either Tapestry addresses these issues and becomes a better framework, or users migrate to Wicket (or some other framework du jour). Either way, we developers end up with a better framework. Given the amount of work that has already been invested in Tapestry and the community that has been built around it, I think the first option is much more likely, but then I'm no oracle :-) Daniel On 12/20/06, Emmanuel Sowah [EMAIL PROTECTED] wrote: Hi Guys, I came across this article http://www.infoq.com/news/2006/12/wicket-vs-springmvc-and-jsf and thought probably someone here could comment. Is Tapestry really losing the battle against Wicket? Emmanuel -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry prop / ognl?
Hi Karthik - I would use prop wherever possible, and at least consider writing new methods in Java for the places that you can't currently use it. Not only does that increase the amount of code that you can unit test, but you'll see definite speed improvements. Changing BeanForm to use prop instead of ognl more than halved its typical rendering time. According to Howard, there's a lot of reflection and synchronization overhead to ognl, which is why it's slower. Take care, Daniel On 12/15/06, karthik G [EMAIL PROTECTED] wrote: Should i be using tapestry prop in place of ognl? Is this norm when developing with tapestry? http://howardlewisship.com/tapestry-javaforge/tapestry-prop/ Please do let me know as we are at a very early in the project and would like to adopt the best option. thanks, Karthik
Re: Squeeze adapter issue with Beanform
Never had this happen to me... what's the prefix for your Cayenne squeezer? On 12/17/06, Steve Wells [EMAIL PROTECTED] wrote: Hiya, I've just been trying to get beanform 0.7 working, but get what appears to be a clash with the BeanPropertySqueezer and my own Cayenne squeezer. Cutdown error is: Error building service tapestry.data.DataSqueezerTerminator: Error at jar:file:/G:/JavaTools/apache-tomcat-5.5.20 /temp/4-web/WEB-INF/lib/tapestry- framework-4.1.1-20061217.194907-31.jar!/META-INF/tapestry.data.xml, line 49, column 64: Unable to update property squeezeAdaptors of object DataSqueezer[adaptors=AdaptorRegistry[org.apache.cayenne.DataObject= SingletonProxy for application_hivemodule.CayenneAdapter( org.rz.squeezer.IDataObjectAdapter)]]: java.lang.reflect.InvocationTargetException [ +/- ] Exception: Error at jar:file/apache-tomcat-5.5.20 /temp/4-web/WEB-INF/lib/tapestry- framework-4.1.1-20061217.194907-31.jar!/META-INF/tapestry.data.xml, line 49, column 64: Unable to update property squeezeAdaptors of object DataSqueezer[adaptors=AdaptorRegistry[org.apache.cayenne.DataObject= SingletonProxy for application_hivemodule.CayenneAdapter( org.rz.squeezer.IDataObjectAdapter)]]: java.lang.reflect.InvocationTargetException then... An adaptor for prefix '' is already registered. ok both Beanform and my squeezer have a prefix and they are different. Before I go posting slabs of Hive modules etc does anyone have a clue here? Using Tap 4.1.1-SNAPSHOT. Thanks, Steve
Re: Squeeze adapter issue with Beanform
Hmm... very interesting. I wonder why the squeezer prefix works that way? It looks like I probably need to change the BeanForm squeezer prefix to just be a single character, in order to minimize conflicts... On 12/18/06, Steve Wells [EMAIL PROTECTED] wrote: hmmm, thanks and good thinking guys not sure it nails it though... The prefix is P but I have tried others., BeanForm uses BP Barry I think the squeezer type is registered by the getDataClass method? Cayenne squeezer: public Class getDataClass() { return DataObject.class; } BeanForm: public Class getDataClass() { return BeanProperty.class; } ahhh h (20 mins later), when I said I tried others I only tried PO (Persistent Object :) ). I tried 'q' and 'p' and they both work. Studying the Tapestry DataSqueezerImpl you see that (well it looks like it to me) all the characters in the prefix String are registered, using BP will reserve both the chars, B and P. Then my squeezer comes along with P and it fails with an error message that is a bit misleading. This is not the behaviour I was expecting. I was treating SqueezeAdapter.getPrefix() to set a unique String key for a squeezer, so that A is different to AA. Now I know but perhaps this trap could be removed? Thanks all for your suggestions. Steve On 19/12/06, Barry Books [EMAIL PROTECTED] wrote: Could it be both sqeezers are useable for the object you are trying to sqeeze? I'm not sure how that case is handled but the error looks similar to the one you get when you specify more that one persist option. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Squeeze adapter issue with Beanform
It looks to me like you're right: http://tapestry.apache.org/tapestry4/apidocs/src-html/org/apache/tapestry/util/io/DataSqueezerImpl.html Well, at least you found the problem, and I'll halve the chances of conflicts in the next release by cutting the prefix down to a single char. Take care, Daniel On 12/18/06, Steve Wells [EMAIL PROTECTED] wrote: Confirm it first, could be the lack of caffeine here, I'd be curious to see if you see it in the same way. On 18/12/06, DJ Gredler [EMAIL PROTECTED] wrote: Hmm... very interesting. I wonder why the squeezer prefix works that way? It looks like I probably need to change the BeanForm squeezer prefix to just be a single character, in order to minimize conflicts... On 12/18/06, Steve Wells [EMAIL PROTECTED] wrote: hmmm, thanks and good thinking guys not sure it nails it though... The prefix is P but I have tried others., BeanForm uses BP Barry I think the squeezer type is registered by the getDataClass method? Cayenne squeezer: public Class getDataClass() { return DataObject.class; } BeanForm: public Class getDataClass() { return BeanProperty.class; } ahhh h (20 mins later), when I said I tried others I only tried PO (Persistent Object :) ). I tried 'q' and 'p' and they both work. Studying the Tapestry DataSqueezerImpl you see that (well it looks like it to me) all the characters in the prefix String are registered, using BP will reserve both the chars, B and P. Then my squeezer comes along with P and it fails with an error message that is a bit misleading. This is not the behaviour I was expecting. I was treating SqueezeAdapter.getPrefix() to set a unique String key for a squeezer, so that A is different to AA. Now I know but perhaps this trap could be removed? Thanks all for your suggestions. Steve On 19/12/06, Barry Books [EMAIL PROTECTED] wrote: Could it be both sqeezers are useable for the object you are trying to sqeeze? I'm not sure how that case is handled but the error looks similar to the one you get when you specify more that one persist option. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jesse, Howard has removed your comment.[OT]
Tabs or spaces? On 12/13/06, Mark Stang [EMAIL PROTECTED] wrote: Before we go ANY further, we must resolve the curly brace alignment issue. Mark J. Stang Senior Engineer/Architect office: +1 303.468.2900 mobile: +1 303.507.2833 Ping Identity -Original Message- From: Daniel Jue [mailto:[EMAIL PROTECTED] Sent: Wed 12/13/2006 10:01 AM To: Tapestry users Subject: Re: Jesse, Howard has removed your comment.[OT] Can't we all just get along? We should just blatantly pillage any unique/better aspects of Wicket, and code name the next release Wickestryor Tappet. Borg style FTW! And it will come with a bundled Vimacs editor component you can embed in your app. Sorry, I am full of coffee. On 12/13/06, Martin Strand [EMAIL PROTECTED] wrote: Do you use vi or emacs? On Wed, 13 Dec 2006 16:47:52 +0100, Emmanuel Sowah [EMAIL PROTECTED] wrote: Sorry, the right link is: https://beta.blogger.com/comment.g?blogID=4110180postID=266226734789322024 On 12/13/06, Emmanuel Sowah [EMAIL PROTECTED] wrote: Hi Jesse, The nice comment you posted on Howard's blog at https://beta.blogger.com/comment.g?blogID=4110180postID=266226734789322024 to defend Tapestry against the Wicket Morons has been marked as troll and removed by Howard. Do you two disagree so much with each other? It's a pity. regards, Emmanuel - 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]
[announce] BeanForm 0.7
Hi all, The latest release of BeanForm, the single-line POJO editor component, is now available for download. Below is a list of changes since the last version. Special thanks to Remo von Ballmoos, Marco von Ballmoos and Barry Books for translations, bug fixes and suggestions. Take care, Daniel Gredler - Properties of type byte[] now automatically get an upload component. - Fix bug 1602203: user-defined models for enum properties are ignored. Thanks to Marco von Ballmoos. - Improve recognition of customized body to account for nested customization. Thanks to Remo von Ballmoos. - Allow binding overrides on save/cancel/refresh/delete buttons. - Allow button overrides via use of carefully-named components. - Add Portuguese translation. Thanks to thx1011. - Add German translation. Thanks to Remo von Ballmoos.
Re: about Beanform and JPA (persistence)
I haven't used EntityManagers directly, but your code looks fine to me, especially if it works ;-) You may want to wrap your flush( ) call in a try/catch block in case something goes wrong, and roll back the transaction in the catch block. Once you get more comfortable with things (and if you're using Hibernate), you may want to check out some of the integration packages (Tapernate, Honeycomb, etc) that handle transaction scoping for you. Spring might also be a good option if you end up splitting your app up into presentation / service / persistence layers. On 12/6/06, Cyrille37 [EMAIL PROTECTED] wrote: Hello, I'm coming back with a beginner question ;-) After 3 weeks of Java Web App discovering, I'm actually working with Tapestry 4.0.2, Netbeans 5.5 which give me easy data persistence support with JPA Toplink essential, and Tomcat5.5 and Mysql5. So I've finaly got something working with Beanform and JPA and I come to you to get comments and ideas and best practice. For the persistence, the method I've found is to do the following : * To remember with object I'm playing with : @Persist(client) public abstract int getProductId(); public abstract void setProductId(int productId); * To manage the Beanform's bean : private Product _product ; public Product getProduct() { if( this._product==null this.getProductId()0 ) { this.setProduct( this.loadProduct( this.getProductId ()) ); } return this._product ; } public void setProduct( Product product ) { this._product = product ; } * For initializing the page at the first time : public void activateExternalPage(Object[] parameters, IRequestCycle cycle) { int pid = Integer.parseInt( parameters[0].toString()); setProductId( pid ); this.setProduct ( this.loadProduct(pid) ); } * And finally to implement the Beanform 'save' listener : public String save() { System.out.println( ProductEdit.save() ); if( this.getDelegate().getHasErrors() ) return null; EntityManager em = getDataManagerFactory().GetEntityManager(); /*** I find that method a beat strange but it works ! ***/ em.getTransaction ().begin(); em.flush(); em.getTransaction().commit(); return Home; } Thanks to have read my poetry ;-) Cyrille. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MultipleComponents Submit
Yes, it's possible, but it takes a bit of hand waving. Check out the BeanForm source code for examples: http://beanform.sourceforge.net/ On 11/23/06, Skorpien126 [EMAIL PROTECTED] wrote: Hi @All... I want to make a MainComponent which includes a dynamic number of subcomponents, presenting String,Date etc. All these subcomponentes include a validation for the corresondending values. The mainComponent includes the Submit-Button which should update the values of the subcomponents to the database. My Question: Is it possible??? -- View this message in context: http://www.nabble.com/MultipleComponents-Submit-tf2693218.html#a7510454 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: button values
value=message:display-summary-button is a little better (shorter, no OGNL overhead), but still not what you're looking for... Maybe you could try to specify the binding in both the page spec and the page template, make the page spec the dynamic one, make the page template the static one, and hope that the binding in the page spec overrides the binding in the page template at runtime? :-) On 11/21/06, John Coleman [EMAIL PROTECTED] wrote: I want to internationalise my button values, I found using ognl works nicely, but the static rendering of the template is spoilt. Is there a way to keep value static and let Tapetry render the value from the proeprties file dynamically? TIA John input type=submit class=buttonExtraWide value=ognl: messages.getMessage ('display-summary-button') jwcid=downloadSummaryToCSV tabindex=15/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Do I nead a page spec to use BeanForm message catalogs?
No, there's no reason it shouldn't behave just like the rest of the messages on that page. I just did a quick test without a page spec, and you can still use message catalogs (both [page-name].properties and [application-name].properties). I'd do a quick span jwcid=@Insert value=message:email outside the BeanForm (but on the same page) just to verify that whatever behavior you're seeing is not BeanForm-related. Let me know what you find, Daniel On 11/21/06, Bill Holloway [EMAIL PROTECTED] wrote: Seems like it. If I remove the page specification from my WEB-INF, the beanform spits out the the ugly message catalog default properties displays like [EMAIL]. Thanks, Bill -- Budgets are moral documents. -- Ann Richards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: handle on component's enclosed components
AbstractComponent#getBody( ) maybe? On 11/17/06, Mike Oestereter [EMAIL PROTECTED] wrote: Yes,yes I know Tapestry has an API - I just don't know it that well! I am NOT looking for the nested or the contained components of a page/component. I'm specifically looking for only the components that is in the body part of a surrounding component (rendered by a @RenderBody of Main using my example). On 11/17/06, Karthik N [EMAIL PROTECTED] wrote: Look at the API docs http://tapestry.apache.org/tapestry4/tapestry/apidocs/index.html AbstractPage has getNestedComponent AbstractPage extends AbstractComponent that has getComponents() HTH On 11/17/06, Mike Oestereter [EMAIL PROTECTED] wrote: Hi Say I've got the following on a template page where Main and Sub are components.. span jwcid=[EMAIL PROTECTED] . . . phtml/p !-- maybe even a @For here?? -- span jwcid=[EMAIL PROTECTED] . . ./ span jwcid=[EMAIL PROTECTED] . . ./ pmore html/p /span Is there a way to get in Main's class a handle on all the Sub components enclosed by Main without adding an explicit reference in each Sub to Main? Many thanks Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [announce] BeanForm 0.5
Hi Walter, BeanForm uses message catalogs for the button labels, and as far as I can tell from some quick experimentation you cannot override these messages in your own application (surprising, actually). I've been getting a few button-related enhancement requests lately, so that may be the focus of the next release. If you have needs and suggestions, please post feature requests to the SF project page [1] and I'll see what I can do. In the meantime, yes, you will need to wrap the BeanForm in a Form :-) Take care, Daniel [1] http://sourceforge.net/tracker/?group_id=171323atid=857541 On 11/14/06, Walter Kelly [EMAIL PROTECTED] wrote: Hi Daniel, We have just started to experiment with using the BeanForm on our current project and so far so good. Is there any way the change the labels for the form generated buttons, like the save and delete? I've tried overriding the bindings, similiar to way it's suggested for the input fields but I have been meet with no success. Also, I would like to be able to do it without wrapping the BeanForm in another form, unless that's the suggested way. Thanks, Walter
Re: tapestry-prop
Well, and then you do a global search and replace of ognl: into prop: in your .page, .html and .jwc files. Well, *almost* global ;-) On 11/13/06, Martin Strand [EMAIL PROTECTED] wrote: Just add the jar to your classpath, you don't need to do anything else. On Mon, 13 Nov 2006 17:28:50 +0100, Peter Stavrinides [EMAIL PROTECTED] wrote: Hi I am using Tomcat with Tapestry 4.1. Has anyone tried using tapestry-prop with 4.1? What do I need to do to use it, and how do I configure it? Thanks Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [announce] BeanForm 0.6
Hi Carlos, If the bean is not marked persistent, it will be null on form rewind when the BeanForm tries to set its property values. Another option may be to implement PageBeginRenderListener and ensure the bean is initialized inside the pageBeginRender(PageEvent) method (I've never tried it though). Let me know if you experiment with alternate solutions. Take care, Daniel On 11/13/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Daniel, Why does the POJO used by beanform need to be persisted? As per component reference: The Java bean to be displayed by the component; any old POJO. The bean specified must be marked persistent in the page specification. Carlos -Original Message- From: DJ Gredler [mailto:[EMAIL PROTECTED] Sent: Sunday, November 12, 2006 6:29 PM To: Tapestry users Subject: [announce] BeanForm 0.6 Hi all, The latest release of BeanForm, the single-line POJO editor component, is now available for download. Below is a list of changes since the last version. I made a special trip to Spain to get the Spanish translation strings (my wife thought it was a vacation), so I hope someone finds them useful ;-) Special thanks to Grzegorz Mrówka and Andreas Andreou for translations and suggestions! Happy hacking, Daniel Gredler Changes: - When moving values from submitted form to properties, only instantiate null elements of recursive properties when values submitted are not null. - Base input field ids on property names. - Add pseudo properties as a way of mixing custom fields with bean fields. - Make it easier for multi-field binding overrides using OGNL to refer to the current property. - Remove non-threadsafe use of SimpleDateFormat in the Hibernate Validator integration code. - Add support for @Pattern Hibernate Validator annotation. - Use PropertySelection component for enum bean properties. - Add Polish translation. Thanks to Grzegorz Mrówka. - Add Greek translation. Thanks to Andreas Andreou. - Add French translation. - Add Spanish translation. Homepage: http://beanform.sourceforge.net/ Component Reference: http://beanform.sourceforge.net/component-reference.html Change History: http://beanform.sourceforge.net/changes-report.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[announce] BeanForm 0.6
Hi all, The latest release of BeanForm, the single-line POJO editor component, is now available for download. Below is a list of changes since the last version. I made a special trip to Spain to get the Spanish translation strings (my wife thought it was a vacation), so I hope someone finds them useful ;-) Special thanks to Grzegorz Mrówka and Andreas Andreou for translations and suggestions! Happy hacking, Daniel Gredler Changes: - When moving values from submitted form to properties, only instantiate null elements of recursive properties when values submitted are not null. - Base input field ids on property names. - Add pseudo properties as a way of mixing custom fields with bean fields. - Make it easier for multi-field binding overrides using OGNL to refer to the current property. - Remove non-threadsafe use of SimpleDateFormat in the Hibernate Validator integration code. - Add support for @Pattern Hibernate Validator annotation. - Use PropertySelection component for enum bean properties. - Add Polish translation. Thanks to Grzegorz Mrówka. - Add Greek translation. Thanks to Andreas Andreou. - Add French translation. - Add Spanish translation. Homepage: http://beanform.sourceforge.net/ Component Reference: http://beanform.sourceforge.net/component-reference.html Change History: http://beanform.sourceforge.net/changes-report.html
Re: [Fwd: Re: [Htmlunit-user] Testing Tapestry]
I've been using HtmlUnit for the BeanForm integration tests. The one bug I encountered in HtmlUnit was patched within days. Of course, I'm not using any of the async stuff :-) Also FYI, I'm currently pushing to get the unit tests for some of the more popular JavaScript libraries integrated into the HtmlUnit builds... so for example HtmlUnit version X could by guaranteed to be compatible with Dojo version Y and Prototype version Z. On 11/10/06, Dan Adams [EMAIL PROTECTED] wrote: FYI, for people using HtmlUnit with 4.1 and Tacos. Marc is the author of HtmlUnit. Forwarded Message From: Marc Guillemot [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [Htmlunit-user] Testing Tapestry Date: Fri, 10 Nov 2006 10:01:10 +0100 I can't say anything on tapestry but htmlunit's AJAX support (and more generally javascript support) is continuously improved. Looking quickly on tapestry's mailing list I've seen some complaining about stuff that fail in htmlunit. Perhaps could it already be fixed if they would have reported it to the right place ;-( Marc. Dan Adams wrote: This is something I'm planning on doing but haven't done yet (which is why I'm still using tapestry 4 rather than 4.1). If you haven't already I'd suggest email the tapestry list as Jesse has done a bit of work in this area. On Thu, 2006-11-09 at 13:02 -0300, Rodrigo wrote: Hi, I'm new to HtmlUnit, and I'm having some trouble testing a Tapestry application, mainly with AJAX components. At first I couldn't make a page using XTile to work at all... I then, for a completely different reason, changed the user-language of the BrowserVersion (from en-us to es-ar) and xtile started working!... but... in my Xtile, in the receiving JavaScript function, I was doing a split of a string into an array, and THAT started to fail... instead of spliting at the character I said, it splitted every single character... I'm also having trouble with Tacos, it's not that important, because it's just an autocompleter, but of course it would be nice if it worked. Has anyone tried to test a Tapestry application using Xtile and/or Tacos? Is there anywhere where I could see some examples? DarkRodro - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Htmlunit-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/htmlunit-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Htmlunit-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/htmlunit-user -- Dan Adams Senior Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: implementing friendly urls
Yeah, but all of that happens in the page itself. The ServiceEncoder just works on parameters if they exist. On 10/20/06, Warner Onstine [EMAIL PROTECTED] wrote: Do you currently handle null/empty params, so that if a user types in manually: http://localhost:8080/eventscalendar/event/ it would redirect somewhere instead of showing a bad exception page? -warner On Oct 19, 2006, at 9:58 PM, DJ Gredler wrote: I ended up hacking together a custom ServiceEncoder that knew which pages took a single String param, which took a single Long param, which took two Long params, etc. It strips the first character off of the parameters as needed in the encode( ) method and adds them back in the decode( ) method. Ugly, but it was quick and it works. Hopefully this will be done via the new type coercion framework in Tap5 so that the type identifiers aren't needed... http://tapestry.apache.org/tapestry5/guide/coercion.html On 10/20/06, Warner Onstine [EMAIL PROTECTED] wrote: So far I have everything working the way that I want but I ran into something odd while implementing this: http://tapestry.apache.org/tapestry4/UsersGuide/friendly-urls.html specifically I am implementing the REST-like part of the friendly urls the custom encoder. I created my own encoder/decoder pair but when I call it for an external link I get this as my url: http://localhost:8080/eventscalendar/event/l1 After looking at this again I finally realized what that extra character is, it is telling Tapestry that the value I'm passing is a Long (which it is when it gets set on the wire), is there a way (short of changing the actual value passed to an int) to get this to remove the extra param, or am I stuck with it if I want to change it? Also, I am curious if anyone has developed a full-blown REST plugin for Tapestry so that all the urls are easily mappable (ala Rails). So that something like this http://localhost:8080/eventscalendar/events/ would go to a default page like EventsHome.html and http://localhost:8080/eventscalendar/events/new would go to NewEvent.html etc. It would be nice if we could easily do routes like Rails does in a default Tapestry app, rather than having to jump through two files (web.xml and hivemodule.xml). -warner - 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: implementing friendly urls
I ended up hacking together a custom ServiceEncoder that knew which pages took a single String param, which took a single Long param, which took two Long params, etc. It strips the first character off of the parameters as needed in the encode( ) method and adds them back in the decode( ) method. Ugly, but it was quick and it works. Hopefully this will be done via the new type coercion framework in Tap5 so that the type identifiers aren't needed... http://tapestry.apache.org/tapestry5/guide/coercion.html On 10/20/06, Warner Onstine [EMAIL PROTECTED] wrote: So far I have everything working the way that I want but I ran into something odd while implementing this: http://tapestry.apache.org/tapestry4/UsersGuide/friendly-urls.html specifically I am implementing the REST-like part of the friendly urls the custom encoder. I created my own encoder/decoder pair but when I call it for an external link I get this as my url: http://localhost:8080/eventscalendar/event/l1 After looking at this again I finally realized what that extra character is, it is telling Tapestry that the value I'm passing is a Long (which it is when it gets set on the wire), is there a way (short of changing the actual value passed to an int) to get this to remove the extra param, or am I stuck with it if I want to change it? Also, I am curious if anyone has developed a full-blown REST plugin for Tapestry so that all the urls are easily mappable (ala Rails). So that something like this http://localhost:8080/eventscalendar/events/ would go to a default page like EventsHome.html and http://localhost:8080/eventscalendar/events/new would go to NewEvent.html etc. It would be nice if we could easily do routes like Rails does in a default Tapestry app, rather than having to jump through two files (web.xml and hivemodule.xml). -warner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bug with large dynamic forms?
Never heard of anything like this... On 10/15/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Of course I can design around the issue, but I would prefer not to. This component of the application is internal only, to the amount of data passed in the request is not as big of a deal. The point was to eliminate unneccessary pagination, which I have seen have a history of aggrivating users working on large datasets. I am just trying to find out if this is a known issue before I work on putting together a simpler recreation of the problem for a bug report. If this capacity of the framework can only work within a threshold, then it seems like a bug, be it in the framework or the docs. Original Message Subject: Re: Bug with large dynamic forms? From: Jabbar [EMAIL PROTECTED] Date: Sun, October 15, 2006 4:22 pm To: Tapestry users users@tapestry.apache.org Hello, I've never had to show hundreds of objects. Can't you reduce the number of objects to show? On 15/10/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry about that, this is with version 4.0.2. Original Message Subject: Bug with large dynamic forms? From: [EMAIL PROTECTED] Date: Sun, October 15, 2006 4:16 pm To: users@tapestry.apache.org Hello all! I think I way be experiencing a bug in tapestry but wanted to find out if anyone else had experienced it or has heard about it. When I have a large dynamic form, with fields rendered for a couple hundred objects in my collection, the Form component seems to wig out and not render the formids hidden field properly. Instead of the expected value=imagesList,title,date,location,tags,rotate,description,title_0,d ... etc. I see that it renders (for the formids hidden field) a value attribute that looks like value=1000+ spaces /. No quotes, just value=, then over a thousand spaces, then the close of the tag. I struggled all day with the form not working, then noticed this weird formids value in the rendered page source. After failing to see what I was doing incorrectly, I finally gave up and just for a random stab, tested my page with a dataset of only 6 objects instead of a few hundred. And it worked! -- Thaddeus - 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] -- Thanks A Jabbar Azam - 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: What causes Unable to read OGNL expression 'parsed OGNL expression' errors?
Just taking a quick stab at it... It says it can't find property $BasePage_0.rawDataFeedList, so it looks like maybe Tapestry is using an enhanced version of BasePage, not your Home page. Does your page specification XML file point to your class or to Tapestry's BasePage? On 10/7/06, Dave Rathnow [EMAIL PROTECTED] wrote: Could someone tell me what causes this error: Unable to read OGNL expression 'parsed OGNL expression' ... ognl.NoSuchPropertyException: $BasePage_0.rawDataFeedList I'm a little confused becuase I'm getting this exception toss when it looks like I have everything setup correctly. I am using Tapestry 4 with Java 1.5. My Home.html file has the following: tr jwcid=@For source=ognl:rawDataFeedList value=ognl:rawDataFeed element=tr . and my java file looks like this: public abstract class Home extends BasePage { public final static String PAGE_NAME = Home; public abstract RawDataFeed getRawDataFeed(); public abstract void setRawDataFeed(RawDataFeed aRawDataFeed); @InjectPage(RawDataFeedAddPage.PAGE_NAME) public abstract RawDataFeedAddPage getRawDataFeedAddPage(); @InjectPage(RawDataFeedInspectorPage.PAGE_NAME) public abstract RawDataFeedInspectorPage getRawDataFeedInspector(); public ListRawDataFeed getRawDataFeedList() { return getFeedManager().getManagedFeeds(); } public IPage addFeedAction() { RawDataFeed rawDataFeed = new RawDataFeed(); RawDataFeedAddPage page = getRawDataFeedAddPage(); page.setRawDataFeed(rawDataFeed); return page; } public IPage viewRawDataFeed(String aName) { RawDataFeedInspectorPage rawDataFeedInspector = getRawDataFeedInspector(); RawDataFeed rawDataFeed = getFeedManager().rawDataFeedWithName(aName); rawDataFeedInspector.setRawDataFeed(rawDataFeed.deepClone()); return rawDataFeedInspector; } public void deleteFeedAction(String aName) { getFeedManager().deleteFeedWithName(aName); try { getFeedManager().save(); } catch (ApplicationException e) { e.printStackTrace(); } } private FeedManager getFeedManager() { return Application.sharedInstance().getFeedManager(); } } Looks to me like I have a getRawDataFeedList method, which should map to ognl:rawDataFeedList. I've tried adding a setter method (though I don't need one) but nothing changed. Can someone explain what I'm missing? Thanks, Dave
Re: What causes Unable to read OGNL expression 'parsed OGNL expression' errors?
On 10/7/06, Dave Rathnow [EMAIL PROTECTED] wrote: Hmmmmaybe I'm more confused than I think. Is the .page file necessary with Tapestry 4 and java 1.5. I didn't create one and things seemed to be working fine until I moved the project from my work PC to my home. Does every Tapestry 4 component have to have a .page, .html, and .java file? No, I just assumed you had a .page file. Maybe you can whip up a small .page file real quick to see if it can find the property when you specify a page class explicitly. This page documents the page class resolution process: http://tapestry.apache.org/tapestry4/UsersGuide/page-class.html
Re: [announce] BeanForm 0.5
I'm afraid I don't see the old notation anywhere... what example are you looking at? On 10/4/06, Patrick Moore [EMAIL PROTECTED] wrote: Thanks ... I am going to try this.. btw .. your on-line doc still uses the old notation On 10/2/06, DJ Gredler [EMAIL PROTECTED] wrote: Hi all, The latest release of BeanForm, the single-line POJO editor component, is now available for download. Below is a list of changes since the last version. There are two incompatible changes that all current users should be aware of -- they're at the very end. Happy hacking, Daniel Gredler Changes: - Add exclude parameter to the BeanForm component. - Dynamic binding overrides for input fields via informal parameters on the BeanForm (very cool). - Add Italian translation. Thanks to Edoardo Campagnano. - More efficient dynamic validator list building process (~70% form rewind time savings). - Don't use deprecated translator binding. - Fix bug 1554067: input override via use of carefully-named components breaks when using BeanForm inside a custom component. Thanks to Edoardo Campagnano. - Fix bug 1560627: input override can't be used when you have 2+ BeanForms. Thanks to Edoardo Campagnano. - Fix bug 1565487: indexed JavaBean properties cause NPEs in BeanProperty#getTypeName(). Thanks to Jon McCarty. - Fix bug 1565478: write-only JavaBean properties cause NPEs in BeanProperty#getValue(). Thanks to Jon McCarty. Incompatible Changes: - If you are overriding inputs via the use of carefully-named components, the new naming formula is [beanform-component-id]_[property-name]_BeanFieldBlock and [beanform-component-id]_[property-name]_BeanField. Adding the BeanForm's id to the naming convention allows users with more than one BeanForm on their page to use this override method. - If you are using [property-name]PSM informal parameters to get dropdown boxes for your properties, the new naming convention is [property-name]_model. This change was made to make the convention consistent with the new dynamic binding override functionality ([property-name]_[binding-name]). Homepage: http://beanform.sourceforge.net/ Component Reference: http://beanform.sourceforge.net/component-reference.html Change History: http://beanform.sourceforge.net/changes-report.html
Re: [announce] BeanForm 0.5
Ah, I think you're confusing the page property names with the parameter names. The convention is in the naming of the informal parameters (like owner_model and manufacturer_model). You can name your page properties however you like (in this case ownerPSM and manufacturerPSM). I'll try to make the wording clearer. On 10/5/06, Patrick Moore [EMAIL PROTECTED] wrote: In section 5. (http://beanform.sourceforge.net/component-reference.html) I see references to 'PSM' for the property selection model.. but I think I may have just misread your release note. On 10/4/06, DJ Gredler [EMAIL PROTECTED] wrote: I'm afraid I don't see the old notation anywhere... what example are you looking at?
[announce] BeanForm 0.5
Hi all, The latest release of BeanForm, the single-line POJO editor component, is now available for download. Below is a list of changes since the last version. There are two incompatible changes that all current users should be aware of -- they're at the very end. Happy hacking, Daniel Gredler Changes: - Add exclude parameter to the BeanForm component. - Dynamic binding overrides for input fields via informal parameters on the BeanForm (very cool). - Add Italian translation. Thanks to Edoardo Campagnano. - More efficient dynamic validator list building process (~70% form rewind time savings). - Don't use deprecated translator binding. - Fix bug 1554067: input override via use of carefully-named components breaks when using BeanForm inside a custom component. Thanks to Edoardo Campagnano. - Fix bug 1560627: input override can't be used when you have 2+ BeanForms. Thanks to Edoardo Campagnano. - Fix bug 1565487: indexed JavaBean properties cause NPEs in BeanProperty#getTypeName(). Thanks to Jon McCarty. - Fix bug 1565478: write-only JavaBean properties cause NPEs in BeanProperty#getValue(). Thanks to Jon McCarty. Incompatible Changes: - If you are overriding inputs via the use of carefully-named components, the new naming formula is [beanform-component-id]_[property-name]_BeanFieldBlock and [beanform-component-id]_[property-name]_BeanField. Adding the BeanForm's id to the naming convention allows users with more than one BeanForm on their page to use this override method. - If you are using [property-name]PSM informal parameters to get dropdown boxes for your properties, the new naming convention is [property-name]_model. This change was made to make the convention consistent with the new dynamic binding override functionality ([property-name]_[binding-name]). Homepage: http://beanform.sourceforge.net/ Component Reference: http://beanform.sourceforge.net/component-reference.html Change History: http://beanform.sourceforge.net/changes-report.html
Re: Jetty 6 / Tapestry 4 sample code?
I was able to do this recently without too much trouble by studying this code (though I use HtmlUnit as the client, rather than Selenium): http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/IntegrationTests.java?view=markup http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/JettyRunner.java?view=markup It assumes a Maven2 directory structure, but you might be able to get some ideas even if you aren't using Maven. On 9/28/06, Kevin Whitley [EMAIL PROTECTED] wrote: Sorry for the newbie question (the FAQ for this mailing list is empty?) but I've been banging my head on this wall for a bit. I've written some small test Tapestry 4 applications and deployed to Tomcat with no trouble. But what I'd like to do is to completely embed the servlet engine in my code. Jetty seems to be a good tool for that. But I haven't been successful putting together a Jetty 6 servlet with Tapestry. I can't even tell if I'm calling the wrong methods in Jetty, or my configuration is wrong or what. So, are there any trivial examples of code with this stack? All the examples I've seen so far have been with old code and I'd rather start with the most recent releases. Thanks for any help, [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: request for components to be rolled into the main release...(jumpstart, tacos, contrib, etc)
Watching with interest... On 9/26/06, Patrick Moore [EMAIL PROTECTED] wrote: Hi there -- Please consider this a vote to roll the tacos and contrib components into the main release. Having lots of scattered component libraries around means that newbie developers like me start implementing something that has already been done before. For example, I just found the jumpstart project and am looking to use its redirect-after-post feature. Would have saved me some time I think if this was part of the main tap release. Thanks guys I hope to be able to contribute soon myself. -Pat
Re: request for components to be rolled into the main release...(jumpstart, tacos, contrib, etc)
The Maven2 license clickthrough functionality that Jesse mentioned will allow code that integrates with LGPL-licensed projects (like Hibernate) to be distributed under the official Tapestry moniker -- think Tapernate, Cognition, Honeycomb, BeanForm, etc. If you're interested in getting this kind of integration rolling, consider stopping by the Maven2 JIRA site and voting for issue MNG-671 at http://jira.codehaus.org/browse/MNG-671. And that's my sales pitch for the day ;-) Daniel On 9/26/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I'd like to see a few bits and pieces of different projects make their way into Tapestry directly - or as s sub-project as well. Most of them are currently waiting for Daniel's great work on getting this maven2 click through functionality working so that we can handle the varying licensing issues involved. As for individual features - like what you mentioned in JumpStart - you can vote if you'd like but it doesn't make it any easier for me to find time to look at it...A simple patch posted on JIRA would go a lot farther ;) On 9/26/06, DJ Gredler [EMAIL PROTECTED] wrote: Watching with interest... On 9/26/06, Patrick Moore [EMAIL PROTECTED] wrote: Hi there -- Please consider this a vote to roll the tacos and contrib components into the main release. Having lots of scattered component libraries around means that newbie developers like me start implementing something that has already been done before. For example, I just found the jumpstart project and am looking to use its redirect-after-post feature. Would have saved me some time I think if this was part of the main tap release. Thanks guys I hope to be able to contribute soon myself. -Pat -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: DatePicker error
I'm using Tap4 with Hibernate 3.1.2 without a problem and I see the following XML-related JARS in my lib directory: dom4j 1.6.1, saxpath 1.0FCS, Xerces Impl 2.6.2, XML Parser APIs 2.2.1. Not sure how you would find out what the official dependencies are. On 9/26/06, Hajaansh [EMAIL PROTECTED] wrote: Ah, so that is the reason that no one answered :-) That might have been a good tip from you though! I have found a Xerces 2.6.2 jar which came with hibernate and I dont really have a clue if Tapestry (4.0) is using that one. I have also found one which came with my Java 1.5 installation. Any way to find out which Tapestry is using? I am not sure if just deleting the version that came with Hibernate would be a good idea or? Thanks for your quick response! On 9/26/06, DJ Gredler [EMAIL PROTECTED] wrote: I really have no idea, but maybe you have multiple versions of Xerces running around on your classpath, or just a single (wrong) version? These kinds of errors are always hard to debug... On 9/26/06, Hajaansh [EMAIL PROTECTED] wrote: No one knows what the problem could be? Each time a restart Tomcat it seems to be fine. Maybe it is so obvious no one is responding? On 9/19/06, Hajaansh [EMAIL PROTECTED] wrote: Sorry, the error message was formatted strangely the last time. This time I hope it is better... Any ideas anyone? Could it be how I started Tomcat? I started it with: set JAVA_OPTS=-Dorg.apache.tapestry.disable-caching=true set JPDA_ADDRESS=9045 set JPDA_TRANSPORT=dt_socket C:\Tomcat\apache-tomcat-5.5.17\bin\catalina jpda start and the error I got from the DatePicker is as follows (i hope this time the formating is not as bad as the last time...) org.apache.hivemind.ApplicationRuntimeException org.apache.xerces.parsers.XML11Configuration location: classpath:/org/apache/tapestry/form/DatePicker.jwc, line 36, column 71 31 parameter name=validators/ 32 parameter name=id property=idParameter default-value=id/ 33 34 asset name=defaultIcon path=DatePickerIcon.png/ 35 36 inject property=script type=script object=DatePicker.script / 37inject property=translatedFieldSupport object=service: tapestry.form.TranslatedFieldSupport/ 38 inject property=validatableFieldSupport object=service: tapestry.form.ValidatableFieldSupport/ 39 40/component-specification java.lang.ClassCastException org.apache.xerces.parsers.XML11Configuration Stack Trace: - org.apache.xerces.parsers.SAXParser.init(Unknown Source) - org.apache.xerces.parsers.SAXParser.init(Unknown Source) - org.apache.xerces.jaxp.SAXParserImpl.init(Unknown Source) - org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser (Unknown Source) - org.apache.tapestry.util.xml.RuleDirectedParser.constructParser ( RuleDirectedParser.java:426) - org.apache.tapestry.util.xml.RuleDirectedParser.parse( RuleDirectedParser.java:155) - org.apache.tapestry.util.xml.RuleDirectedParser.parse( RuleDirectedParser.java:130) - org.apache.tapestry.script.ScriptParser.parse(ScriptParser.java :105) - org.apache.tapestry.engine.DefaultScriptSource.parse( DefaultScriptSource.java:88) - org.apache.tapestry.engine.DefaultScriptSource.getScript( DefaultScriptSource.java:74) - $IScriptSource_10dc21a16a2.getScript($IScriptSource_10dc21a16a2.java) - org.apache.tapestry.enhance.DeferredScriptImpl.getScript( DeferredScriptImpl.java:54) - $DatePicker_699.getScript($DatePicker_699.java) - org.apache.tapestry.form.DatePicker.renderFormComponent( DatePicker.java:129) - org.apache.tapestry.form.AbstractFormComponent.renderComponent( AbstractFormComponent.java:126) - org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:617) - org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:434) - org.apache.tapestry.form.FormSupportImpl.render( FormSupportImpl.java:486) - org.apache.tapestry.form.Form.renderComponent(Form.java:250) - org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:617) - org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:434) - org.apache.tapestry.components.RenderBody.renderComponent( RenderBody.java:44) - org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:617) - org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:434) - org.apache.tapestry.html.Body.renderComponent(Body.java:129) - org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:617) - org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:434) - org.apache.tapestry.html.Shell.renderComponent(Shell.java:114) - org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:617
Re: Calling a page with parameters from other page
If I'm understanding the question correctly, you probably want to do: @InjectObject( engine-service:external ) public abstract IEngineService getExternalService(); ExternalServiceParameter param = new ExternalServiceParameter( pageName, new Object[] { ... } ); ILink link = this.getExternalService().getLink( false, param ); return link; Returning the external link to the page redirects to the page. On 9/26/06, Daniel Castro [EMAIL PROTECTED] wrote: Guys, help me again. I have 2 pages. The problem is to call the method activateExternalPage on page B. This is what i have done so far, but no sucess. The page B loads without the values passed on the ExternalCallback. What is missing? - Page A @InjectPage(Edit) public abstract EditarForm getEditPage(); public EditarForm edit(String id,Produto produto,DetalheDTO detalhe){ setNextPage( new ExternalCallback(getEditPage(), new Object[] { produto, detalhe })); this.getRequestCycle().activate(Edit); return getEditPage(); } Page B implements IExternalPage and has the method public void activateExternalPage(Object[] parameters, IRequestCycle cycle) The problem is that the method activateExternalPage -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill
Re: BeanForm for TP3?
Sounds good. Keep me and/or the list updated, if you don't mind. Take care, Daniel On 9/25/06, Darío Vasconcelos [EMAIL PROTECTED] wrote: Thanks Daniel, I didn't recognize the title of my own post (duh!) and didn't notice you had replied to it. I will search the list and try to do the backport. Losing automatic validations and other stuff doesn't worry me that much; I'm assembling a team of Tapestry newbies for a project I'm starting and they're having a hard time climbing the learning curve... so I thought maybe BeanForm would speed development, if not helped them to understand TP a little more Regards, Dario On 9/20/06, DJ Gredler [EMAIL PROTECTED] wrote: I don't have plans to backport it to Tap3, mainly because I don't use Tap3 and because I don't have any experience using Tap3. There has been some interest from others on this list in doing a backport (search the list), so you might want to get together to tackle it. It's Apache2-licensed, so nothing stops you. The only thing is that the next version or two will still be pretty large improvements over previous iterations, so keeping in sync with the original codebase might be an issue. I assume you realize that you'd have to eliminate some of the nicer features (like automatic validation generation based on annotations) in order to target older JDKs. Take care, Daniel On 9/20/06, Darío Vasconcelos [EMAIL PROTECTED] wrote: Hi, since recently someone mentioned the BeanForm component, I've been reading about it and wondering if there's a version for Tapestry 3, because I'm still stuck with old JDKs and app servers... In case there isn't such thing, would a backport be possible? Too much hard work? I haven't really gotten into all the annotation and HiveMind stuff and it looks kinda complicated from here... Regards, Dario -- Some weasel took the cork out of my lunch. -- W.C. Fields - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Some weasel took the cork out of my lunch. -- W.C. Fields - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What does your project directory structure look like?
I've used Maven2 to manage my newest project, and I'm quite happy with all the freebies you get when you follow their standard directory structure: builds, source builds, unit testing, test coverage, site building, dependency management (inside eclipse, too) etc. The site-building module for Maven2 still feels beta-quality, but that's about my only complaint. So basically I'm saying me too to Igor's post below :-) On 9/22/06, soir [EMAIL PROTECTED] wrote: My multimodule project's directory structure looks like (it's suggested by Maven): workspace\projectname workspace\projectname\src\main\java workspace\projectname\src\main\resources workspace\projectname\src\main\webapp workspace\projectname\src\main\webapp\images workspace\projectname\src\main\webapp\script workspace\projectname\src\main\webapp\style workspace\projectname\src\main\webapp\META-INF workspace\projectname\src\main\webapp\WEB-INF workspace\projectname\src\test\java workspace\projectname\src\test\resources workspace\projectname\target\classes Daniel Jue wrote: Hi, I'm relatively new to Tap, and I am starting with Tap 4 and Eclipse. I've been using the directory structures as seen in Kent Tong's book. I also noticed the Tapestry examples (vlib and workbench) have html files that live in the root of the application, instead of in web-inf. Is this a standard thing to do? I've read that things inside web-inf can't be accessed directly by a web browser, so that seems like the correct place for the .page/.jwc's to go. Like I said, I have something that _works_, I am just curious to see if there are benefits to other methods, or drawbacks to mine (i'm sure my approach is naive): workspace\projectname workspace\projectname\build\classes (output dir for compiled classes) workspace\projectname\deploy (holds my war file when I export from eclipse) workspace\projectname\src\mypackage\ (no .java at this level) workspace\projectname\src\mypackage\model\ (classes that know nothing about tapestry) workspace\projectname\src\mypackage\controller\ (classes for pages and components) workspace\projectname\src\META-INF\ (holds hivemind.xml and sessions.xml ) workspace\projectname\WebContent\css (css files) workspace\projectname\images (jpgs) workspace\projectname\META-INF (I think eclipse made this dir and manifest.mf for me) workspace\projectname\WEB-INF (all my .html, .page and .jwc files live directly in WEB-INF, as well as projectname.application and web.xml) workspace\projectname\lib (hold jars for jscookmenu, BIRT, etc) workspace\projectname\reporting\BIRT (holds birt engine, jars, resources, etc) When I export my project to a WAR, things in workspace\projectname\build\classes get put in WEB-INF\classes Please let me know what you think. I'm sure you guys have better organized project structures. For instance, do your Tapestry projects look like this? http://java.sun.com/blueprints/code/projectconventions.html Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/What-does-your-project-directory-structure-look-like--tf2315087.html#a6441834 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: What does your project directory structure look like?
There's a Maven2 Eclipse plugin (http://maven.apache.org/eclipse-plugin.html) that will read your pom.xml (Project Object Model) and auto-update the Eclipse build path for the project. There's even an option to have it download the source code for all the dependencies (for easier debugging), but I've found that most projects haven't started posting source bundles yet. As far as running the app, I used to use the Sysdeo Tomcat plugin, but I'm slowly migrating to using the Jetty Maven2 plugin. On the commandline you do mvn jetty:run and if you have it set up right it'll watch for changed files and pick them up automatically. Combine this with disabling the Tapestry caches, and you're good to go. Josh Long was the one that got me to try this with his recent post to this mailing list ( http://www.nabble.com/Fast-testing-of-Tapestry-Apps-tf2139725.html#a5996591 ). I spent about a day tearing my hair out trying to figure out why various things wouldn't work, mostly with site generation. But now that that's over, I'm extremely happy with it. On 9/22/06, Robin Ericsson [EMAIL PROTECTED] wrote: On 9/22/06, DJ Gredler [EMAIL PROTECTED] wrote: I've used Maven2 to manage my newest project, and I'm quite happy with all the freebies you get when you follow their standard directory structure: builds, source builds, unit testing, test coverage, site building, dependency management (inside eclipse, too) etc. The site-building module for Maven2 still feels beta-quality, but that's about my only complaint. How do you work with your project in eclipse? Also, do you use eclipse to run jetty/tomcat or do you used an external alternative? -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanForm and no setter method for persistence id
Cool, thanks for the update! On 9/22/06, Claus Myglegaard Vagner [EMAIL PROTECTED] wrote: Hi Daniel, You are quite right! No problem with BeanForm component. The problem were somewhere else in the code... Claus DJ Gredler skrev: Are you listing the properties explicitly, i.e. properties=name,description? If that's the case, I don't see how the BeanForm knows anything at all about your ID field. And if there's not even a setId( ) method, there's no way at all for BeanForm to modify the property (it doesn't modify fields directly). Is your Group object marked persistent in the page specification? This sounds like a problem somewhere else... Keep me updated, Daniel On 9/21/06, *Claus Myglegaard Vagner* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, Is it possible to use the BeanForm component ( http://beanform.sourceforge.net/) for updating a pojo with no setter method for a persistence id? For example I have a Group object with properties id, name, description. In the form only name and description is shown. I don't want to show the id and I don't want to have a setId(id) method on the pojo. This should be controlled by hibernate (with field access) completely. When there is no setter method for id - BeanForm is returning a Group object with a null value for id. This means that what should have been an update in the database becomes an insert since hibernate thinks that it is an not-persisted object (no id). Why cant the BeanForm component just update the fields in action (in the form) for the pojo e.g . just call setName and setDecription and leave the id intact? Regards Claus - To unsubscribe, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Re: What does your project directory structure look like?
I actually haven't had to do any debugging yet, so I haven't crossed this bridge... but I assume you'd have to use external debugging. Maybe Josh has some advice :-) On 9/22/06, Robin Ericsson [EMAIL PROTECTED] wrote: Really nice. Have to try that. How to use debugging in eclipse from that? External debugging enabled on jetty?
Re: BeanForm and no setter method for persistence id
Are you listing the properties explicitly, i.e. properties=name,description? If that's the case, I don't see how the BeanForm knows anything at all about your ID field. And if there's not even a setId( ) method, there's no way at all for BeanForm to modify the property (it doesn't modify fields directly). Is your Group object marked persistent in the page specification? This sounds like a problem somewhere else... Keep me updated, Daniel On 9/21/06, Claus Myglegaard Vagner [EMAIL PROTECTED] wrote: Hi, Is it possible to use the BeanForm component (http://beanform.sourceforge.net/) for updating a pojo with no setter method for a persistence id? For example I have a Group object with properties id, name, description. In the form only name and description is shown. I don't want to show the id and I don't want to have a setId(id) method on the pojo. This should be controlled by hibernate (with field access) completely. When there is no setter method for id - BeanForm is returning a Group object with a null value for id. This means that what should have been an update in the database becomes an insert since hibernate thinks that it is an not-persisted object (no id). Why cant the BeanForm component just update the fields in action (in the form) for the pojo e.g. just call setName and setDecription and leave the id intact? Regards Claus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanForm for TP3?
I don't have plans to backport it to Tap3, mainly because I don't use Tap3 and because I don't have any experience using Tap3. There has been some interest from others on this list in doing a backport (search the list), so you might want to get together to tackle it. It's Apache2-licensed, so nothing stops you. The only thing is that the next version or two will still be pretty large improvements over previous iterations, so keeping in sync with the original codebase might be an issue. I assume you realize that you'd have to eliminate some of the nicer features (like automatic validation generation based on annotations) in order to target older JDKs. Take care, Daniel On 9/20/06, Darío Vasconcelos [EMAIL PROTECTED] wrote: Hi, since recently someone mentioned the BeanForm component, I've been reading about it and wondering if there's a version for Tapestry 3, because I'm still stuck with old JDKs and app servers... In case there isn't such thing, would a backport be possible? Too much hard work? I haven't really gotten into all the annotation and HiveMind stuff and it looks kinda complicated from here... Regards, Dario -- Some weasel took the cork out of my lunch. -- W.C. Fields - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple Doubt
(or library name.library file if you're writing a library) On 9/20/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I think that goes in your application name.application file. On 9/20/06, Daniel Castro [EMAIL PROTECTED] wrote: Guys, I am trying to use the Xtile componet, that belongs to contrib library. But dont know where to insert the line below. library id=contrib specification-path=classpath :/org/apache/tapestry/contrib/Contrib.library/ where should it be inserted? inside the .page? Inside the web.xml? I tried inside the .page and didnt worked, and also tried inside web.xmland the message below appears. Library 'contrib' not found in application namespace. the classpath on the line will be automatically parsed and be replaced by the classpath of the application or no? My project uses maven, so the library is inside the classpath. It is inside the Maven2Dependencies. What is missing? Thanks Daniel Ferreira Castro -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: [announce] BeanForm 0.4
I've been toying with the idea of removing the Form functionality (it certainly would simplify some stuff!). If I remember correctly, one of Jesse's initial reactions was also that it should just require the user to wrap it in an external Form component. Does anyone else have an opinion on this? Please speak up! On 9/14/06, Martin Strand [EMAIL PROTECTED] wrote: Yeah, I think it's a good idea to keep the BeanForm as simple as possible and let people with specific needs (me) subclass it to add new features. I also think you should remove the Form parameters and leave it to the user to enclose the component with a Form. Or at least break out the editor part into a BeanEditor component. The BeanForm would then include a BeanEditor and a few buttons and people who want to use it in an existing form would just use the BeanEditor directly instead. Martin On Thu, 14 Sep 2006 04:16:05 +0200, DJ Gredler [EMAIL PROTECTED] wrote: I think the exclude parameter sounds like a good idea, it would probably be very useful for prototyping or admin screens where you're more worried about your time than property display order. The edit vs view toggle I'm not so sure about, mainly because I want to make sure the component stays relatively lean and the API doesn't get too cluttered. For example, a user recently requested a way to make all read-only properties use an Insert component, rather than the current behavior of disabling the input component they receive. In the end, rather than add a new parameter to BeanForm, I decided to make it easier to override the input component used for specific properties, and to make the Insert component one of the options. It's a little harder for his specific needs, as he has to list his bean properties and assign Insert components to the read-only properties, but it's a generic solution that's easy enough for him and doesn't force other people to learn another corner case when they're first grokking the BeanForm API. Of course, I may be underestimating the usefulness of this feature, in which case it's not a corner case at all :-) My gut reaction is that the generic solution described above is also good enough for edit vs view toggling. You would have to list the properties to display, but you could say: span jwcid=@bf:BeanForm ... properties=literal:name=Insert,description=Insert,comment=Insert,dateCreated=Insert ... / In the same vein I can see the title feature being useful, but I would want to make it optional, which means Yet Another Parameter (YAP?). Of course, a more generic solution would be to allow the user to dynamically contribute bindings to some or all of the property input components. Now *that* would float my boat. But how? Anyway, those are my [longish] thoughts. Feel free to disagree. Daniel PS - Martin, would you have time to send me a patch implementing the exclude parameter? ;-) If not, I'll probably look at it eventually. On 9/14/06, andyhot [EMAIL PROTECTED] wrote: Martin Strand wrote: Thanks. I just added a few minor things, nothing big: - exclude parameter to exclude properties rather than specifying which ones should be included - toggle between edit mode and view mode (view mode = no form components) Both look useful. Perhaps they could get included? - 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: [announce] BeanForm 0.4
Sorry, no. It was semi-interesting trying to achieve compatibility with both 4.0 and 4.1... Maintaining compatibility with all 3 versions would probably be nigh impossible. Of course, nothing stops you from forking a Tap3 version :-) On 9/14/06, Mark Stang [EMAIL PROTECTED] wrote: I don't suppose there is a version for 3.x? Mark J. Stang Senior Engineer/Architect office: +1 303.468.2900 mobile: +1 303.507.2833 Ping Identity -Original Message- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Wed 9/13/2006 8:10 PM To: Tapestry users Subject: Re: [announce] BeanForm 0.4 Oops...I've fixed that now. BeanForm should show up linked in directly from the main site whenever the apache servers sync up. On 9/13/06, Martin Strand [EMAIL PROTECTED] wrote: Nice work! :) I was actually just working on my own beanform when I came across yours about two weeks ago. Now I use yours instead, I just subclassed it to add a few app specific features. Do you have a public svn repo somewhere? Martin On Wed, 13 Sep 2006 23:15:12 +0200, DJ Gredler [EMAIL PROTECTED] wrote: Hi all, I have just released the latest version of BeanForm, a single-line POJO editor component: span jwcid=@bf:BeanForm bean=ognl:pojo save=listener:save delete=listener:delete The above line of code gets you a form that: * calls your page's save() method when submitted for save * calls your page's delete() method when submitted for delete * gives you a TextField for each of the bean's string and numerical properties * gives you a Checkbox for each of the bean's boolean properties * gives you a DatePicker for each of the bean's date properties * automatically disables fields for read-only properties If you are using Java Persistence API (EJB3) annotations and/or Hibernate Validator annotations, the BeanForm component also: * infers validation strings for annotated properties * uses TextAreas instead of TextFields for annotated string properties whose maximum length is over 255 characters Some other important features: * EJB3 and Hibernate Validator support is optional and enabled automatically at runtime only when appropriate * you can use a BeanForm inside a Form component, in which case the BeanForm will not emit a second form tag * you can explicitly specify which properties to display, as well as their validation strings * when specifying properties explicitly, they may be recursive ( person.address.city.name, for example) * you can override the input components used to edit properties * support for canceling and refreshing forms * support for localization Starting with version 0.4, BeanForm should work with both Tapestry 4.0 and Tapestry 4.1. I should also note that starting with version 0.4, BeanForm requires the tapestry-prop library, available at http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-prop/0.1.1/ . Give it a whirl and let me know if you have any problems, comments or suggestions. Take care, Daniel Gredler Homepage: http://beanform.sourceforge.net/ Component Reference: http://beanform.sourceforge.net/component-reference.html Change History: http://beanform.sourceforge.net/changes-report.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: [announce] BeanForm 0.4
Apache license, version 2 On 9/14/06, Mark Stang [EMAIL PROTECTED] wrote: BTW, what is the license for this component? thanks, Mark Mark J. Stang Senior Engineer/Architect office: +1 303.468.2900 mobile: +1 303.507.2833 Ping Identity -Original Message- From: Martin Strand [mailto:[EMAIL PROTECTED] Sent: Wed 9/13/2006 5:06 PM To: Tapestry users Subject: Re: [announce] BeanForm 0.4 Nice work! :) I was actually just working on my own beanform when I came across yours about two weeks ago. Now I use yours instead, I just subclassed it to add a few app specific features. Do you have a public svn repo somewhere? Martin On Wed, 13 Sep 2006 23:15:12 +0200, DJ Gredler [EMAIL PROTECTED] wrote: Hi all, I have just released the latest version of BeanForm, a single-line POJO editor component: span jwcid=@bf:BeanForm bean=ognl:pojo save=listener:save delete=listener:delete The above line of code gets you a form that: * calls your page's save() method when submitted for save * calls your page's delete() method when submitted for delete * gives you a TextField for each of the bean's string and numerical properties * gives you a Checkbox for each of the bean's boolean properties * gives you a DatePicker for each of the bean's date properties * automatically disables fields for read-only properties If you are using Java Persistence API (EJB3) annotations and/or Hibernate Validator annotations, the BeanForm component also: * infers validation strings for annotated properties * uses TextAreas instead of TextFields for annotated string properties whose maximum length is over 255 characters Some other important features: * EJB3 and Hibernate Validator support is optional and enabled automatically at runtime only when appropriate * you can use a BeanForm inside a Form component, in which case the BeanForm will not emit a second form tag * you can explicitly specify which properties to display, as well as their validation strings * when specifying properties explicitly, they may be recursive ( person.address.city.name, for example) * you can override the input components used to edit properties * support for canceling and refreshing forms * support for localization Starting with version 0.4, BeanForm should work with both Tapestry 4.0 and Tapestry 4.1. I should also note that starting with version 0.4, BeanForm requires the tapestry-prop library, available at http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-prop/0.1.1/ . Give it a whirl and let me know if you have any problems, comments or suggestions. Take care, Daniel Gredler Homepage: http://beanform.sourceforge.net/ Component Reference: http://beanform.sourceforge.net/component-reference.html Change History: http://beanform.sourceforge.net/changes-report.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] unit testing error-handling code
Has anyone found an easy way to unit test code that only runs when Class.forName(String) throws a NoClassDefFoundError? try { c = Class.forName( className ); } catch( NoClassDefFoundError e ) { // code to be tested } It seems back asswards to be trying to *cause* this error :-)
Re: Checkbox component
jwcid=[EMAIL PROTECTED] Tapestry will automatically assign it test1Select as the id in the HTML, I believe. On 9/15/06, Peter Dawn [EMAIL PROTECTED] wrote: guys, am using the checkbox component within my form. now i have a number of checkboxes, hence i have an option to select all or none of the checkboxes. the user clicks on the link and depending upon the link either all or none of the checkboxes get ticked off. now obviously for me to reference these checkboxes, i need to name them. so i have something like this, input type=checkbox jwcid=@Checkbox selected=ognl:test1Select name=test1Select value=testPage/ and within my js i have. document.getElementById['test1Select'].checked=true; but its not working. and when i look at the source code, the name of the checkbox is $Checkbox0 (tapestry is generating these names based on the checkbox component). so my issue is, how can i reference these individual checkboxes with names. any help pls. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[announce] BeanForm 0.4
Hi all, I have just released the latest version of BeanForm, a single-line POJO editor component: span jwcid=@bf:BeanForm bean=ognl:pojo save=listener:save delete=listener:delete The above line of code gets you a form that: * calls your page's save() method when submitted for save * calls your page's delete() method when submitted for delete * gives you a TextField for each of the bean's string and numerical properties * gives you a Checkbox for each of the bean's boolean properties * gives you a DatePicker for each of the bean's date properties * automatically disables fields for read-only properties If you are using Java Persistence API (EJB3) annotations and/or Hibernate Validator annotations, the BeanForm component also: * infers validation strings for annotated properties * uses TextAreas instead of TextFields for annotated string properties whose maximum length is over 255 characters Some other important features: * EJB3 and Hibernate Validator support is optional and enabled automatically at runtime only when appropriate * you can use a BeanForm inside a Form component, in which case the BeanForm will not emit a second form tag * you can explicitly specify which properties to display, as well as their validation strings * when specifying properties explicitly, they may be recursive ( person.address.city.name, for example) * you can override the input components used to edit properties * support for canceling and refreshing forms * support for localization Starting with version 0.4, BeanForm should work with both Tapestry 4.0 and Tapestry 4.1. I should also note that starting with version 0.4, BeanForm requires the tapestry-prop library, available at http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-prop/0.1.1/ . Give it a whirl and let me know if you have any problems, comments or suggestions. Take care, Daniel Gredler Homepage: http://beanform.sourceforge.net/ Component Reference: http://beanform.sourceforge.net/component-reference.html Change History: http://beanform.sourceforge.net/changes-report.html
Re: [announce] BeanForm 0.4
The project is hosted on sourceforge, so I'm using their CVS (see http://sourceforge.net/cvs/?group_id=171323, or browse it online at http://beanform.cvs.sourceforge.net/beanform/). What features have you added? Anything that could be useful to others? Daniel On 9/14/06, Martin Strand [EMAIL PROTECTED] wrote: Nice work! :) I was actually just working on my own beanform when I came across yours about two weeks ago. Now I use yours instead, I just subclassed it to add a few app specific features. Do you have a public svn repo somewhere? Martin On Wed, 13 Sep 2006 23:15:12 +0200, DJ Gredler [EMAIL PROTECTED] wrote: Hi all, I have just released the latest version of BeanForm, a single-line POJO editor component: span jwcid=@bf:BeanForm bean=ognl:pojo save=listener:save delete=listener:delete The above line of code gets you a form that: * calls your page's save() method when submitted for save * calls your page's delete() method when submitted for delete * gives you a TextField for each of the bean's string and numerical properties * gives you a Checkbox for each of the bean's boolean properties * gives you a DatePicker for each of the bean's date properties * automatically disables fields for read-only properties If you are using Java Persistence API (EJB3) annotations and/or Hibernate Validator annotations, the BeanForm component also: * infers validation strings for annotated properties * uses TextAreas instead of TextFields for annotated string properties whose maximum length is over 255 characters Some other important features: * EJB3 and Hibernate Validator support is optional and enabled automatically at runtime only when appropriate * you can use a BeanForm inside a Form component, in which case the BeanForm will not emit a second form tag * you can explicitly specify which properties to display, as well as their validation strings * when specifying properties explicitly, they may be recursive ( person.address.city.name, for example) * you can override the input components used to edit properties * support for canceling and refreshing forms * support for localization Starting with version 0.4, BeanForm should work with both Tapestry 4.0 and Tapestry 4.1. I should also note that starting with version 0.4, BeanForm requires the tapestry-prop library, available at http://howardlewisship.com/repository/com/javaforge/tapestry/tapestry-prop/0.1.1/ . Give it a whirl and let me know if you have any problems, comments or suggestions. Take care, Daniel Gredler Homepage: http://beanform.sourceforge.net/ Component Reference: http://beanform.sourceforge.net/component-reference.html Change History: http://beanform.sourceforge.net/changes-report.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [announce] BeanForm 0.4
I think the exclude parameter sounds like a good idea, it would probably be very useful for prototyping or admin screens where you're more worried about your time than property display order. The edit vs view toggle I'm not so sure about, mainly because I want to make sure the component stays relatively lean and the API doesn't get too cluttered. For example, a user recently requested a way to make all read-only properties use an Insert component, rather than the current behavior of disabling the input component they receive. In the end, rather than add a new parameter to BeanForm, I decided to make it easier to override the input component used for specific properties, and to make the Insert component one of the options. It's a little harder for his specific needs, as he has to list his bean properties and assign Insert components to the read-only properties, but it's a generic solution that's easy enough for him and doesn't force other people to learn another corner case when they're first grokking the BeanForm API. Of course, I may be underestimating the usefulness of this feature, in which case it's not a corner case at all :-) My gut reaction is that the generic solution described above is also good enough for edit vs view toggling. You would have to list the properties to display, but you could say: span jwcid=@bf:BeanForm ... properties=literal:name=Insert,description=Insert,comment=Insert,dateCreated=Insert ... / In the same vein I can see the title feature being useful, but I would want to make it optional, which means Yet Another Parameter (YAP?). Of course, a more generic solution would be to allow the user to dynamically contribute bindings to some or all of the property input components. Now *that* would float my boat. But how? Anyway, those are my [longish] thoughts. Feel free to disagree. Daniel PS - Martin, would you have time to send me a patch implementing the exclude parameter? ;-) If not, I'll probably look at it eventually. On 9/14/06, andyhot [EMAIL PROTECTED] wrote: Martin Strand wrote: Thanks. I just added a few minor things, nothing big: - exclude parameter to exclude properties rather than specifying which ones should be included - toggle between edit mode and view mode (view mode = no form components) Both look useful. Perhaps they could get included? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I'm trying to get the marvelous BeanForm component working with tap 4.1
You didn't feel bad for breaking my BeanForm?!? Shame on you! ;-) On 9/3/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Horrible weekend so far...I've spent it working on anything but what I want. (which is tapestry obviously)..First client project, then fixing old wounds in maven2...Then happily upgraded to edgy eft (sweet!) . I think Daniel mentioned I broke his beanform at some point, but I don't remember how I did it...I do remember not feeling very bad about it after finding out why but that's as much of the details as I remember. I assumed it was working again when I didn't hear anything back from him. On 9/3/06, Josh Long [EMAIL PROTECTED] wrote: Hello all, I'm trying to get the marvelous tapestry 4.1 component working with tapestry 4.1. It seems to sucessfully create the form, but when I submit the form it errors out, saying: ... [ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL expression' of [EMAIL PROTECTED]/Test/$BeanForm.rows]: properties org.apache.tapestry.BindingException Unable to read OGNL expression 'parsed OGNL expression' of [EMAIL PROTECTED]/Test/$BeanForm.rows]: properties binding:ExpressionBinding[search/Test/$BeanForm.rows properties] location: classpath:/net/sf/beanform/BeanFormRows.jwc, line 33, column 52 28 /description 29 30 parameter name=element default-value=literal:tr/ 31 32 component id=rows type=For 33 binding name=source value=properties/ 34 binding name=value value=property/ 35 binding name=index value=index/ 36 /component 37 38 component id=informal type=Any inherit-informal-parameters=yes :: ahem:: anyway, before I attempt to get in there and figure this out myself, has anyone cleared this path yet? Is there a reasonable/simple update that just needs to be applied or, is it possible tapestry has so changed from 4.0 (on which the samples are based) to 4.1 that the component could have broke? Thanks in advance for any help, and i hope your weekend is going well. Josh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: I'm trying to get the marvelous BeanForm component working with tap 4.1
Good deal. I've seen a couple of garden gnome ads on gmail when I've been viewing emails on this list about trolling and trolls :-) On 9/4/06, Josh Long [EMAIL PROTECTED] wrote: It worked like a charm, Daniel! I would have responded earlier but I was too busy playing with my shiny new component.. The code below is magic, nothing less. It works with ajax, exposes all the properties to edit that I want, has validation, and supports all the intrinsically tapestry 4.1 features like the updateComponents param. Very, very cool. Now, to start offering to build more update/edit pages! In related news: google ads isn't completely sure what we're smoking, so it's offering me 'Garden Gnomes and more' on the right of my gmail window... right on top of Free Red Hat 9.0 offers... Thanks again one and all! Josh div jwcid=@Border form jwcid=@Form async= ognl:true updateComponents = ognl:{'bform'} delegate=bean:delegate clientValidationEnabled=ognl: false div jwcid=[EMAIL PROTECTED] div jwcid=@bf:BeanForm properties = literal:firstName{required},lastName{required},company{required},dateCreated{required} bean = ognl: restaurant save=listener:save / /div /form /div On 9/3/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Hehe...I have to admit - as much as I love programming with the exceptionally good Qt toolkit - I like using the gnome desktop much more than KDE :) On 9/3/06, Josh Long [EMAIL PROTECTED] wrote: ROFL! that's the best response ever!! I'm sorry about your awkward weekend though! So you get to upgrade linux and I'm stuck on SuSe 9.2 or 3. Seems like everyones updating without me. But I will not be jealous. It doesn't suit me. I finally uninstalled Red Hat 9 at best a year ago.. thought that was progress. OK, so I'm jealous. My coworker switched from kde to gnome of late and they've got some twisted OS X expose-style effects built in, now... I have alt+tab. OK, anyway, I will follow up with (the simialarly sainted, generous, and benevolent) Daniel and hopefully we'll resolve this. It'll be fun. I'll have ajax-ready, one-liner forms. I could provide a full-page editable form for an object with 20 properties using nothing more than div jwcid=mPojo / that works with ajax and validation if I get this working in 4.1! I can just imagine the hair that'll fall out when the web designer sees it.. Imagine it...! Thanks again, Josh On 9/3/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Horrible weekend so far...I've spent it working on anything but what I want. (which is tapestry obviously)..First client project, then fixing old wounds in maven2...Then happily upgraded to edgy eft (sweet!) . I think Daniel mentioned I broke his beanform at some point, but I don't remember how I did it...I do remember not feeling very bad about it after finding out why but that's as much of the details as I remember. I assumed it was working again when I didn't hear anything back from him. On 9/3/06, Josh Long [EMAIL PROTECTED] wrote: Hello all, I'm trying to get the marvelous tapestry 4.1 component working with tapestry 4.1. It seems to sucessfully create the form, but when I submit the form it errors out, saying: ... [ +/- ] Exception: Unable to read OGNL expression 'parsed OGNL expression' of [EMAIL PROTECTED]/Test/$BeanForm.rows]: properties org.apache.tapestry.BindingException Unable to read OGNL expression 'parsed OGNL expression' of [EMAIL PROTECTED]/Test/$BeanForm.rows]: properties binding:ExpressionBinding[search/Test/$BeanForm.rows properties] location: classpath:/net/sf/beanform/BeanFormRows.jwc, line 33, column 52 28 /description 29 30 parameter name=element default-value=literal:tr/ 31 32 component id=rows type=For 33 binding name=source value=properties/ 34 binding name=value value=property/ 35 binding name=index value=index/ 36 /component 37 38 component id=informal type=Any inherit-informal-parameters=yes :: ahem:: anyway, before I attempt to get in there and figure this out myself, has anyone cleared this path yet? Is there a reasonable/simple update that just needs to be applied or, is it possible tapestry has so changed from 4.0 (on which the samples are based) to 4.1 that the component could have broke? Thanks in advance for any help, and i hope your weekend is going well. Josh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Underline content with properties files
There's a CSS first-letter pseudo element, but I don't know how many browsers support it. On 8/29/06, Oort, Dick [EMAIL PROTECTED] wrote: You could create a custom component for this, and pass the word as a parameter. In the html part of the component, you use ognl/java.lang.String to split the String into 2 parts, putting the first part between u /u. Regards, Dick -Original Message- From: Peter Dawn [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 7:30 AM To: tapestry-user@jakarta.apache.org Subject: Underline content with properties files guys, i want to underline one letter of a word, which is within my properties files. i mean say i have a word like Name. I want to underline N. If i was using static text I could use u tag. but since this information is now in a properties file, how should i do this. any ideas. - 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: TapIDEA future, post Time to move on
I mostly agree with you that current tooling gets us pretty far, but there's a lot to be said for turning the most frequent runtime errors into compile-time errors, something that often requires special Tapestry awareness. On 8/29/06, Konstantin Ignatyev [EMAIL PROTECTED] wrote: My point is that in case of Tapestry/Wicket there is no need to worry much about tools, because existing ones provide pretty good environment to work within. Therefore focus on APIs and conventions seems very reasonable to me.
Re: JWC anoyance: Creating component based on existing ones
If I'm following Andy correctly, his point was that the JWC inheritance tree can be different from the Java inheritance tree, so you don't want to try to base one off of the other. My real-world example is BeanForm, an enhanced Form component. I had to copy/paste the parameters from Form.jwc in order to extend its JWC API, but the BeanForm component class itself does not extend Form -- its JWC/HTML just contains a Form component to which it passes the method/listener/delegate/etc parameters. On 8/28/06, Pedro Viegas [EMAIL PROTECTED] wrote: Just one more thing on this subject. Is is really a good ideia to set the default of the inherit-specification to true? Like you said Jesse... ...but I worry about what kind of unexpected behaviour would come about as a result of doing this. (for people relying on it ~not~ happening) I'm thinking out loud here. I myself think it's obviously the desired bahaviour, since it's only logical to inherit the whole information/resources when we subclass a component, but like you said, for those who are not expecting this and since the old Tap 4.0 dis not behave this way... is it not dangerous? I can just imagine the mail list spam with this question over and over again... :-) On the other hand it's only natural that such a feature would be inteligent enough to know that since an inhetitance took place the correct behaviour would be to inherit the spec also... humm... I don't know, just thinking... maybe if nobody else makes any remark on this it means everybody agrees on the course described and it is in fact the best one! ;-) Regards, On 8/28/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I've already created it, it's called inherit-specification... Description: If yes (the default), all elements contained in any superclass components will be directly inherited in this specification.(this includes parameters/properties/assets/etc..) No one should get their hopes up too much yet...(in case I'm setting myself up for some unknown blocking reason for this not to be possible...) On 8/27/06, andyhot [EMAIL PROTECTED] wrote: Are you thinking about a new 'inherits' or 'extends' attribute in the component-specification element ? Jesse Kuhnert wrote: Ok...I'm giving the whole inheritance thing a go..We'll see how that works out ;) On 8/27/06, Pedro Viegas [EMAIL PROTECTED] wrote: Humm, so the inheritance is actually easyer that the inclusion of an external .xml... ok, the inheritance is the best solution by far so good news! Has for the .xml and so on... thanks for the tip. :-D On 8/28/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I don't think it needs to be as complicated as you think. There is a whole set of classes people don't normally see that encapsulate all of the information parsed from templates. It wouldn't be very hard to walk up the class heirarchy and create a union view of a template. As for filename extensions, it only takes a second or two to go into eclipse - window - preferences - editor - content types - to associated all *.jwc/*.page/*.application/etc.. with wtp xml.. I've been using autocompleting xsd/dtd stuff with wtp for a pretty long time now and have found it mostly sufficient for my needs, especially when tapestry is able to dynamically see my changes made to them. On 8/27/06, Pedro Viegas [EMAIL PROTECTED] wrote: By the way... since we're diging into this... Again from the wiki... *Rename the template page from *.page to *.xml or *.page.xml* This feature would allow the IDE to provide some completion and validate the template If we didn't break compatibility with the use of the previous excception simply allowing the use of normal .xml exception this would by just trivial... and the IDE validation and autocompletion would be VERY welcome! Sorry, this was me trying to compensate Geoff's decision somehow! :-( What do you say? On 8/28/06, Pedro Viegas [EMAIL PROTECTED] wrote: Don't you sleep Jesse? :-D Another lightning fast response, thanks! Gathering the bullet item from the wiki... * * * Default Page/JWC Files and/or Page/JWC Inheritance* Often there is a need to use the exact same services/beans/etc one multiple pages. The current solution is to add them to all the page/jwc files. There should be a way to inherit another page/jwc file and/or simply import another page/jwc file's settings. (Note that this is already possible with annotations.) Of course the simple class inheritance would be just perfect. But that may be vry hard to implement at this point right? So many component to refactor. One thing pops up in my mind like a very
Re: Tapestry 5 Discussions
I completely agree with you, and I really wish Spring were up to the task. However, Howard seems to have done his homework and come to the conclusion that it can't provide the features he needs for Tap5 (see http://tapestry.apache.org/tapestry5/ioc/index.html). In my personal ideal world, Spring would have implemented the namespacing, abstraction, visibility and distributed configuration features he needs, and we could all reuse our Spring knowledge when we find we need to extend Tap5. At this point all I can hope for is that they implement some of that stuff in time for Tap6 :-) On 7/28/06, Rui Pacheco [EMAIL PROTECTED] wrote: Actually, I support the idea that leaving HiveMind is good. But not for a new IoC container. We should be using something that has more market share, like the Pico Container or the container used by Spring. Why are we writing a *new* IoC container? Why not standardise Tapestry, that does something no other framework does, on components known throughout the developer community? Its all about reuse. Reuse components, reuse examples spread through the web, reuse the knowledge you acquired on different projects.
Re: Scheduling tasks
+1 on quartz On 7/19/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I would use quartz. It took me about half an hour to integrate with hivemind. On 7/18/06, Martin Strand [EMAIL PROTECTED] wrote: Hi guys. How can I schedule a task with Hivemind? I want something similar to crond in Linux - a service should be notified every n minutes. Ideally the service would implement Runnable and the scheduler would invoke run(). I've heard of Quartz, but I've never used it before and I'm not sure how to use it together with Hivemind. What other options are there? Thanks for any help, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
component allow-body: yes and no
Hi, I'm trying to create a component that renders the contents of its HTML template and then renders any body the user of the component may have given it. If I tell the component specification that allow-body=yes, then the contents of the component's HTML template do not get rendered, but the custom body does. If I tell the component that allow-body=no, then the contents of the component's HTML template get rendered, but (obviously) the custom body does not. Is there a method in my component class that I can override to get them both to render when allow-body=yes? Thanks, Daniel
Re: Remove jsessionid from static resources?
Cool, thanks for the info. I'll probably be going the same route. Should our site get banned, I'll alert the list ;-) On 6/16/06, Jeff Lubetkin [EMAIL PROTECTED] wrote: We've noticed no issues, and SEO experts that we've talked to support this mechanism. Of course, Google being Google there's no way to know for sure what they do or don't like... jeff -Original Message- From: DJ Gredler [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 4:24 AM To: Tapestry users Subject: Re: Remove jsessionid from static resources? Can you get banned from Google for this? I seem to remember they want to be served exactly the same content that a regular useragent would get. Obviously this isn't the kind of stuff they're trying to avoid... Just wondering. On 6/15/06, Jeff Lubetkin [EMAIL PROTECTED] wrote: You can prevent JSESSIONID from being encoded onto URLs for bots. At Zillow, we've done this with a ServletFilter that compares the incoming user agent to a list of known bots, and if it matches replaces the HttpServletResponse with an HttpServletResponseWrapper that makes the encodeURL, encodeUrl, encodeRedirectURL, and encodeRedirectUrl methods into no-ops (simply returning their inputs). jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Remove jsessionid from static resources?
Can you get banned from Google for this? I seem to remember they want to be served exactly the same content that a regular useragent would get. Obviously this isn't the kind of stuff they're trying to avoid... Just wondering. On 6/15/06, Jeff Lubetkin [EMAIL PROTECTED] wrote: You can prevent JSESSIONID from being encoded onto URLs for bots. At Zillow, we've done this with a ServletFilter that compares the incoming user agent to a list of known bots, and if it matches replaces the HttpServletResponse with an HttpServletResponseWrapper that makes the encodeURL, encodeUrl, encodeRedirectURL, and encodeRedirectUrl methods into no-ops (simply returning their inputs). jeff