Combo box populated based on first combo box
Hello: How do I get a form to have two combo boxes. One populated by the first one ? After researching it for many hours, I know there is no quick solution. Would it be easier to go with a JavaScript approach to this ? Thanks for any pointers -- Jeremy
Tapestry 5 Crash on load from Eclipse while working ok from command (Jetty)
I have not worked on a Tapestry 5 project for a few weeks. The last time I used it, the development environment was fully setup. Now I come back and I get the stack trace shown at the end of this email. I tried mvn jetty:run And that starts up the portal no-problem. But from eclipse (Run->Jetty Webapp) I get the stack trace. I tried refreshing the dependencies for eclipse with mvn eclipse:eclipse -DdownloadSources=true I am still new to hibernate and tapestry so I have not developed an "intuition" for what may be going wrong. I suspect Eclipse is not seen the C3P0 dependency, but why would it work before and not now ? Thanks for any help. 2013-10-18 18:54:08.531:WARN::/Myapp/ java.lang.RuntimeException: Exception constructing service 'ValueEncoderSource': Error invoking service contribution method org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration, boolean, HibernateSessionSource, Session, TypeCoercer, PropertyAccess, LoggerSource): Exception constructing service 'HibernateSessionSource': Error invoking constructor public org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.List): Could not instantiate connection provider: org.hibernate.connection.C3P0ConnectionProvider at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:54) at $ValueEncoderSource_6ce8d06e8146.delegate(Unknown Source) at $ValueEncoderSource_6ce8d06e8146.getValueEncoder(Unknown Source) at org.apache.tapestry5.internal.services.ComponentDefaultProviderImpl.defaultValueEncoder(ComponentDefaultProviderImpl.java:124) at $ComponentDefaultProvider_6ce8d06e814a.defaultValueEncoder(Unknown Source) at org.apache.tapestry5.corelib.components.Loop.defaultEncoder(Loop.java:316) at org.apache.tapestry5.corelib.components.Loop$Shim_6ce8d06e8198.invoke(Unknown Source) at org.apache.tapestry5.internal.plastic.MethodHandleImpl.invoke(MethodHandleImpl.java:48) at org.apache.tapestry5.internal.transform.ParameterWorker$3$1.invokeDefaultMethod(ParameterWorker.java:430) at org.apache.tapestry5.internal.transform.ParameterWorker$3$1.getDefaultBindingForParameter(ParameterWorker.java:412) at org.apache.tapestry5.internal.transform.ParameterWorker$3$1.load(ParameterWorker.java:336) at org.apache.tapestry5.internal.transform.ParameterWorker$3$1$1.run(ParameterWorker.java:204) at org.apache.tapestry5.internal.structure.PageImpl.invokeCallbacks(PageImpl.java:362) at org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:225) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:193) at org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:178) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124) at org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:177) at $PageLoader_6ce8d06e8165.loadPage(Unknown Source) at org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:104) at $PageSource_6ce8d06e8162.getPage(Unknown Source) at org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:82) at $RequestPageCache_6ce8d06e8161.get(Unknown Source) at $RequestPageCache_6ce8d06e815c.get(Unknown Source) at org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:77) at $RequestExceptionHandler_6ce8d06e8123.handleRequestException(Unknown Source) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42) at $RequestHandler_6ce8d06e8125.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) at $RequestHandler_6ce8d06e8125.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) at $RequestHandler_6ce8d06e8125.service(Unknown Source) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) at $RequestHandler_6ce8d06e8125.service(Unknown Source) at com.biobroker.broker.services.AppModule$1.service(AppModule.java:102) at $RequestFilter_6ce8d06e811f.service(Unknown Source) at $RequestHandler_6ce8d06e8125.service(Unknown Source) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.intern
Re: uninitialized proxy passed to save()
Thanks. I found this post that solve the problem. http://stackoverflow.com/questions/1390008/delete-a-hibernate-entity-with-tapestry5-gives-a-different-object-with-the-sa Using @Persist( "entity" ) Persists the hibernate object when the input comes back to the user. On Thu, Sep 12, 2013 at 9:12 AM, Lance Java wrote: > I think the issue is because mOrder is not connected to the hibernate > session. > > It looks like you are only saving the entity when the user clicks "accept". > I'm guessing that at some stage before you are submitting a form and > storing mOrder on the HttpSession? > > If I were you, I'd try to remove HttpSession usage completely. Is it > possible to do 2 saves to the database with different states (perhaps > "saved" then "accepted") > > If you still really want to use the HttpSession, you'll need to attach > mOrder to the current hibernate session before saving. This can be done via > session.merge(mOrder); >
uninitialized proxy passed to save()
I have a simple Buy/Sell prototype. The seller accepts or rejects an offer. @Property @Persist ProductTransaction mOrder; @InjectPage OrderCanceled mOrderCanceled; @InjectPage OrderAccepted mOrderAccepted; @Inject Session session; Object onActionFromAccept(){ mOrder.Status = TrasactionSatus.Accepted; session.save(mOrder); //deduct the volume from the biomass product return mOrderAccepted; } http://tapestry.apache.org/schema/tapestry_5_3.xsd"; xmlns:p="tapestry:parameter"> This order was placed by (user name) Description of order Accept Cancel When I press accept action link, I get the error: uninitialized proxy passed to save() It looks like I made a common error done by Tapestry 5 newbies, but I could not find exiting threads on this issue. Thanks for any help
Hibernate works on Jelly but get No suitable driver found on Tomcat
Hello: I have a simple app that uses Mysql (org.hsqldb.jdbcDriver) The app works as expected when running from Jetty, but when I create the war and install it on tomcat, I get the error No suitable driver found for jdbc:mysql://192.168.2.33:3306/dbname I have the jar mysql-connector-java-5.1.9.jar in the war. I moved it to tomcat's lib, and to the jre lib trying to get it to work (as it did for people with a similar problem) I am using the tapestry-hibernate dependency to access the database with hibernate. I suppose Jelly must be doing something for me that Tomcat isn't, but I am not sure what. -- Jeremy
Re: Adding tab to default project (index, about, contact)
Yes, I think session storage is what I need. Thank you On Fri, Aug 30, 2013 at 5:27 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri, 30 Aug 2013 17:33:28 -0300, Jeremy Villalobos < > jeremyvillalo...@gmail.com> wrote: > > I am still new to Tapestry 5. For a prototype, I am doing very simple >> user login portal. I would like to show a couple of option along with >> index, >> about and contact, but they would only show up if the user is signed in. >> >> How do I access the Layout class from a Page ? >> > > You can @InjectComponent private Layout layout; in the page, but that's > something to be avoided. The best practice is to have top-down > communication: from page to component and from a component to the > components declared inside it. What exactly do you need? Anyway, the logged > in or not state wouldn't be handled inside just a given component or page. > Instead, the simpler solution would be to have some sort of User class and > declare @SessionState(create = false) private User user; fields in any page > or component that needs it. See http://tapestry.apache.org/** > session-storage.html <http://tapestry.apache.org/session-storage.html>for > more details. > > > I see on the documentation that I can use "Nested Layouts" but I still >> need some sample code or project to see how it works. >> > > The Layout component is a component as each other, having no special > meaning or treatment. If you use one component inside another, you're > having nested components, and the same is valid for layouts, because > layouts are ordinary components. > > -- > Thiago H. de Paula Figueiredo > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Jeremy
Adding tab to default project (index, about, contact)
I am still new to Tapestry 5. For a prototype, I am doing very simple user login portal. I would like to show a couple of option along with index, about and contact, but they would only show up if the user is signed in. How do I access the Layout class from a Page ? I see on the documentation that I can use "Nested Layouts" but I still need some sample code or project to see how it works. Thanks
Re: Tapestry 5 Hotel Booking
Thanks, I updated the demo code and ran it successfully with maven and from Eclipse. On Mon, Jul 1, 2013 at 6:48 AM, Shing Hing Man wrote: > Hi, > > I have checked out Tapestr5-hotel-booking from github and tried it. > > The maven repository at tapestry.formos.com seems to be down. > > In the pom.xml, I have commented out all repositories at > http://tapestry.formos.com/ . > > Then it works. (The Tapestry dependencies are available on > http://repo.maven.apache.org.) > > > A way to run Tapestr5-hotel-booking : > At command prompt: mvn jetty::run > > The url is http://localhost:8080/tapestry5-hotel-booking/ > > > In case the tapx jar is missing, it is available at > > > https://github.com/hlship/tapx > > > > Shing > > > > > > > > From: Jeremy Villalobos > To: users@tapestry.apache.org > Sent: Sunday, June 30, 2013 9:51 PM > Subject: Tapestry 5 Hotel Booking > > > Hello: > > I downloaded the demo Tapestr5-hotel-booking to run it in my machine and > continue studying the Tapestry 5 development process. > > I am running Ubuntu 12.04 > Java 7 > Mvn 3.0.4 > > Opening the project in Eclipse shows the exclamation point on the project > (dependency project) and an error on the pom.xm, but no specifics of where > the error is. > > Running > > mvn install > > On the command line, on the project gets me the error: > > [INFO] Scanning for projects... > [WARNING] > [WARNING] Some problems were encountered while building the effective model > for com.tap5.hotelbooking:tapestry5-hotel-booking:war:1.2-SNAPSHOT > [WARNING] 'build.plugins.plugin.version' for > org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 107, > column 12 > [WARNING] 'build.plugins.plugin.version' for > org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 141, > column 12 > [WARNING] > [WARNING] It is highly recommended to fix these problems because they > threaten the stability of your build. > [WARNING] > [WARNING] For this reason, future Maven versions might no longer support > building such malformed projects. > [WARNING] > [INFO] > > [INFO] > > [INFO] Building tapestry5-hotel-booking Tapestry 5 Application 1.2-SNAPSHOT > [INFO] > > Downloading: > > http://tapestry.formos.com/maven-repository/com/google/code/kaptcha/kaptcha/2.3/kaptcha-2.3.pom > Downloading: > > http://tapestry.formos.com/maven-snapshot-repository/com/google/code/kaptcha/kaptcha/2.3/kaptcha-2.3.pom > [INFO] > > [INFO] BUILD FAILURE > [INFO] > > [INFO] Total time: 2:08.127s > [INFO] Finished at: Sun Jun 30 16:41:29 EDT 2013 > [INFO] Final Memory: 8M/360M > [INFO] > > [ERROR] Failed to execute goal on project tapestry5-hotel-booking: Could > not resolve dependencies for project > com.tap5.hotelbooking:tapestry5-hotel-booking:war:1.2-SNAPSHOT: Failed to > collect dependencies for [org.apache.tapestry:tapestry-core:jar:5.3.6 > (compile), org.testng:testng:jar:5.13.1 (test), > org.easymock:easymock:jar:2.4 (test), > org.apache.tapestry:tapestry-hibernate:jar:5.3.6 (compile), > org.apache.tapestry:tapestry-kaptcha:jar:5.3.6 (compile), > com.h2database:h2:jar:1.2.142 (compile), > org.hibernate:hibernate-validator:jar:4.0.2.GA (compile), > org.apache.tapestry:tapestry-beanvalidator:jar:5.3.6 (compile), > org.apache.tapestry:tapestry-test:jar:5.3.6 (test), > javax.servlet:servlet-api:jar:2.5 (provided), > org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final > (compile), org.slf4j:slf4j-log4j12:jar:1.5.6 (compile)]: Failed to read > artifact descriptor for com.google.code.kaptcha:kaptcha:jar:2.3: Could not > transfer artifact com.google.code.kaptcha:kaptcha:pom:2.3 from/to > tapestry360-stable (http://tapestry.formos.com/maven-repository): > Connection to http://tapestry.formos.com refused: Connection timed out -> > [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > switch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, > please read the following articles: > [ERROR] [Help 1] > > http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException > > It looks like t
Tapestry 5 Hotel Booking
Hello: I downloaded the demo Tapestr5-hotel-booking to run it in my machine and continue studying the Tapestry 5 development process. I am running Ubuntu 12.04 Java 7 Mvn 3.0.4 Opening the project in Eclipse shows the exclamation point on the project (dependency project) and an error on the pom.xm, but no specifics of where the error is. Running mvn install On the command line, on the project gets me the error: [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.tap5.hotelbooking:tapestry5-hotel-booking:war:1.2-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 107, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 141, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] [INFO] Building tapestry5-hotel-booking Tapestry 5 Application 1.2-SNAPSHOT [INFO] Downloading: http://tapestry.formos.com/maven-repository/com/google/code/kaptcha/kaptcha/2.3/kaptcha-2.3.pom Downloading: http://tapestry.formos.com/maven-snapshot-repository/com/google/code/kaptcha/kaptcha/2.3/kaptcha-2.3.pom [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 2:08.127s [INFO] Finished at: Sun Jun 30 16:41:29 EDT 2013 [INFO] Final Memory: 8M/360M [INFO] [ERROR] Failed to execute goal on project tapestry5-hotel-booking: Could not resolve dependencies for project com.tap5.hotelbooking:tapestry5-hotel-booking:war:1.2-SNAPSHOT: Failed to collect dependencies for [org.apache.tapestry:tapestry-core:jar:5.3.6 (compile), org.testng:testng:jar:5.13.1 (test), org.easymock:easymock:jar:2.4 (test), org.apache.tapestry:tapestry-hibernate:jar:5.3.6 (compile), org.apache.tapestry:tapestry-kaptcha:jar:5.3.6 (compile), com.h2database:h2:jar:1.2.142 (compile), org.hibernate:hibernate-validator:jar:4.0.2.GA (compile), org.apache.tapestry:tapestry-beanvalidator:jar:5.3.6 (compile), org.apache.tapestry:tapestry-test:jar:5.3.6 (test), javax.servlet:servlet-api:jar:2.5 (provided), org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final (compile), org.slf4j:slf4j-log4j12:jar:1.5.6 (compile)]: Failed to read artifact descriptor for com.google.code.kaptcha:kaptcha:jar:2.3: Could not transfer artifact com.google.code.kaptcha:kaptcha:pom:2.3 from/to tapestry360-stable (http://tapestry.formos.com/maven-repository): Connection to http://tapestry.formos.com refused: Connection timed out -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException It looks like there are problems retrieving the kaptcha dependency. Thanks for any help -- Jeremy Villalobos Practical Android Apps http://www.practicalandroidapps.com/ <http://www.youtube.com/user/PdfToSpeech> <https://plus.google.com/u/0/b/109848961267144267628/109848961267144267628/posts>