RE: Grid component whoa's
I thought it helpful to post the URL for the sort column My page name is LeadersQuery.tml the table column property is gp http://localhost:8080/leadersquery.grid.columns:sort/gp/grid?t:ac=org.tynamo.examples.pphl.pages.LeadersQuery$00406a6034
RE: Grid component whoa's
Here is my template... I have a criteria form then the grid is somethign disconnected here? I dont know why the grid wuold disappear off the page when i click a sort column http://tapestry.apache.org/schema/tapestry_5_3.xsd"; xmlns:p="tapestry:parameter" xmlns:j="tapestry-library:jquery"> Year League Season No objects to render Selection Criteria Players
Grid component whoa's
Hi Folks, I am operating grid component. it renders nicely onSubmit @SetupRender public void setupRender() { grid.reset(); if ( grid.getSortModel().getSortConstraints().isEmpty() ) { grid.getSortModel().updateSort("gp"); grid.getSortModel().updateSort("g"); grid.getSortModel().updateSort("a"); grid.getSortModel().updateSort("pts"); grid.getSortModel().updateSort("ppg"); grid.getSortModel().updateSort("ppa"); } } Can anyone explain why this grid disappears when I click a sort column? is this all i need to do to ensure column sorting support? thanks Best regards and thanks... KEN
RE: npe on simple type usage
Solution... this was a hibernate initialization issue. I was seeding an entity I skipped a few fields thinking it was not a problem. but hibernate didn't like me operating on the entity while it was in its initialization phase. rule of thumb? initialize all your properties before your code decides to operate on them. Pheeww PlayerStatsBuilder statsb = new PlayerStatsBuilder(); PlayerStats kstats = statsb.build(); kstats.setLeague(ELeague.A); kstats.setSeason(ESeason.SUMMER); kstats.setYear(ty); kstats.setG(4);kstats.setA(4);kstats.setGp(4); kstats.setPts(kstats.getA()+kstats.getG()); kstats.setPpa(kstats.getPts() > 0 ? kstats.getGp() / kstats.getPts() : 0); kstats.setPlayer(ken); PlayerStats dstats = statsb.build(); dstats.setLeague(ELeague.A); dstats.setSeason(ESeason.SUMMER); dstats.setYear(ty); dstats.setG(4);dstats.setA(4);dstats.setGp(4); dstats.setPts(dstats.getA()+dstats.getG()); dstats.setPpa(dstats.getPts() > 0 ? dstats.getGp() / dstats.getPts() : 0); dstats.setPlayer(doug); PlayerStats sstats = statsb.build(); sstats.setLeague(ELeague.A); sstats.setSeason(ESeason.SUMMER); sstats.setYear(ty); sstats.setG(4);sstats.setA(4);sstats.setGp(4); sstats.setPts(sstats.getA()+sstats.getG()); sstats.setPpa(sstats.getPts() > 0 ? sstats.getGp() / sstats.getPts() : 0); sstats.setPlayer(shawn); configuration.add("ken stats", kstats); configuration.add("doug stats", dstats); configuration.add("shawn stats", sstats);
RE: npe on simple type usage
I use these types to get padding and comfort. It doesnt make sense to me. Sorry to keep posting. Just trying to click and go. What could be causing an NPE? @Entity @ClassDescriptor(hasCyclicRelationships = true) @BeanModels( { @BeanModel(pageType = PageType.LIST, include = "player, gp, g, a, pts, ppg", exclude="") }) public class PlayerStats extends AbstractEntity implements Cloneable, Serializable { public Integer getPts() { return getA() + getG(); // offending line } Caused by: java.lang.NullPointerException at org.tynamo.examples.pphl.model.PlayerStats.getPts(PlayerStats.java:134) at org.tynamo.examples.pphl.model.PlayerStats.getPpa(PlayerStats.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:172) at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValues(AbstractEntityTuplizer.java:482) at org.hibernate.tuple.entity.PojoEntityTuplizer.getPropertyValues(PojoEntityTuplizer.java:241) at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValues(AbstractEntityPersister.java:3832) at org.hibernate.criterion.Example.toSqlString(Example.java:208) at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:380) at org.hibernate.loader.criteria.CriteriaJoinWalker.(CriteriaJoinWalker.java:113) at org.hibernate.loader.criteria.CriteriaJoinWalker.(CriteriaJoinWalker.java:82) at org.hibernate.loader.criteria.CriteriaLoader.(CriteriaLoader.java:92) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1697) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.tynamo.seedentity.hibernate.services.SeedEntityImpl.seed(SeedEntityImpl.java:133) at org.tynamo.seedentity.hibernate.services.SeedEntityImpl.(SeedEntityImpl.java:49) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.tapestry5.ioc.internal.util.ConstructorInvoker.invoke(ConstructorInvoker.java:48) at org.apache.tapestry5.ioc.internal.util.LoggingInvokableWrapper.invoke(LoggingInvokableWrapper.java:42) 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:1121) at org.apache.tapestry5.ioc.internal.util.ConstructionPlan.createObject(ConstructionPlan.java:60) at org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:61) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) 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:1121) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29) at org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:46) at org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:63) at org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:54) at org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) 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:1121) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tap
RE: npe on simple type usage
Caused by: java.lang.NullPointerException at org.tynamo.examples.pphl.model.PlayerStats.getPts(PlayerStats.java:137) at org.tynamo.examples.pphl.model.PlayerStats.getPpa(PlayerStats.java:125) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:172) at org.hibernate.tuple.entity.AbstractEntityTuplizer.getPropertyValues(AbstractEntityTuplizer.java:482) at org.hibernate.tuple.entity.PojoEntityTuplizer.getPropertyValues(PojoEntityTuplizer.java:241) at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValues(AbstractEntityPersister.java:3832) at org.hibernate.criterion.Example.toSqlString(Example.java:208) at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:380) at org.hibernate.loader.criteria.CriteriaJoinWalker.(CriteriaJoinWalker.java:113) at org.hibernate.loader.criteria.CriteriaJoinWalker.(CriteriaJoinWalker.java:82) at org.hibernate.loader.criteria.CriteriaLoader.(CriteriaLoader.java:92) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1697) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.tynamo.seedentity.hibernate.services.SeedEntityImpl.seed(SeedEntityImpl.java:133) at org.tynamo.seedentity.hibernate.services.SeedEntityImpl.(SeedEntityImpl.java:49) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.tapestry5.ioc.internal.util.ConstructorInvoker.invoke(ConstructorInvoker.java:48) at org.apache.tapestry5.ioc.internal.util.LoggingInvokableWrapper.invoke(LoggingInvokableWrapper.java:42) 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:1121) at org.apache.tapestry5.ioc.internal.util.ConstructionPlan.createObject(ConstructionPlan.java:60) at org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:61) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) 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:1121) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29) at org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:46) at org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:63) at org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:54) at org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) 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:1121) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:66) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:54) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.eagerLoadService(JustInTimeObjectCreator.java:86) at org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup(RegistryImpl.java:320) at org.apache.tapestry5.ioc.internal.RegistryWrapper.performRegi
npe on simple type usage
Folks, I keep getting NPE on simple calculations. Is there something here that tapestry doesnt like ? public Float getPpa() { Float result = new Float(getPts() > 0 ? getGp() / getPts() : 0); return result; } @PropertyDescriptor(nonVisual = false) public Float getPpg() { Float result = new Float(getPts() > 0 ? getGp() / getPts() : 0); return result; } both these routines are causing NPE. getPts() getGp() and getPts all return Integer. ?
RE: 5.4-alpha-4 preview release
Sorry, it took me ages before I could retrieve this mail to see new posts and reply. What I meant by dual modding is the ability for any Tapestry user to use whatever JS framework he or she likes. There were rumours that in Tap5.4 Prototype will be once and for all put out of focus, and Prototype activities would be replaced by JQuery. That is what I meant, hope it is now more clear. :) > Date: Wed, 29 May 2013 19:16:57 -0500 > Subject: Re: 5.4-alpha-4 preview release > From: trs...@gmail.com > To: users@tapestry.apache.org > > On Wed, May 29, 2013 at 11:08 AM, Howard Lewis Ship wrote: > > > > > > > > > > > I had one problem getting it to run. I had to add > > > > > > > > > > > > org.slf4j > > > > > > slf4j-log4j12 > > > > > > 1.7.2 > > > > > > > > > > > > > > > to my pom file. It appears to be in tapestry-core but marked test. > > > > > > > > This has been going back and forth; the idea is to not lock you into a > > particular SLF4J implementation, at the expense of making you select one. > > If this was included as a core dependency and you wanted to switch to, say, > > logback, you would have to exclude this dependency then include logback. > > The Maven archetype will include a specific SLF4J implementation. > > > > > In general I would prefer things work out of the box and exclude the > dependency if needed, but it did not take too long to figure out the > problem. > > > > > > > > > > > > I tried BeanEditForm and have a question about it. Unfortunately > > Bootstrap > > > changes the markup for forms when the class is form-horizontal. It > > appears > > > BeanEditForm always outputs the markup for form-horizontal so the other > > > form styles do not work correctly. > > > > > > > > More information on that would be great. > > > > Basic forms in Bootstrap have little to no extra markup. The example has > > http://twitter.github.io/bootstrap/base-css.html#forms > > >1. >2. >3. Legend >4. Label name >5. >6. Example block-level help text here. >7. >8. Check me out >9. >10. Submit >11. >12. > > > Only the form-horizontal has the extra control group > >1. >2. Password >3. >4. >5. >6. >7. >8. >9. >10. Remember me >11. >12. Sign in >13. >14. > > > While the simple forms work with the control group the extra tags change > the output format. This means the output of each property in the BeanEditor > is dependent on the class parameter to BeanEditForm or Form. I guess the > class could be added to FormSupport so the underlying parameters could > render differently depending on the class. Also just to make things more > difficult notice how the label for the checkbox spans the input but the > textfield label does not. > > On my Bootstrap module I did all this using the DOM and a visitor, but if > you are creating components from scratch I don't think I would do it that > way. > > > > > > > > > > > I'll try and build something real this weekend. > > > > > > Thanks > > > Barry > > > > > > > > > On Tue, May 28, 2013 at 3:28 PM, Howard Lewis Ship > > > wrote: > > > > > > > For all you early adopters ... > > > > > > > > 5.4-alpha-4 preview release is now available > > > > > > > > Maven Repository: > > > > > > > > > https://repository.apache.org/content/repositories/orgapachetapestry-019/ > > > > > > > > Big improvements: > > > > > > > > - URLs for compressed assets are now separate from uncompressed assets > > > > - Many problems with CSS url() rewriting have been fixed > > > > - new tapestry-wro4j library for runtime: > > > > - CoffeeScript to JavaScript compilation > > > > - Less to CSS compilation > > > > - JavaScript minimization > > > > - CSS minimization > > > > > > > > -- > > > > Howard M. Lewis Ship > > > > > > > > Creator of Apache Tapestry > > > > > > > > The source for Tapestry training, mentoring and support. Contact me to > > > > learn how I can get you up and productive in Tapestry fast! > > > > > > > > (971) 678-5210 > > > > http://howardlewisship.com > > > > > > > > > > > > > > > -- > > Howard M. Lewis Ship > > > > Creator of Apache Tapestry > > > > The source for Tapestry training, mentoring and support. Contact me to > > learn how I can get you up and productive in Tapestry fast! > > > > (971) 678-5210 > > http://howardlewisship.com > >
RE: Pulling different description for image based on choosen language
Great proposal, Horvat! :) Will do exactly that. However, one more concern is on my mind right now. I have included Tap-JQuery library, and everything is fine, until I load it! My app can't even be deployed, from the Tomcat logs, I can see it keeps complaining about 30.05.2013 14:32:46 org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter app java.lang.RuntimeException: Exception loading module(s) from manifest jar:file:/C:/Users/Daniel_Sabado_Images/Documents/NetBeansProjects/ObligadoProecto /build/web/WEB-INF/lib/tapestry-jquery.jar!/META-INF/MANIFEST.MF: Failure loading Tapestry IoC module class org.got5.tapestry5.jquery.services.JQueryModule: Error invoking service binder method org.got5.tapestry5.jquery.services.JQueryModule.bind(ServiceBinder) (at JQueryModule.java:155): org/apache/tapestry5/upload/services/UploadedFile
Re: 5.4-alpha-4 preview release
On Wed, May 29, 2013 at 11:08 AM, Howard Lewis Ship wrote: > > > > > > I had one problem getting it to run. I had to add > > > > > > > > org.slf4j > > > > slf4j-log4j12 > > > > 1.7.2 > > > > > > > > > > to my pom file. It appears to be in tapestry-core but marked test. > > > > > This has been going back and forth; the idea is to not lock you into a > particular SLF4J implementation, at the expense of making you select one. > If this was included as a core dependency and you wanted to switch to, say, > logback, you would have to exclude this dependency then include logback. > The Maven archetype will include a specific SLF4J implementation. > > In general I would prefer things work out of the box and exclude the dependency if needed, but it did not take too long to figure out the problem. > > > > > > I tried BeanEditForm and have a question about it. Unfortunately > Bootstrap > > changes the markup for forms when the class is form-horizontal. It > appears > > BeanEditForm always outputs the markup for form-horizontal so the other > > form styles do not work correctly. > > > > > More information on that would be great. > Basic forms in Bootstrap have little to no extra markup. The example has http://twitter.github.io/bootstrap/base-css.html#forms 1. 2. 3. Legend 4. Label name 5. 6. Example block-level help text here. 7. 8. Check me out 9. 10. Submit 11. 12. Only the form-horizontal has the extra control group 1. 2. Password 3. 4. 5. 6. 7. 8. 9. 10. Remember me 11. 12. Sign in 13. 14. While the simple forms work with the control group the extra tags change the output format. This means the output of each property in the BeanEditor is dependent on the class parameter to BeanEditForm or Form. I guess the class could be added to FormSupport so the underlying parameters could render differently depending on the class. Also just to make things more difficult notice how the label for the checkbox spans the input but the textfield label does not. On my Bootstrap module I did all this using the DOM and a visitor, but if you are creating components from scratch I don't think I would do it that way. > > > > > I'll try and build something real this weekend. > > > > Thanks > > Barry > > > > > > On Tue, May 28, 2013 at 3:28 PM, Howard Lewis Ship > > wrote: > > > > > For all you early adopters ... > > > > > > 5.4-alpha-4 preview release is now available > > > > > > Maven Repository: > > > > > > https://repository.apache.org/content/repositories/orgapachetapestry-019/ > > > > > > Big improvements: > > > > > > - URLs for compressed assets are now separate from uncompressed assets > > > - Many problems with CSS url() rewriting have been fixed > > > - new tapestry-wro4j library for runtime: > > > - CoffeeScript to JavaScript compilation > > > - Less to CSS compilation > > > - JavaScript minimization > > > - CSS minimization > > > > > > -- > > > Howard M. Lewis Ship > > > > > > Creator of Apache Tapestry > > > > > > The source for Tapestry training, mentoring and support. Contact me to > > > learn how I can get you up and productive in Tapestry fast! > > > > > > (971) 678-5210 > > > http://howardlewisship.com > > > > > > > > > -- > Howard M. Lewis Ship > > Creator of Apache Tapestry > > The source for Tapestry training, mentoring and support. Contact me to > learn how I can get you up and productive in Tapestry fast! > > (971) 678-5210 > http://howardlewisship.com >
Re: Page Url rewriting in tapestry
I understand the difference between decorator and builder method. Actually i was using contribute as my weapon of choice and I guess I could be lacking on the knowledge there. More specifically does contribution of the method act more like decorator or builder. Nonetheless I was able to make my decorator to work :) Thanks for your example Cheers On Wed, May 29, 2013 at 3:12 PM, Lance Java wrote: > Hi Boris, I'm not sure you have grasped the concept of an IOC decorator. A > decorator method name is prefixed with "decorate" and gets passed the > default implementation so that it can delegate through to it. It is > different to a "builder" method (prefixed with "build") which I think you > might be using which is most likely causing a circular reference / > StackOverflow. > > http://tapestry.apache.org/tapestry-ioc-decorators.html > > I did this a while ago but from memory, the PageRenderLinkTransformer was > not sufficient for what I was trying to do because I wanted to transform > component events as well as page render events. > -- Sincerely *Boris Horvat*
Re: Pulling different description for image based on choosen language
http://tapestry.apache.org/localization.html
Re: Pulling different description for image based on choosen language
Hi, Ok, go implement it I dont have any objections :) What I am trying to say is that you dont really say what is the problem that you are facing and how does it relate to tapestry... If you are looking for a general advice for something like that this may not be the best forum for such question. Still what I would do is put the descriptions in the db and then created a query that takes the image and the language and returns the description and finally display that to the users. Hope this helps Cheers, Boris On Thu, May 30, 2013 at 12:02 AM, Nomen Nomanum wrote: > Hi! I want to implement for my app processing of different description for > my image based on choosen language. So, if user chooses Spanish, only > Spanish description for my image should be rendered. Thanks in advance. > -- Sincerely *Boris Horvat*
Pulling different description for image based on choosen language
Hi! I want to implement for my app processing of different description for my image based on choosen language. So, if user chooses Spanish, only Spanish description for my image should be rendered. Thanks in advance.
Re: Tapestry 5.4-alpha-6 preview
It takes about 20 minutes to build, run tests, package, and upload. On Wed, May 29, 2013 at 12:02 PM, Dmitry Gusev wrote: > Release early, release often! :) > > On Wed, May 29, 2013 at 10:58 PM, Howard Lewis Ship >wrote: > > > When it rains, it pours. I tripped across a bug ( > > https://issues.apache.org/jira/browse/TAP5-2120) and created alpha-6 > with > > the fix. > > > > Maven repository: > > > https://repository.apache.org/content/repositories/orgapachetapestry-036/ > > > > -- > > Howard M. Lewis Ship > > > > Creator of Apache Tapestry > > > > The source for Tapestry training, mentoring and support. Contact me to > > learn how I can get you up and productive in Tapestry fast! > > > > (971) 678-5210 > > http://howardlewisship.com > > > > > > -- > Dmitry Gusev > > AnjLab Team > http://anjlab.com > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: Tapestry 5.4-alpha-6 preview
Release early, release often! :) On Wed, May 29, 2013 at 10:58 PM, Howard Lewis Ship wrote: > When it rains, it pours. I tripped across a bug ( > https://issues.apache.org/jira/browse/TAP5-2120) and created alpha-6 with > the fix. > > Maven repository: > https://repository.apache.org/content/repositories/orgapachetapestry-036/ > > -- > Howard M. Lewis Ship > > Creator of Apache Tapestry > > The source for Tapestry training, mentoring and support. Contact me to > learn how I can get you up and productive in Tapestry fast! > > (971) 678-5210 > http://howardlewisship.com > -- Dmitry Gusev AnjLab Team http://anjlab.com
Tapestry 5.4-alpha-6 preview
When it rains, it pours. I tripped across a bug ( https://issues.apache.org/jira/browse/TAP5-2120) and created alpha-6 with the fix. Maven repository: https://repository.apache.org/content/repositories/orgapachetapestry-036/ -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: Tapestry 5.4-alpha-5 preview
Also, here's the Maven repository: https://repository.apache.org/content/repositories/orgapachetapestry-035/ On Wed, May 29, 2013 at 9:23 AM, Howard Lewis Ship wrote: > This corrects two problems: > > 1) the new tapestry-test-data module wasn't built correctly > 2) BaseOptimizedSessionPersistedObject is now Serializable, making > Tapestry work correctly in clusters > > -- > Howard M. Lewis Ship > > Creator of Apache Tapestry > > The source for Tapestry training, mentoring and support. Contact me to > learn how I can get you up and productive in Tapestry fast! > > (971) 678-5210 > http://howardlewisship.com > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: jQuery/bind mixin does not submit field value onChange
This was my issue https://github.com/got5/tapestry5-jquery/issues/295 cheers On Wed, May 29, 2013 at 6:14 PM, Ben Titmarsh wrote: > Thanks for your replies. > > Jens I will try out both of those suggestions! > > Boris - I'm actually using a fairly old version then - 3.2.0. Do you have > a link to the JIRA issue or release notes or anything so that I can review > your bug report? > > Thanks, > Ben. > > > From: horvat.z.bo...@gmail.com > > Date: Tue, 28 May 2013 19:25:48 +0200 > > Subject: Re: jQuery/bind mixin does not submit field value onChange > > To: users@tapestry.apache.org > > > > Hi, > > > > I recently reported a bug whcih I think could be what you are talking > > about. This was fixed in the new version 3.3.7-SNAPSHOT, are you using > this? > > > > Cheers, > > Boris > > > > > > On Tue, May 28, 2013 at 4:31 PM, Jens Breitenstein >wrote: > > > > > Hi Ben! > > > > > > Any particular reason why you need bind for capturing the change event > of > > > a select? > > > This works for me (honestly not tried in a AjaxFormLoop, so don't kill > me): > > > > > > > > t:validate="required" > > >blankOption="Always" > value="**schoolFinderSearchOptionValue" > > > zone="schoolFinderZone"/> > > > > > > as schoolFinderSearchOptionValue is defined as an Enum Property > > > > > > @Property private ESchoolFinderSearchOption _** > > > schoolFinderSearchOptionValue; > > > > > > therefore Tapestry calls > > > > > > Object onValueChanged(final ESchoolFinderSearchOption esfso) > > > { > > > > > > } > > > > > > > > > I guess due to the fact you have a zone and a jquery/bind at the same > time > > > you are getting two calls. In case you solely use bind you can send the > > > current value as part of the request by adding a callback (this > snipped is > > > working for me in an AjayFormLoop with a checkbox, so please modify it > > > accordingly for your "input field of type select"): > > > > > > bind.event="**deleteCheckboxChanged" > > > bind.eventType="change" > > > bind.callback="function(event,**ui,url) { > url.addContext(event.target. > > > **checked); }" > > > > > > and this calls > > > > > > Object onDeleteCheckboxChanged(final long formEventPk, final String > > > state)// you can even use: ..., final boolean state) > instead of > > > string > > > { > > > ... > > > } > > > > > > > > > Jens > > > > > > > > > > > > > > > Am 28.05.13 13:48, schrieb Ben Titmarsh: > > > > > > Hi All, > > >> > > >> I am using the jQuery bind mixin to respond to 'onChange' events from > my > > >> form fields, process the change then update the zone. This is my tml: > > >> > > >> > >> t:value="cubeCard.**superTypeCombinationOverride" > > >> t:mixins="jquery/bind" > > >> bind.context="cubeCard.id" > > >> bind.event="**SuperTypeOverrideChanged" > > >> bind.eventType="change" > > >> bind.zone="gridZone" t:zone="gridZone" /> > > >> > > >> I have a bunch of these created in a loop, each with a different > > >> cubeCard.id context value. > > >> > > >> What I'm seeing is that when the value of the field is changed, two > > >> requests are produced: > > >> > > >> 1. /editcube:**supertypeoverridechanged/49 > > >> 2. /editcube.supertypeoverride:**change > > >> > > >> The first one contains the important context value and the second one > > >> contains the changed value of the form field in the Request body. I > can > > >> add a handler for both in my page class: > > >> > > >> 1. public Object onSuperTypeOverrideChanged(**Integer cubeCardId) > > >> 2. public void onChangeFromSuperTypeOverride(**) > > >> > > >> But the problem is that I need the context AND the submitted value, > > >> therefore what I'm having to do is basically wait for the second > request to > > >> be processed and the value set on the server side before I can > process the > > >> request containing the context: > > >> > > >> public Object onSuperTypeOverrideChanged(**Integer cubeCardId) { > > >> Thread.sleep(200); > > >> //processing > > >> return gridZone.getBody(); > > >> } > > >> > > >> Clearly this isn't ideal. So, am I doing something wrong here? > Should I > > >> be getting two requests or just one? Is there anyone else who has > > >> experience with this mixin who can help me out? > > >> > > >> Thanks, > > >> Ben. > > >> > > >> > > >> > > >> > > > > > > > > > > > > > --**--**- > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org< > users-unsubscr...@tapestry.apache.org> > > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > > > > > -- > > Sincerely > > *Boris Horvat* > -- Sincerely *Boris Horvat*
Tapestry 5.4-alpha-5 preview
This corrects two problems: 1) the new tapestry-test-data module wasn't built correctly 2) BaseOptimizedSessionPersistedObject is now Serializable, making Tapestry work correctly in clusters -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
RE: jQuery/bind mixin does not submit field value onChange
Thanks for your replies. Jens I will try out both of those suggestions! Boris - I'm actually using a fairly old version then - 3.2.0. Do you have a link to the JIRA issue or release notes or anything so that I can review your bug report? Thanks, Ben. > From: horvat.z.bo...@gmail.com > Date: Tue, 28 May 2013 19:25:48 +0200 > Subject: Re: jQuery/bind mixin does not submit field value onChange > To: users@tapestry.apache.org > > Hi, > > I recently reported a bug whcih I think could be what you are talking > about. This was fixed in the new version 3.3.7-SNAPSHOT, are you using this? > > Cheers, > Boris > > > On Tue, May 28, 2013 at 4:31 PM, Jens Breitenstein > wrote: > > > Hi Ben! > > > > Any particular reason why you need bind for capturing the change event of > > a select? > > This works for me (honestly not tried in a AjaxFormLoop, so don't kill me): > > > > > t:validate="required" > >blankOption="Always" > > value="**schoolFinderSearchOptionValue" > > zone="schoolFinderZone"/> > > > > as schoolFinderSearchOptionValue is defined as an Enum Property > > > > @Property private ESchoolFinderSearchOption _** > > schoolFinderSearchOptionValue; > > > > therefore Tapestry calls > > > > Object onValueChanged(final ESchoolFinderSearchOption esfso) > > { > > > > } > > > > > > I guess due to the fact you have a zone and a jquery/bind at the same time > > you are getting two calls. In case you solely use bind you can send the > > current value as part of the request by adding a callback (this snipped is > > working for me in an AjayFormLoop with a checkbox, so please modify it > > accordingly for your "input field of type select"): > > > > bind.event="**deleteCheckboxChanged" > > bind.eventType="change" > > bind.callback="function(event,**ui,url) { url.addContext(event.target. > > **checked); }" > > > > and this calls > > > > Object onDeleteCheckboxChanged(final long formEventPk, final String > > state)// you can even use: ..., final boolean state) instead of > > string > > { > > ... > > } > > > > > > Jens > > > > > > > > > > Am 28.05.13 13:48, schrieb Ben Titmarsh: > > > > Hi All, > >> > >> I am using the jQuery bind mixin to respond to 'onChange' events from my > >> form fields, process the change then update the zone. This is my tml: > >> > >> >> t:value="cubeCard.**superTypeCombinationOverride" > >> t:mixins="jquery/bind" > >> bind.context="cubeCard.id" > >> bind.event="**SuperTypeOverrideChanged" > >> bind.eventType="change" > >> bind.zone="gridZone" t:zone="gridZone" /> > >> > >> I have a bunch of these created in a loop, each with a different > >> cubeCard.id context value. > >> > >> What I'm seeing is that when the value of the field is changed, two > >> requests are produced: > >> > >> 1. /editcube:**supertypeoverridechanged/49 > >> 2. /editcube.supertypeoverride:**change > >> > >> The first one contains the important context value and the second one > >> contains the changed value of the form field in the Request body. I can > >> add a handler for both in my page class: > >> > >> 1. public Object onSuperTypeOverrideChanged(**Integer cubeCardId) > >> 2. public void onChangeFromSuperTypeOverride(**) > >> > >> But the problem is that I need the context AND the submitted value, > >> therefore what I'm having to do is basically wait for the second request to > >> be processed and the value set on the server side before I can process the > >> request containing the context: > >> > >> public Object onSuperTypeOverrideChanged(**Integer cubeCardId) { > >> Thread.sleep(200); > >> //processing > >> return gridZone.getBody(); > >> } > >> > >> Clearly this isn't ideal. So, am I doing something wrong here? Should I > >> be getting two requests or just one? Is there anyone else who has > >> experience with this mixin who can help me out? > >> > >> Thanks, > >> Ben. > >> > >> > >> > >> > > > > > > > > --**--**- > > To unsubscribe, e-mail: > > users-unsubscribe@tapestry.**apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > -- > Sincerely > *Boris Horvat*
Re: 5.4-alpha-4 preview release
FYI, due to some minor problems in alpha-4, I'm working on alpha-5 right now. I'm starting the work of porting a very large 5.3 app to 5.4. On Wed, May 29, 2013 at 4:31 AM, Barry Books wrote: > Tried it out this morning, here is my quick assessment: > > I like the new asset paths. I'll try and build an Amazon CloudFront CDN > this week. I did notice the scripts included by require.js do not have the > checksums in the urls. Is that correct? > Yes, for modules, there is no checksum in the URL, but there is an ETag containing the checksum. On the client side, we start knowing only the module's name ("i.e., "t5/core/events"); without the file content we can't generate the checksum. Eventually, I'll include a mechanism to aggregate specific modules into the JavaScript stack. > > I had one problem getting it to run. I had to add > > > > org.slf4j > > slf4j-log4j12 > > 1.7.2 > > > > > to my pom file. It appears to be in tapestry-core but marked test. > > This has been going back and forth; the idea is to not lock you into a particular SLF4J implementation, at the expense of making you select one. If this was included as a core dependency and you wanted to switch to, say, logback, you would have to exclude this dependency then include logback. The Maven archetype will include a specific SLF4J implementation. > I tried Grid with a few Bootstrap styles and it did what I expected. I'm a > big fan of the new Bootstrap css. > As am I! > > I tried BeanEditForm and have a question about it. Unfortunately Bootstrap > changes the markup for forms when the class is form-horizontal. It appears > BeanEditForm always outputs the markup for form-horizontal so the other > form styles do not work correctly. > > More information on that would be great. > I'll try and build something real this weekend. > > Thanks > Barry > > > On Tue, May 28, 2013 at 3:28 PM, Howard Lewis Ship > wrote: > > > For all you early adopters ... > > > > 5.4-alpha-4 preview release is now available > > > > Maven Repository: > > > https://repository.apache.org/content/repositories/orgapachetapestry-019/ > > > > Big improvements: > > > > - URLs for compressed assets are now separate from uncompressed assets > > - Many problems with CSS url() rewriting have been fixed > > - new tapestry-wro4j library for runtime: > > - CoffeeScript to JavaScript compilation > > - Less to CSS compilation > > - JavaScript minimization > > - CSS minimization > > > > -- > > Howard M. Lewis Ship > > > > Creator of Apache Tapestry > > > > The source for Tapestry training, mentoring and support. Contact me to > > learn how I can get you up and productive in Tapestry fast! > > > > (971) 678-5210 > > http://howardlewisship.com > > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
ClassCast Exception while loading Service using its interface
Posting this on the user's list rather than dev which is where this belongs If you bind a service implementation to an interface, tapestry will create a proxy for you which is why you can't cast it to a concrete type. The proxy allows live class reloading and other AOP goodies. Unfortunately your use case requires a hack. You can either create an uber interface which extends the two interfaces, or you can do the following: public class Hack { private SineTraceGenerator sineTraceGenerator; public Hack(SineTraceGenerator sineTraceGenerator) { this.sineTraceGenerator = sineTraceGenerator; } public SinePattern getSinePattern() { return sineTraceGenerator; } public TraceGenerator getTraceGenerator() { return sineTraceGenerator; } } AppModule public Hack buildHack(@AutoBuild SineTraceGenerator sineTraceGenerator) { return new Hack(sineTraceGenerator); } public SinePattern buildSinePattern(Hack hack) { return hack.getSinePattern(); } public TraceGenerator buildTraceGenerator(Hack hack) { return hack.getTraceGenerator(); }
Re: Page Url rewriting in tapestry
Hi Boris, I'm not sure you have grasped the concept of an IOC decorator. A decorator method name is prefixed with "decorate" and gets passed the default implementation so that it can delegate through to it. It is different to a "builder" method (prefixed with "build") which I think you might be using which is most likely causing a circular reference / StackOverflow. http://tapestry.apache.org/tapestry-ioc-decorators.html I did this a while ago but from memory, the PageRenderLinkTransformer was not sufficient for what I was trying to do because I wanted to transform component events as well as page render events.
Re: 5.4-alpha-4 preview release
Tried it out this morning, here is my quick assessment: I like the new asset paths. I'll try and build an Amazon CloudFront CDN this week. I did notice the scripts included by require.js do not have the checksums in the urls. Is that correct? I had one problem getting it to run. I had to add org.slf4j slf4j-log4j12 1.7.2 to my pom file. It appears to be in tapestry-core but marked test. I tried Grid with a few Bootstrap styles and it did what I expected. I'm a big fan of the new Bootstrap css. I tried BeanEditForm and have a question about it. Unfortunately Bootstrap changes the markup for forms when the class is form-horizontal. It appears BeanEditForm always outputs the markup for form-horizontal so the other form styles do not work correctly. I'll try and build something real this weekend. Thanks Barry On Tue, May 28, 2013 at 3:28 PM, Howard Lewis Ship wrote: > For all you early adopters ... > > 5.4-alpha-4 preview release is now available > > Maven Repository: > https://repository.apache.org/content/repositories/orgapachetapestry-019/ > > Big improvements: > > - URLs for compressed assets are now separate from uncompressed assets > - Many problems with CSS url() rewriting have been fixed > - new tapestry-wro4j library for runtime: > - CoffeeScript to JavaScript compilation > - Less to CSS compilation > - JavaScript minimization > - CSS minimization > > -- > Howard M. Lewis Ship > > Creator of Apache Tapestry > > The source for Tapestry training, mentoring and support. Contact me to > learn how I can get you up and productive in Tapestry fast! > > (971) 678-5210 > http://howardlewisship.com >
Re: 5.4-alpha-4 preview release
On Tue, 28 May 2013 21:40:25 -0300, Nomen Nomanum wrote: What happened to dual modding? What the hell is dual modding? Is it possible that Tapestry itself will figure out when prototype, jquery or some other JS library is involved, and therefore process it's parameters as scheduled from template listing? What's the relation between parameters and JS frameworks? As Howard, I have no idea what's being talked about here. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: property bindings
On Wed, 29 May 2013 01:49:03 -0300, Jens Breitenstein wrote: Hi Ken, Hi! somethings I get the feeling you use this mailinglist like a chat system providing much info in many many small chunks. Can't you just gather all information first and afterwards throw it to the mailinglist? And for this particular topic, I miss the stacktrace maybe I did not see it. Can you show the complete NPE stacktrace? And how is "property binding" related to your NPE? Agreed 200%. Please, all people, remember: this is a mailing list. All messages you posted land in all the subscribers' inboxes. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: property bindings
On Tue, 28 May 2013 21:29:45 -0300, Ken in Nashua wrote: Hi Folks, Hi! I am tearing thru the docs and mail list searching for "when do properties bind" tapestry Properties are bound when the page instance is instantiated. But what you're really asking is when property bindings are read. The answer is: when the field in which the binding is done is read. Example: imagine a simple component: public class TextComponent { @Parameter private String text; public setupRender() { System.out.println(text); } } Then you use this component in a page or other component: When are these bindings performed? Their initial values are set to something other than null. You haven't provided a stack trace (you you always should), but I guess your problem is not bindings, but bugs in your code. By the way, you've posted template and code without really describing what the problem is. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Lightbox integration: Image isn't displayed
Are you sure the image URL is correct? Have you tried requesting it directly? On Tue, 28 May 2013 21:34:21 -0300, Nomen Nomanum wrote: I have set up prototype lightbox modal box, and everything works fine, until I click on my t:actionlink. It pops out everything as expected, however image can't be seen. What's the reason for image isn't properly displayed? t:id="getMePicture"> -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: query a collection for a page
On Tue, 28 May 2013 20:33:33 -0300, Ken in Nashua wrote: Hi Folks, Hi! I have a page that renders a collection in a grid. A hibernate collection... @Persist @Property private Collection collection; @SetupRender public void setupRender() { beanType = PlayerStats.class; collection = playerStats = new ArrayList( TynamoUTIL.loadCollectionByYearAndLeagueAndSeason( hibernatePersistenceService, year, league, season, PlayerStats.class)); // I know its hoakey for now grid.reset(); } I see no reason for @Persist'ing a filed that is set in a setupRender() method. but my getSource is giving me an NPE public GridDataSource getSource() { return new CollectionGridDataSource(collection); } Weird. Could you post the full stack trace? Have you checked whether your setupRender() method is really being called? If the page with these fields and methods isn't the one being requested, the setupRender() method won't be called. In addition, if the only place you use the collection field is in getSource(), you could get the collection from inside getSource() directly, without using setupRender() for that. I thought my properties would be binded by now These other fields are completely unrelated to your problem. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org