RE: object based security (owner)
Thanks Kalle, thats the answer I was seeking. Which persistence Service wold in order to ORM o MySQL ? Does that JPA construct do it itself somehow like javabeans or can I use the existing hibernate persistence service that comes with your suite ? Thanks for the solution, appreciate that. Ken
object based security (owner)
Hi Folks, I want to create a web site data model whereby... whatever a user creates... they own. And when they come back to the website to operate again... they will see only what they own. Its not as much as page based security as it is object based security... as in model object. Are there annotations available or mechanisms within tapestry-security to perform this in one hit so I can just put it at the top of my class (an annotation) or page and operate only on what the owner created ? Thanks
How to make login to database virtual mutually exclusive per user
Hi Folks, I have a database. And I want all users to login... But I want all my code to cater to each user, regardless of how many are logged in SAME CODE BASE... UNLIMITED USERS... CONCURRENCY... CONTENTION...total mayhem I am worried about database collisions amongst the tables since they will all need all the tables... or rows for themselves. Can I secure a virtual login by making their USER_ID the primary key to every table in the database ? Is there a trick I can use with the sessionID? Just wondering if there is a tech sheet on the dos and donts about this and ramifications of cluster safe too. Thanks for any tips, best practices or current trends on this topic. I hope this isnt the wrong forum. If it is I could use a friendly push to the proper one... - cheers Ken
How to make login to database virtual mutually exclusive per user
Hi Folks, I have a database. And I want all users to login... But I want all my code to cater to each user, regardless of how many are logged in SAME CODE BASE... UNLIMITED USERS... CONCURRENCY... CONTENTION...total mayhem I am worried about database collisions amongst the tables since they will all need all the tables... or rows for themselves. Can I secure a virtual login by making their USER_ID the primary key to every table in the database ? Is there a trick I can use with the sessionID? Just looking for best practices with tapestry-security. Just wondering if there is a tech sheet on the dos and dont's about this and ramifications of cluster safe too. Thanks for any tips, best practices or current trends on this topic. I hope this isn't the wrong forum. If it is I could use a friendly push to the proper one... Thank you for your kindness Ken
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: 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.init(CriteriaJoinWalker.java:113) at org.hibernate.loader.criteria.CriteriaJoinWalker.init(CriteriaJoinWalker.java:82) at org.hibernate.loader.criteria.CriteriaLoader.init(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.init(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
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.init(CriteriaJoinWalker.java:113) at org.hibernate.loader.criteria.CriteriaJoinWalker.init(CriteriaJoinWalker.java:82) at org.hibernate.loader.criteria.CriteriaLoader.init(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.init(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
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);
beanmodel ques
Hi Folks, I have a Player.class public class Player extends Person implements Cloneable, Serializable { private SetPlayerStats playerStats = new HashSetPlayerStats(); He has a collection of stats. goals, assists, points etc... I am rendering league leaders... so I have a bean model I am working on myModel = beanModelSource.createDisplayModel(Player.class, messages); myModel.add(action, null); myModel.include(id, number, photo, lastName, firstName); myModel.get(firstName).sortable(false); myModel.get(lastName).label(Surname); How do I get the stats into the bean model? They are of a different class PlayerStat.class I want to include both player info and player stats in the same bean model. Any tips are appreciated. Ken
RE: beanmodel ques
Players and stats are keyed by Season.class so there could be at any given time one Player instance and one PlayerStats instance to deal with. Its not immediately apparent to me how to combine properties from both classes into the grid bveanmodel
RE: beanmodel ques
Maybe I should be doing the bean model on PlayerStats public class PlayerStats implements Cloneable, Serializable { private static final Log log = LogFactory.getLog(PlayerStats.class); private Integer id = null; private Player player = null; ...can I refer to the player from there ? player.playerNumber ?
RE: beanmodel ques
Sorry folks... if I got this @Entity @ClassDescriptor(hasCyclicRelationships = true) @BeanModels( { @BeanModel(pageType = PageType.LIST, include = player, gp, g, a, pts, exclude=) }) public class PlayerStats implements Cloneable, Serializable { private static final Log log = LogFactory.getLog(PlayerStats.class); private Integer id = null; private Player player = null; private Year year = null; can I do this ? myModel = beanModelSource.createDisplayModel(PlayerStats.class, messages); myModel.add(action, null); myModel.include(player.number, player.lastName, player.lastName, gp, g, a, pts); myModel.get(player.firstName).sortable(false); myModel.get(player.lastName).label(Surname);
query a collection for a page
Hi Folks, 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(); } but my getSource is giving me an NPE public GridDataSource getSource() { return new CollectionGridDataSource(collection); } I thought my properties would be binded by now @Property @Persist(PersistenceConstants.FLASH) private Year year; private ArrayList years; @Property @Persist(PersistenceConstants.FLASH) private ELeague league; @Property @Persist(PersistenceConstants.FLASH) private ESeason season; Am I doing something wrong ? Where/How do I query a collection for any given page ? I thought this was the right way to do this. Thanks for any tips.
Re: 5.4-alpha-4 preview release
nice... and thanks... I will see if I can run with it
RE: query a collection for a page
Well my code is based on the hope that my properties year, league, season will bind in time in order to perform a successful query. Am I performing the query in the wrong place?
RE: query a collection for a page
oops... I meant to say year, league, season are all null at the time of the query in getSource()
property bindings
Hi Folks, I am tearing thru the docs and mail list searching for when do properties bind tapestry No luck yet. But I will continue. I have two scenarios of bindings. Simple Enum select static Simple Enum select dynamic queried out of my database using hibernate I am setting up a query form/page kinda like NHL.com statistics My question... When are these bindings performed? Their initial values are set to something other than null. For my year select Here is my sample setup tml td select t:type=Select t:id=yearSelect t:clientId=yearSelect id=yearSelect t:model=prop:yearSelectModel t:encoder=prop:yearValueEncoder t:value=prop:year blankOption=never / /td and the java @Component(id = yearSelect, parameters = { value=year, clientId=yearSelect }) private Select yearSelect; public ValueEncoder getYearValueEncoder() { return valueEncoderSource.getValueEncoder(Year.class); } public SelectModel getYearSelectModel() { SelectModelFactory selectModelFactory = new SelectModelFactoryImpl(adapter, valueEncoderSource); years = new ArrayList(TynamoUTIL.loadCollection(hibernatePersistenceService, Year.class)); return selectModelFactory.create(years, displayableName); } @Property @Persist(PersistenceConstants.FLASH) private Year year; private ArrayList years; @SetupRender public void setupRender() { beanType = PlayerStats.class; collection = playerStats = new ArrayList( TynamoUTIL.loadCollectionByYearAndLeagueAndSeason( hibernatePersistenceService, year, league, season, PlayerStats.class)); grid.reset(); } I dont know when my properties will bind. Any ideas ? thanks
RE: property bindings
alright... i hate doing null checks... because if you get into the habit of it... you never know if your actually writing a legit piece of code So I did it anyway public GridDataSource getSource() { if (collection != null ) return new CollectionGridDataSource(collection); else return null; } and it works.. my form comes up... initialized.. table is empty.. as expected with the nice message No objects to render But is my code legit?
how to inject an environment variable
Hi Folks, Is there a way to inject an environment variable into my page somehow ? I would like to automate production mode to anchor off of a OS env var. been searching for this without luck Thanks for any tips. Ken
RE: how to inject an environment variable
Thanks Dmitry, I am able to keep developing. I reverted back to hibernate 3. And making more progress. I stepped too fast into the hibernate revisions and got bit. Appreciate the help. Its a great forum to share and I hope to give back for others when I see too. - cheers
Re: Can tapestry run on Android
http://powerplayhockey.noip.us:9011/pphl/home my tapestry app runs fine on my droid III kinda cramped though
RE: HibernateSessionSource - error - thx for any assistance
strange... I can run fine on eclipse in a reverted source code branch... but if I deploy love... it quits with the hibernate session creation failure Seems I need to wait for the release to deploy live again ouch
RE: HibernateSessionSource - error - thx for any assistance
Sorry folks, I think its fair that this is the problem. http://stackoverflow.com/questions/8799121/java-lang-nosuchmethoderror-org-hibernate-sessionfactory-opensessionlorg-hibe But I still have no solution to the framework am using.
RE: best way to integrate a page or component to keep modular
Well it looks like... if I get to it... I will write a MyShineyNewComponent to do the job. right now I have some jar file hidden deep in my build somehow dragging in an early version of hibernate and taking me out cold.
RE: HibernateSessionSource - error - thx for any assistance
Hi Folks, I determined this guy dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version${tapestry-release-version}/version scopeprovided/scope exclusions exclusion artifactIdorg.hibernate/artifactId groupIdhibernate-commons-annotations/groupId /exclusion /exclusions /dependency is pulling 3.0 binaries But even if I exclude... it gets the next 3.X revision of 3.0 binaries So I try adding this... dependency groupIdorg.hibernate.common/groupId artifactIdhibernate-commons-annotations/artifactId version4.0.1.Final/version scopeprovided/scope /dependency Do you think this will cause my 5.3.7 tapestry to behave properly ?
RE: HibernateSessionSource - error - thx for any assistance
well it didnt does anyone know a way out of this hole ? 2013-05-25 17:29:18.142:WARN:oejw.WebAppContext:Failed startup of context o.m.j.p.JettyWebAppContext{/,file:/C:/Prototype/Mavenized/Product/kwc/pphl/src/main/webapp/},file:/C:/Prototype/Mavenized/Product/kwc/pphl/src/main/webapp/ java.lang.RuntimeException: Exception constructing service 'SeedEntity': Error invoking constructor public org.tynamo.seedentity.hibernate.services.SeedEntityImpl(org.slf4j.Logger,org.apache.tapestry5.hibernate.HibernateSessionSource,java.util.List): org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session; here is the pom project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion artifactIdtapestry-hibernate-seedentity/artifactId nameTynamo Hibernate Seedentity/name packagingjar/packaging version0.1.4-SNAPSHOT/version description Object oriented seed entities for your Tapestry 5 Hibernate application /description parent groupIdorg.tynamo/groupId artifactIdtynamo-parent/artifactId version0.0.6/version /parent dependencies dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version${tapestry-release-version}/version scopeprovided/scope exclusions exclusion artifactIdorg.hibernate/artifactId groupIdhibernate-commons-annotations/groupId /exclusion /exclusions /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-validator/artifactId version4.0.1.GA/version scopeprovided/scope /dependency dependency groupIdorg.hibernate.common/groupId artifactIdhibernate-commons-annotations/artifactId version4.0.1.Final/version scopeprovided/scope /dependency dependency groupIdcommons-beanutils/groupId artifactIdcommons-beanutils/artifactId version1.8.1/version /dependency !-- Not needed for now and problematic because the artifact is not in repo1 dependency groupIdcom.formos.tapestry/groupId artifactIdtapestry-testify/artifactId version1.0.0/version scopetest/scope /dependency -- dependency groupIdcom.h2database/groupId artifactIdh2/artifactId scopetest/scope /dependency dependency groupIdorg.mockito/groupId artifactIdmockito-all/artifactId scopetest/scope /dependency dependency groupIdorg.testng/groupId artifactIdtestng/artifactId classifierjdk15/classifier scopetest/scope /dependency /dependencies distributionManagement site idtynamo-site/id !-- Note the url. Only static files deployed in /constant/ can be decorated by Unity -- urldav:https://dav.codehaus.org/tynamo/constant/sites/tapestry-hibernate-seedentity/url /site /distributionManagement build resources resource directorysrc/main/resources/directory /resource resource directorysrc/main/filtered-resources/directory filteringtrue/filtering /resource /resources plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration archive manifestEntries Tapestry-Module-Classesorg.tynamo.seedentity.hibernate.services.SeedEntityModule/Tapestry-Module-Classes /manifestEntries /archive /configuration /plugin /plugins /build scm connectionscm:svn:http://svn.codehaus.org/tynamo/trunk/tapestry-hibernate-seedentity/connection developerConnectionscm:svn:https://svn.codehaus.org/tynamo/trunk/tapestry-hibernate-seedentity/developerConnection urlhttp://svn.tynamo.codehaus.org/tynamo/trunk/tapestry-hibernate-seedentity/url /scm repositories !-- Not needed for now, see above repository idtapestry/id urlhttp://tapestry.formos.com/maven-repository/url /repository -- /repositories profiles profile idrepositories/id repositories repository idrepository.jboss.org/id
RE: HibernateSessionSource - error - thx for any assistance
Here is my dependency tree tapestry-hibernate I think might be tripping up my whole project by anchoring to 3.X hibernate as shown here [INFO] | +- org.apache.tapestry:tapestry-hibernate:jar:5.3.7:compile [INFO] | | \- org.apache.tapestry:tapestry-hibernate-core:jar:5.3.7:compile [INFO] | | +- geronimo-spec:geronimo-spec-jta:jar:1.0-M1:runtime [INFO] | | \- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile C:\Prototype\Mavenized\Product\kwc\pphlmvn dependency:tree [INFO] Scanning for projects... [INFO] [INFO] [INFO] Building Tynamo Example - pphl 1.0-SNAPSHOT [INFO] [INFO] [INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ pphl --- [INFO] org.tynamo.examples:pphl:war:1.0-SNAPSHOT [INFO] +- org.tynamo:tapestry-model-hibernate:jar:0.5.1-SNAPSHOT:compile [INFO] | +- org.tynamo:tapestry-model-core:jar:0.5.1-SNAPSHOT:compile [INFO] | | +- commons-collections:commons-collections:jar:3.2.1:compile [INFO] | | \- org.tynamo:tapestry-ckeditor:jar:0.0.1:compile [INFO] | +- org.apache.tapestry:tapestry-hibernate:jar:5.3.7:compile [INFO] | | \- org.apache.tapestry:tapestry-hibernate-core:jar:5.3.7:compile [INFO] | | +- geronimo-spec:geronimo-spec-jta:jar:1.0-M1:runtime [INFO] | | \- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile [INFO] | +- org.hibernate:hibernate-validator:jar:4.3.0.Final:compile [INFO] | | \- javax.validation:validation-api:jar:1.0.0.GA:compile [INFO] | \- org.apache.tapestry:tapestry-beanvalidator:jar:5.3.7:compile [INFO] +- org.tynamo:tapestry-model-test:jar:0.5.1-SNAPSHOT:test [INFO] | \- net.sourceforge.htmlunit:htmlunit:jar:2.11:test [INFO] | +- xalan:xalan:jar:2.7.1:test [INFO] | | \- xalan:serializer:jar:2.7.1:test [INFO] | +- org.apache.httpcomponents:httpmime:jar:4.2.2:test [INFO] | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.11:test [INFO] | +- net.sourceforge.cssparser:cssparser:jar:0.9.8:test [INFO] | | \- org.w3c.css:sac:jar:1.3:test [INFO] | \- org.eclipse.jetty:jetty-websocket:jar:8.1.7.v20120910:test [INFO] |+- org.eclipse.jetty:jetty-util:jar:8.1.7.v20120910:test [INFO] |+- org.eclipse.jetty:jetty-io:jar:8.1.7.v20120910:test [INFO] |\- org.eclipse.jetty:jetty-http:jar:8.1.7.v20120910:test [INFO] +- org.tynamo:tapestry-model-web:jar:0.5.1-SNAPSHOT:compile [INFO] +- com.h2database:h2:jar:1.2.125:compile [INFO] +- org.tynamo:tapestry-routing:jar:0.0.7-SNAPSHOT:compile [INFO] | \- org.apache.tapestry:tapestry-core:jar:5.3.7:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- commons-codec:commons-codec:jar:1.5:compile [INFO] | \- org.apache.tapestry:tapestry-json:jar:5.3.7:compile [INFO] +- org.tynamo:tapestry-security:jar:0.5.2-SNAPSHOT:compile [INFO] | +- org.apache.shiro:shiro-web:jar:1.2.0:compile [INFO] | | \- org.apache.shiro:shiro-core:jar:1.2.0:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.4:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.4:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | +- javassist:javassist:jar:3.12.1.GA:compile [INFO] | | \- org.apache.tapestry:plastic:jar:5.3.4:compile [INFO] | \- org.tynamo:tapestry-exceptionpage:jar:0.1.2:compile [INFO] +- org.tynamo.security:tynamo-federatedaccounts-core:jar:0.4.0-SNAPSHOT:compile [INFO] | +- org.apache.httpcomponents:httpclient:jar:4.2.2:compile [INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.2.2:compile [INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile [INFO] | \- org.slf4j:slf4j-api:jar:1.7.2:compile [INFO] +- org.tynamo.security:tynamo-federatedaccounts-facebook:jar:0.4.0-SNAPSHOT:compile [INFO] +- org.tynamo.security:tynamo-federatedaccounts-twitter:jar:0.4.0-SNAPSHOT:compile [INFO] | \- org.twitter4j:twitter4j-core:jar:2.2.3:compile [INFO] +- org.tynamo.security:tynamo-federatedaccounts-openid:jar:0.4.0-SNAPSHOT:compile [INFO] | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | +- org.openid4java:openid4java-consumer:pom:0.9.6:compile [INFO] | | +- org.openid4java:openid4java-nodeps:jar:0.9.6:compile [INFO] | | | \- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- net.sourceforge.nekohtml:nekohtml:jar:1.9.17:compile [INFO] | | \- xerces:xercesImpl:jar:2.10.0:compile [INFO] | |\- xml-apis:xml-apis:jar:1.3.03:compile [INFO] | +- com.google.inject:guice:jar:2.0:compile [INFO] | | \- aopalliance:aopalliance:jar:1.0:compile [INFO] | \- org.apache.commons:commons-lang3:jar:3.1:compile [INFO] +- org.tynamo.gae:esxx-httpclient-gae:jar:0.0.1:compile [INFO] +- javax.servlet:servlet-api:jar:2.5:provided [INFO] +-
RE: HibernateSessionSource - error - thx for any assistance
Thank You Boris, Any time frame ? I am hard for feedback. Already caught. Burned out from trying to back tread. Wish I knew of it sooner. But not sure if it would have helped me anyway. I will be happy when it happens. Thanks for any info
RE: JQuery tab widget - page in tab - setupRender not being called
I noticed that my setupRender didnt have public @SetupRender public void setupRender() { But after adding public ... it made no difference. Still cannot get setupRender to invoke. Thanks for any tips. Ken
RE: JQuery tab widget - page in tab - setupRender not being called
setupRender gets invoked (ever since I added public modifier)... but not until I clock GO for a submit event and even after that I lose context of the whole JQuery tab... and my page RosterQuery comes into Home.tml and blows away the whole context of the JQueryTab only showing the RosterQuery page. Not sure how I can retain context of the JQuery tabs after a submit event.
RE: JQuery tab widget - page in tab - setupRender not being called
Thanks Thiago... yes I am rendering Home.tml But it is rigged up with a two level nesting of tabs housing at least 6+ pages each. What do I do ? When the selectValueEncoder gets called from the tml for my query form... I actually do my setupRender code there... but it feel kinda crooked doing it like that. Dmitry's suggestion to use blocks to compose all the pages by referential connecting worked. It does reduce code bloat. Can I do anything to make it better ? Thanks Ken
RE: help constructing a page activation context
Thanks Dimitri : ) I didnt think I physically had to make the match happen in code. I thought the formal parameter spec was optional. I will give that a shot. So it seems signature counts. Thanks a bunch !!!
RE: best way to integrate a page or component to keep modular
Thanks Dimitri, Exactly... you hit the nail right on the head. I dont think i should have to write a component for every tab on a tab control just to reduce code bloat. Does anyone disagree with Dimitri ? If so i would like to hear it. There is no religion here... just common sense. : )
RE: trying to avoid code bloat
Thanks Joakim... I noticed that. I didnt believe the error... but its good to have a confirmation. I will try it again in that pages dir.
help constructing a page activation context
Hi Tapestry Pro's... Good morning.. I was wondering about my page. Here is the link to my page... its basically a prototype I will retrofit in later. http://localhost:8080/pphl/rosterquery My page renders and everything is good. I select my criteria and hit GO (submit). My tabel list gets populated and rendered... BUT... my page keeps taking off to somewhere else like http://localhost:8080/team or http://localhost:8080/player or http://localhost:8080/pphl/rosterquery.criteriaform with an HTTP error 404 I looked at my passivate routine and not sure what to put in it. I wuold like to return to the same page http://localhost:8080/pphl/rosterquery but when I return this from my submit it doesnt work. any ideas ? Thank You Ken @OnEvent(EventConstants.PASSIVATE) Object[] passivate() { return new Object[] { beanType }; }
RE: help constructing a page activation context
I tried the context specified below but clazz during activation always comes in as null. is this a tapestry bug ? @OnEvent(EventConstants.ACTIVATE) Object onActivate(Class clazz) { if (clazz == null) return Utils.new404(messages); this.beanType = clazz; return null; } @OnEvent(EventConstants.PASSIVATE) Object[] passivate() { return new Object[] { team, team.getId(), this }; }
RE: help constructing a page activation context
This seems to help me stay on the same page... /* @OnEvent(EventConstants.ACTIVATE) Object onActivate(Class clazz) { if (clazz == null) return Utils.new404(messages); this.beanType = clazz; return null; } */ @OnEvent(EventConstants.PASSIVATE) Object[] passivate() { return new Object[] { team, team.getId(), this }; } but I had to comment out onActivate... as it kept coming in with null CLAZZ is this a tapestry bug ? I could not get any parameters to come in based on the onPassivate I designed. But this is what I get for a URL... http://localhost:8080/org.tynamo.examples.pphl.pages.RosterQuery$0040337893/1/1 how do you explain that ?
Re: best way to integrate a page or component to keep modular
Guys, I stillk dont get it though... if I have a block like t:block /t:block How do I get a page rendered inside this block? I mean I have a page called RosterQuery.tml RosterQuery.java there is t:delegate/ t:body/ How do i put this together... I still dont know how to reference my page into the above block so it will embed render within theblock without having to copy and paste the whole page and clutter up my block.. All i want in my block is a one liner that will render my page. Can you tell me how this is done ? thanks
RE: best way to integrate a page or component to keep modular
you might be thinking I am inside my layout.tml... or my home.tml... almost... the case... My block is within my home.tml... which is already being laid thru to layout.tml and t:body/ is used in layout.tml my issue is just a surrogate tab block inside my home.tml all I want to do is embed the rendering of a page within the block I am specifying inside my home.tml any tips are very appreciated.
Re: help constructing a page activation context
Thanks Thiago... The usage of THIS... is because I am operating exclusively out of RosterQuery.JAVA and RosterQuery.tml This module renders ... = | criteria form GO | = | table| = I select my criteria and hit GO. The collection gets populated and table rendered. So i told my onPassivate to stay on this page. THIS Check it out at ... ooops I cant show you its not live yet
RE: help constructing a page activation context
tHANKS gEOFF... bUT it tell sme I have a serious problem onmy hands the output is not matching the input I dont know what to do I have seen this months ago tryign to create CRUD pages. Maybe it has to do with the routing features of tynamo? I dont know... Here is the routing feature @At(/{2}/{0}/{1}) public class RosterQuery implements ExceptionReporter { the annotation allows me to specify which array subscript (depending on how many you are employing in onPassivate.. if it is an array) gets positioned on the URL from between transmission onPassivate and onActivate. kool tool... but I think i uncovered a bug in it. The above routing scheme gets me what I want... @OnEvent(EventConstants.PASSIVATE) Object[] passivate() { return new Object[] { team, team.getId(), this }; } http://localhost:8080/org.tynamo.examples.pphl.pages.RosterQuery$00401b6140d/2/2 and that url gets me to stay on the same RosterQuery page that I intended to stay on after table gets rendered. Not sure what to make of the garble But I dont like the idea that everytime onActivate gets triggered... its formal parameter is NULL ░▒█▓░ ░░░▓██▒░░ ░▒▓▒░░▒▓▒ ▒▒░░░ ░░░███▒▒███░░ ░░██████░ ░██▓░░███ ██▓▓██░░░ ░░░██▓░░███░░ ░░███░▒░▒░▒░░░▒░▒░▒░▒██▓░ ░▒██░▒░▒░▒░▒░▒░▒░▒░▒░▒██░ ░██░░░▒░▒░▒░▒░▒░▒░▒██ ██▓░░▒░██▒░░░ ██░▒▒░░░██░░░ ░░░██▒░▒▒▒░░▓█▓░░ ░░░██░▒▒███░░██░░ ░░▓█▒░▒▒▒░░░▒██▓░▓█▒░ ░░██░▒▒░░░▒░▒▒▒░░░▓█▓░██░ ░░██░░▒▓▒▒░░░▒▒▒███▓▒░██░ ░▓█▒░░▓▒░░▒░░░▓██▒░░▒░▓█░ ░██░░█▓▒█▓▒█▓ ░██░▓▓▒█▒░░░█▓░██ ▒█▓░▒▓▓██░░▒██▒█▒░░░█▓░██ ▓█▒░▒░▒██░░░███▓█▓░█▒▓█░▓███▒░░░█▓▒▓█ ██▒██░░░██░░▓▓░▓▓░█▓░░░▒█▒▒▒█ ██░██░░░▓█▓░█▒░▓█░▒███▓▓█▒▒▒█ ██░▒▒▒░██▓███▓░░█▒▒▒█▒▒█▓▒▒▒█ ██░▓█▒▒▒▒░░▓█░▒▒▓█▒░░░██░▒▒▒█ ██░▒██▒█░▓█▓▒██▒█ ██▒░▒██░░▒█▓▒░▒██▓▓██▓░▒█ ██▒▒░▓██▓█▓░▒▒░▒▒▓▓▒░░▒▓█ ▓█▓▒▒░▒▓▓▒░▒▒░░░▒▒▒██ ░██▒▒▒░░░▒░██ ░██░▒░▒█▓ ░▓█▒▒▒▓█░ ░░██▒░░▒▒▒██░ ░░██▒▒░▒▓█▓▒░▒██░ ░░▒██▒█████░░ ░░░██▒▒░▓███▒░▒▓███▒▓██░░ ██▒██▓░░▒▒▒░░▒████░░░ ▓██▒▒▒██░▒░▓▓▒▒██▒░░░ ░███▒▓▓▒▒▒██▓ ░░██████░ ░░░███▓▓███░░ ▒▓███▓░░░ ░▒▓▓░ ░░░▓█▓▒▒▓█▓░░ ░▓██▒ ▒███▓▒░░░
RE: best way to integrate a page or component to keep modular
ok good answers guys... thanks... I cant say I am happy about it. I have to write a component just to embed a page ? Shouldn't there be a generic tapestry component to already do this ? ░▒█▓░ ░░░▓██▒░░ ░▒▓▒░░▒▓▒ ▒▒░░░ ░░░███▒▒███░░ ░░██████░ ░██▓░░███ ██▓▓██░░░ ░░░██▓░░███░░ ░░███░▒░▒░▒░░░▒░▒░▒░▒██▓░ ░▒██░▒░▒░▒░▒░▒░▒░▒░▒░▒██░ ░██░░░▒░▒░▒░▒░▒░▒░▒██ ██▓░░▒░██▒░░░ ██░▒▒░░░██░░░ ░░░██▒░▒▒▒░░▓█▓░░ ░░░██░▒▒███░░██░░ ░░▓█▒░▒▒▒░░░▒██▓░▓█▒░ ░░██░▒▒░░░▒░▒▒▒░░░▓█▓░██░ ░░██░░▒▓▒▒░░░▒▒▒███▓▒░██░ ░▓█▒░░▓▒░░▒░░░▓██▒░░▒░▓█░ ░██░░█▓▒█▓▒█▓ ░██░▓▓▒█▒░░░█▓░██ ▒█▓░▒▓▓██░░▒██▒█▒░░░█▓░██ ▓█▒░▒░▒██░░░███▓█▓░█▒▓█░▓███▒░░░█▓▒▓█ ██▒██░░░██░░▓▓░▓▓░█▓░░░▒█▒▒▒█ ██░██░░░▓█▓░█▒░▓█░▒███▓▓█▒▒▒█ ██░▒▒▒░██▓███▓░░█▒▒▒█▒▒█▓▒▒▒█ ██░▓█▒▒▒▒░░▓█░▒▒▓█▒░░░██░▒▒▒█ ██░▒██▒█░▓█▓▒██▒█ ██▒░▒██░░▒█▓▒░▒██▓▓██▓░▒█ ██▒▒░▓██▓█▓░▒▒░▒▒▓▓▒░░▒▓█ ▓█▓▒▒░▒▓▓▒░▒▒░░░▒▒▒██ ░██▒▒▒░░░▒░██ ░██░▒░▒█▓ ░▓█▒▒▒▓█░ ░░██▒░░▒▒▒██░ ░░██▒▒░▒▓█▓▒░▒██░ ░░▒██▒█████░░ ░░░██▒▒░▓███▒░▒▓███▒▓██░░ ██▒██▓░░▒▒▒░░▒████░░░ ▓██▒▒▒██░▒░▓▓▒▒██▒░░░ ░███▒▓▓▒▒▒██▓ ░░██████░ ░░░███▓▓███░░ ▒▓███▓░░░ ░▒▓▓░ ░░░▓█▓▒▒▓█▓░░ ░▓██▒ ▒███▓▒░░░
RE: best way to integrate a page or component to keep modular
cant I use the t:delegate to:myPageBlock / ?
best way to integrate a page or component to keep modular
Hi Folks, I have seen some templates grow are large and cluttered. I am trying to avoid such growth. Can someone list the components at hand to use to prevent this or to be used to maintain maximum modularity? Is there a preferred tapestry component or best practice way to keep tml and java files small and modular ? For example... I have a layout that specifies several blocks t:block t:id=tab2 h3PPHL A League/h3 hr/ t:jquery.tabs t:listTabData=prop:ALevel t:activePanelId=aLevelTabsIndex t:block t:id=tab00!-- begin block tab3 -- h3add INFORMATION description here/h3 hr/ /t:block t:block t:id=tab01 h3ROSTERS please select a team/h3 hr/ ... I could cut and paste whole pages into these blocks... or I could refer to a page or component? Does anyone know what the best practice to do this is ? I know there are a few ways for components/pages... back in my struts days I use to operate a target= construct just to point the rendering to a page and I would know for sure it would get rendered in my spot. Just curious and a bit wishy washy not sure which one would be best suited. I try to compose things together but still unsure if its the best way or not. I prefer to keep code modularized as much as possible. Thanks for your assistance. Ken
RE: best way to integrate a page or component to keep modular
For instance... given this block of code.. t:jquery.tabs t:listTabData=prop:ALevel t:activePanelId=aLevelTabsIndex t:block t:id=tab00!-- begin block tab3 -- h3add INFORMATION description here/h3 hr/ /t:block t:block t:id=tab01 h3ROSTERS please select a team/h3 hr/ t:renderthispagerighthereinplace page=rosterQueryPage / /t:block is there such a component that will do the above renderthispagerighthereinplace ? Thanks
Re : is openJDK compatible with Tapestry 5?
Hi Angela, Off the top of my head form looking at your specs... I would guess to say based on my experience with java which dates back to 1998... no. 64bit should accommodate 32bit apps forward revs should accommodate previous revs. byte codes that is I say go for it Funny when I think about my beginning old days in java... write once run everywhere ... was the claim to fame... but I extended it... write right once and run everywhere your java code should be platform safe
trying to avoid code bloat
Hi Folks, Can i construct an abstract page and inject a bunch of services and then have derived instances extend from that ? I tried it and seeing some weird class format errors. I did it with my model entities. trying to do it with pages and injectables. public abstract class AbstractPage implements org.tynamo.examples.pphl.pages.interfaces.IAbstractPage, ExceptionReporter { /** * services and injectables */ @Inject protected Logger logger; @Inject protected DescriptorService descriptorService; @Inject protected HibernatePersistenceService hibernatePersistenceService; @Inject protected Messages messages; @Inject protected PropertyAccess adapter; @Inject protected ValueEncoderSource valueEncoderSource; @Inject protected ComponentDefaultProvider cdp; @Inject protected ComponentResources resources; @Inject protected ApplicationStateManager applicationStateManager; @Inject protected PersistenceService persistenceService; @Inject protected SecurityService securityService;
RE: Re : is openJDK compatible with Tapestry 5?
Sorry Angela... for the dyslexic answer. i meant to say... yes your code should run as platform safe. Ken
RE: how to use HibernateEntityValueEncoder
Joakim, Thank you for the suggestion. I was hoping for checkins on the framework I use but non yet. I am stuck until that happens. But I can unit test while stuck. I will try your suggestion... making a get/set displayableString() and just put toString() inside of it. The tapestry framework should consider using toString as the default for objects populating select and contained options by default. I will let you know the result. Have a good day friend Ken
RE: how to use HibernateEntityValueEncoder
Hey Joakim... I tried your suggestion... and it worked. I actually created an interface with a host of default methods that I am forcing down the hierarchy... one of which is displayableName. And I made it past the tapestry code... final PropertyAdapter propertyAdapter = classPropertyAdapter.getPropertyAdapter(labelProperty); final ValueEncoder encoder = this.valueEncoderSource.getValueEncoder(propertyAdapter.getType()); propertyAdapter is not null anymore... and so I am able to get my encoder successfully now. Thanks a bunch... - ciao KEN public interface IAbstractEntity { @NonVisual @PropertyDescriptor(nonVisual = true, searchable = false) public Long getCreated(); @NonVisual @PropertyDescriptor(nonVisual = true, searchable = false) public Long getAccessed(); @NonVisual @PropertyDescriptor(nonVisual = true, searchable = false) public void setCreated(Long created); @NonVisual @PropertyDescriptor(nonVisual = true, searchable = false) public void setAccessed(Long accessed); @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public String getCreatedAsString(); @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public String getAccessedAsString(); @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public void setCreatedAsString(String value) throws Exception; @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public void setAccessedAsString(String value) throws Exception; public String getDisplayableName(); public void setDisplayableName(String displayableName); public int hashCode(); public boolean equals(Object obj); public String toString(); }
Re : Unknown entity and SessionFactory null
well its trying to configure from hibernate.cfg.xml did you spell it out properly in the config file ?
RE: Re : Unknown entity and SessionFactory null
Hi Angela, Looks liek you didnt specify any entities in your hibernate cfg mapping file. If you model an entity under your model/entity package, yes you need to tell your AppModule.JAVA about that directory... But you also need to tell hibernate about those entities. We do this by specifying them in our hibernate.cfg.xml Here is mine.. ?xml version=1.0 encoding=UTF-8? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD 3.0//EN http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd; hibernate-configuration session-factory !-- for more Database configuration options check: http://org.tynamo.examples.pphl.org/Sample+database+configurations -- property name=hibernate.connection.driver_classcom.mysql.jdbc.Driver/property property name=hibernate.connection.urljdbc:mysql://localhost:3306/thibernatetest?autoReconnect=true/property property name=hibernate.dialectorg.hibernate.dialect.MySQLDialect/property property name=hibernate.connection.usernameroot/property property name=hibernate.connection.passwordadmin/property property name=hbm2ddl.autoupdate/property property name=hibernate.show_sqlfalse/property property name=hibernate.format_sqltrue/property property name=hibernate.connection.pool_size90/property property name=autoReconnecttrue/property property name=hibernate.c3p0.min_size5/property property name=hibernate.c3p0.max_size20/property property name=hibernate.c3p0.timeout300/property property name=hibernate.c3p0.max_statements50/property property name=hibernate.c3p0.idle_test_period3000/property property name=hibernate.connection.provider_classorg.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider/property property name=hibernate.connection.provider_classorg.hibernate.connection.C3P0ConnectionProvider/property mapping class=org.tynamo.common.model.HibernateEntity/ mapping class=org.tynamo.examples.pphl.model.AdminLayout/ mapping class=org.tynamo.examples.pphl.model.PhotoGroup/ mapping class=org.tynamo.examples.pphl.model.PhotoGroupPhoto/ mapping class=org.tynamo.examples.pphl.model.UploadableMedia/ mapping class=org.tynamo.examples.pphl.model.Person/ mapping class=org.tynamo.examples.pphl.model.Sponsor/ mapping class=org.tynamo.examples.pphl.model.BroadCast/ mapping class=org.tynamo.examples.pphl.model.Coach/ mapping class=org.tynamo.examples.pphl.model.Demographics/ mapping class=org.tynamo.examples.pphl.model.Director/ mapping class=org.tynamo.examples.pphl.model.HitCounter/ mapping class=org.tynamo.examples.pphl.model.League/ mapping class=org.tynamo.examples.pphl.model.MetaTag/ mapping class=org.tynamo.examples.pphl.model.Officer/ mapping class=org.tynamo.examples.pphl.model.Organization/ mapping class=org.tynamo.examples.pphl.model.Payment/ mapping class=org.tynamo.examples.pphl.model.Player/ mapping class=org.tynamo.examples.pphl.model.PlayerStats/ mapping class=org.tynamo.examples.pphl.model.TeamStats/ mapping class=org.tynamo.examples.pphl.model.Inquiry/ mapping class=org.tynamo.examples.pphl.model.Team/ mapping class=org.tynamo.examples.pphl.model.Year/ /session-factory /hibernate-configuration
RE: how to use HibernateEntityValueEncoder
So it sounds like... I need to implement an auxillary property called getDisplayableName/setDisplayableName in order for this to make it into the options construct's. for EVERY class I intend to populate into any select. toString is the default displayable for any object i vote for that to be the default instead Thanks for pointing that out for me Thiago. If I can get my webapp to run then i will test it out and maybe implement my own SelectModelFactoryImpl - cheers
how to troubleshoot this bug
Folks, I attempted to upgrade to the framework I been using latest and greatest... to try and overcome some bugs that I havent resolved. Thinking it is a stale code drift runtime error... So I replenished a fresh local repo upgraded to latest and greatest framework and when I run my webapp I get this crash report Does anyone know how one would attempt to troubleshoot this ? The webapp bootstraps fine... all I am trying to do is goto my login.tml http://localhost:8080/pphl/login it doesnt seem to be using any grid though this stack trace isnt making any sense to me Thanks for any assist my users want to go live but I am kinda stuck An unexpected application exception has occurred.org.apache.tapestry5.ioc.internal.OperationExceptionEmbedded component(s) grid are defined within component class org.tynamo.examples.pphl.pages.collections.ListC (or a super-class of ListC), but are not present in the component template (null).traceConstructing instance of page class org.tynamo.examples.pphl.pages.collections.ListCCreating ComponentAssembler for org.tynamo.examples.pphl.pages.collections.ListCjava.lang.RuntimeExceptionEmbedded component(s) grid are defined within component class org.tynamo.examples.pphl.pages.collections.ListC (or a super-class of ListC), but are not present in the component template (null).Filter stack frames Stack trace org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.validateEmbeddedIds(ComponentAssemblerImpl.java:267) org.apache.tapestry5.internal.pageload.PageLoaderImpl.createTokenStream(PageLoaderImpl.java:325) org.apache.tapestry5.internal.pageload.PageLoaderImpl.programAssembler(PageLoaderImpl.java:252) org.apache.tapestry5.internal.pageload.PageLoaderImpl.access$1000(PageLoaderImpl.java:67) org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:239) org.apache.tapestry5.internal.pageload.PageLoaderImpl$4.invoke(PageLoaderImpl.java:222) org.apache.tapestry5.internal.pageload.PageLoaderImpl.createAssembler(PageLoaderImpl.java:221) org.apache.tapestry5.internal.pageload.PageLoaderImpl.getAssembler(PageLoaderImpl.java:211) org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:183) org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:178) org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:177) org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:104) org.tynamo.routing.services.AnnotatedPagesManagerImpl.eagerLoadPages(AnnotatedPagesManagerImpl.java:75) org.tynamo.routing.services.AnnotatedPagesManagerImpl.getRoutes(AnnotatedPagesManagerImpl.java:108) org.tynamo.routing.services.RouteSourceImpl.decodePageRenderRequest(RouteSourceImpl.java:31) org.tynamo.routing.services.RouterLinkTransformer.decodePageRenderRequest(RouterLinkTransformer.java:52) org.apache.tapestry5.internal.services.linktransform.LinkTransformerImpl.decodePageRenderRequest(LinkTransformerImpl.java:57) org.apache.tapestry5.internal.services.linktransform.LinkTransformerInterceptor.decodePageRenderRequest(LinkTransformerInterceptor.java:65) org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:41) org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95) org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119) org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:26) org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:56) org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:54) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
RE: how to use HibernateEntityValueEncoder
Thanks Joakim... for trying I tried to get a clean head rev build off my framework providers but its never had a clean head rev build ever (months and years) and I have been very quiet about it limping along waiting for pristine code. They seem to be under the impression that everything just works and tooting their horns on the framework site... when it dont... otherwise I would have been long gone spent busying myself focusing on business logic instead of build problems, codebase corruption code base instrumentation to overcome issues. So I am going to SHcan my attempt at getting a clean fresh build to eliminate these problems and revert back to the buggy code base I have been wrestling with. But if that worked I would have been focusing on business logic still. I will give your suggestion a try. I have been known to be a big mouth or sometimes a bad mouth about open source. At least when I was a committer I maintained a clean and tight head rev build and was always QA'ing the base line functionality to avoid any road blocks or show stoppers for users potentially waiting to go live. Thanks friend - cheers
RE: how to troubleshoot this bug
Thanks Thiago... my head is kinda spinnin... I been building and running and limping... you have seen some of the bugs I get. I can't get a position on the code base framework I am building off of. The head rev is unstable. There are outstanding bugs and issues... internal ones preventing fundamental functioning. And when I try to instrument that code base myself locally on my machine, its like the two dozen projects that make up the framework are wired into multiple revisions of the same thing... like tapestry...hibernate... I try to declare a property variable and build with tapestry-5.3.6 or 5.3.7... and the build still fails. I try to declare a property to build with hibernate-4.3.0-Final... and that produces even more maven dependency problems. I cant get a head rev build because thats broke and unstable. And when bugs like this come up... its like staring into dark matter out in space. Open source has never been like it was years back when we worked for DIGITAL EQUIPMENT CORPORATION and counted on MIT code to build our manufacturing departments and process control departments off of. Nothing works. If it does work... it isnt good enough to go live. And if you wait... it dont get fixed... and if you complain... you get nothing. open sources was bullet proof decades ago. but what would I know... I am just a java guy
RE: how to troubleshoot this bug
Its 5.3.7 I am backing down my code base to released versions and see what that buys me. previous bugs. Maybe this one will come back when I get new checkins? right now I am in a holding pattern. ciao
RE: how to troubleshoot this bug
Ok I am going to try and keep the code base and build against rev's that my framework providers are currently released and buolding against. thats why I asked this question... because my wife said... 'why dont you fix it yourself'... and seeing I ate and breathed HibernateDescriptorDecorator.JAVA morning noon and night for many years... i actually patched it in my dreams and souped it up way beyond spec. So i would like to try and fix it myself and beat the committers to the punch. How would you approach this stack trace... ? build issue? I am building against 5.3.7 tapestry (and no offense to the tap folks, I feel tapestry is beyond ripe now). Any help is appreciated. Thanks
RE: how to troubleshoot this bug
Do this look like normal build feedback? c:\Prototype\Mavenized\Product\tynamo\trunk\codehaus-unity-skincall mvn clean install -Dmaven.test.skip=true -DdownloadJavadocs=true -DdownloadSources=true 21 | te e ..\build-codehaus-unity-skin.log [INFO] Scanning for projects... Downloading: http://repo1.maven.org/maven2/org/tynamo/tynamo-parent/0.0.2/tynamo-parent-0.0.2.pom [WARNING] Checksum validation failed, expected f916504deab128ccecaa122fbf6385e3568b6240 but is 1350df16d0f1d79b61257947d1c5ffe6561e44f6 for http://repo1.maven.org/maven2/ org/tynamo/tynamo-parent/0.0.2/tynamo-parent-0.0.2.pom [WARNING] Checksum validation failed, expected f916504deab128ccecaa122fbf6385e3568b6240 but is 1350df16d0f1d79b61257947d1c5ffe6561e44f6 for http://repo1.maven.org/maven2/ org/tynamo/tynamo-parent/0.0.2/tynamo-parent-0.0.2.pom Downloaded: http://repo1.maven.org/maven2/org/tynamo/tynamo-parent/0.0.2/tynamo-parent-0.0.2.pom (11 KB at 52.4 KB/sec) [WARNING] [WARNING] Some problems were encountered while building the effective model for org.tynamo:codehaus-unity-skin:jar:0.0.2-SNAPSHOT
RE: how to troubleshoot this bug
There is no talking. If I create a jira I am met with contempt. And they got some dig about me in the past being a committer...hastily checking in code potentially running away with parts of the effort so they cannibalized me. But please dont think i am being bitter. I could care less. I am just not impressed with the standard. All I am trying to do is get an opportunity to say they are the best developers on the planet operating the best code base in the universe... thanks to chris nelson... american made. I havent been able to get that opportunity. I have about 150 users waiting to go live too. Things havent changed. Its not ready for commercial use. If dimitri asks for something its handed to him on a silver platter. I get guillotined and fed to the dogs. But like I said all I am looking for is something that works. And they havent met that standard yet. The code base is in shambles. Head rev never built or worked for 9 months and I been limping on a snapshot of January 1 checkout. It seems like me an dimitri and a handful of a few others... cardaddy... liftyourgame... or a couple mumbo jumbo out of your home web hacks are using it. If I ever went commercial depending on that code base the way its kept I could probably be committed to an asylum. But the opportunity is there to shine anytime they want to. And I am always eager to give credit where its due. I feel bad for the folks who look at it, try it.. and then kick it back. If Chris Nelson were operating this code base then I believe it would be like the MIT days with x-windows... when you could get a $100 per hour contract and set foot in the door of a large corp and reliably deliver. Is it just a toy? I like the code base alot (its like the terminator of code bases) and its got huge potential to allow developers to focus purely on business logic. All I would like is for it to work. So I am testing out snapshots of the code base backing down to something that might build or run. trial and error. Or I may go back to the January 1 code base and limp along. still hoping for the best
RE: how to troubleshoot this bug
For this stack trace... it is likely build mania...repo corruption..and unstable source so I am backing down to try and find something I can work with. - cheers Thanks
RE: how to use HibernateEntityValueEncoder
Hi Guys, really sorry about my lapse here in providing the right info and I kow it must be frustrating. I played hockey last night. So i got pre-empted. Ok I am back on the tarp. I will try to get the stack trace for you... but none is being produced in the console... and its an NPE ? I am wondering about that. My Year.Java class... yes its a pojo... I dont understand why that might be a crime... maybe for Date stuff... but its fairly remote and implemented independent. Ok back to he real stuff... Ok I am seeinfg the source code for this has tajken on some changes,,, Here is my blip @Inject @Property private TypeCoercer typeCoercer; @Property private SelectModel yearSelectModel; @Property @Persist(PersistenceConstants.FLASH) private Year year; @Inject private PropertyAccess adapter; @Inject private ValueEncoderSource valueEncoderSource; @SetupRender void setupRender() { SelectModelFactory selectModelFactory = new SelectModelFactoryImpl(adapter, valueEncoderSource); grid.reset(); years = new ArrayList(TynamoUTIL.loadCollection(hibernatePersistenceService, Year.class)); yearSelectModel = selectModelFactory.create(years, toString); selectModelFactory is failing because my usage of SelectModelFactoryImpl fails to operate. So I told eclipse to connect to the source code downloaded to my local repo... and sure enough.. in the debugger I see this... final PropertyAdapter propertyAdapter = classPropertyAdapter.getPropertyAdapter(labelProperty); final ValueEncoder encoder = this.valueEncoderSource.getValueEncoder(propertyAdapter.getType()); my propertyAdapter is null and any subsequent attempts to use it fail with NPE But I need to distinguish some kind of label property ? in my year class to this thing ? So it can create the proper OPTIONS eFrastructure ? I figured the Year.toString() method would suffice for this. Here is my Year.JAVA again Not sure what to think... tapestry is failing when I tell it to use Year.toString() What should I do ? @Entity @ClassDescriptor(hasCyclicRelationships = true, nonVisual = false) public class Year implements Cloneable, Serializable { private static final Log log = LogFactory.getLog(Year.class); private Integer id = null; private Integer yearStart = new Integer(0); private Integer yearEnd = new Integer(0); private League league = null; private Long created = new Long(GregorianCalendar.getInstance() .getTimeInMillis()); private Long accessed = new Long(GregorianCalendar.getInstance() .getTimeInMillis()); /** * CTOR */ public Year() { } public Year(Year dto) { try { BeanUtils.copyProperties(this, dto); } catch (Exception e) { log.error(e.toString()); e.printStackTrace(); } } /** * Accessor for id * * @return Integer * @hibernate.id generator-class=increment unsaved-value=-1 * type=java.lang.Integer unique=true insert=true */ @Id @GeneratedValue(strategy = GenerationType.AUTO) @PropertyDescriptor(readOnly = true) public Integer getId() { return id; } @PropertyDescriptor public Integer getYearStart() { return yearStart; } @PropertyDescriptor public Integer getYearEnd() { return yearEnd; } @ManyToOne public League getLeague() { return league; } @PropertyDescriptor(nonVisual = true, searchable = false) public Long getCreated() { return created; } @PropertyDescriptor(nonVisual = true, searchable = false) public Long getAccessed() { return accessed; } @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public String getCreatedAsString() { Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(created.longValue()); return DatePattern.sdf.format(cal.getTime()); } @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public String getAccessedAsString() { Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(accessed.longValue()); return DatePattern.sdf.format(cal.getTime()); } public void setId(Integer id) { this.id = id; } public void setYearStart(Integer yearStart) { this.yearStart = yearStart; } public void setYearEnd(Integer yearEnd) { this.yearEnd = yearEnd; } public void setLeague(League league) { this.league = league; } @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public void setCreatedAsString(String value) throws Exception { Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(DatePattern.sdf.parse(value).getTime()); this.created
RE: how to use HibernateEntityValueEncoder
Ok I am stepping thru the tapestry code during the create call... This is interesting... UnClaimedFieldWorker.JAVA public Object get(Object instance, InstanceContext context) { return fieldValue.get(fieldDefaultValue); } fieldDefaultvalue == null no npe as of yet its starts iterating thru my obejct list looks good so far I am at this line in SelectModelFactoryImpl.JAVA final PropertyAdapter propertyAdapter = classPropertyAdapter.getPropertyAdapter(labelProperty); this is what I see for classPropertyAdapter ClassPropertyAdaptor org.tynamo.examples.pphl.model.Year : accessed, accessedAsString, class, created, createdAsString, id, league, yearEnd, yearStart WHY ISNT THE toString method in this ? it is a legitimate property... yes ? Anyway I specified my labelProperty to be toString which should be the default by common sense? propertyAdapter keeps coming back with NULL. What can I do to my Year.JAVA to make this work ? Thanks for your help guys
RE: how to use HibernateEntityValueEncoder
This guy is the culprit... tap-5.3.6 I believe it needs to depend on a default toString() is it fails to find a labelProperty. I need a workaround folks... so waiting on your best. thanks KEN @SuppressWarnings(unchecked) public SelectModel create(final List? objects, final String labelProperty) { final ListOptionModel options = CollectionFactory.newList(); for (final Object object : objects) { final ClassPropertyAdapter classPropertyAdapter = this.propertyAccess .getAdapter(object); final PropertyAdapter propertyAdapter = classPropertyAdapter.getPropertyAdapter(labelProperty); final ValueEncoder encoder = this.valueEncoderSource.getValueEncoder(propertyAdapter.getType()); final Object label = propertyAdapter.get(object); options.add(new OptionModelImpl(encoder.toClient(label), object)); } return new SelectModelImpl(null, options); }
RE: how to use HibernateEntityValueEncoder
Hi Jens, I posted the pojo bean Year.java I really rely on the toString() for most of my entities. I wouldnt think of complicating any of my getters with dashes or underscores let alone complicate a primary keye method. This one is fairly obvious. I know I have some environment concerns and need o sync up with greatest/latest tynamo but for the most part my webapp is running. Hoping for a way out of this one today. What if I had a dozen select criteria components on my page ? Well i do... : ( I am trying to model stats just like NHL.com
RE: how to use HibernateEntityValueEncoder
Thanks Thiago... trust me I would send a console trace if I got one. Maybe my logger isnt tracing those packages in tapestry ? The NPE occurs inside (well i sent the browser trace)... org.tynamo.examples.pphl.pages.Query)org.apache.tapestry5.ioc.internal.util.TapestryExceptionjava.lang.NullPointerExceptionFilter stack frames Stack trace org.apache.tapestry5.internal.services.SelectModelFactoryImpl.create(SelectModelFactoryImpl.java:55) Its happening inside the create call tapestry cannot articulate the labelProperty I specified toString I put this in the threads few threads back. I appreciate your help And no I am not using any dashes or underscores in the primary keye method... Still hoping for a workaround
how to use HibernateEntityValueEncoder
Hi Folks, Finding scant docs on this class usage. And getting pulled down a rabbit hole. Are there any example usages of this ? All i want to do is populate my select component with database entities strings. thanks
RE: how to use HibernateEntityValueEncoder
thanks guys... but I keep gettign an NPE @Persist @Property HibernateEntityValueEncoderYear yearValueEncoder; @Inject private ValueEncoderSource valueEncoderSource; @Inject private SelectModelFactory selectModelFactory; private ArrayList years; @SetupRender void setupRender() { years = new ArrayList(TynamoUTIL.loadCollection(hibernatePersistenceService, Year.class)); yearSelectModel = selectModelFactory.create(years, year); } my selectModelFactory fails Any ideas ? An unexpected application exception has occurred.org.apache.tapestry5.internal.services.RenderQueueExceptionRender queue error in SetupRender[pphl/Query]: org.apache.tapestry5.ioc.internal.util.TapestryExceptionactiveComponentspphl/Query (class org.tynamo.examples.pphl.pages.Query)org.apache.tapestry5.ioc.internal.util.TapestryExceptionjava.lang.NullPointerExceptionFilter stack frames Stack trace org.apache.tapestry5.internal.services.SelectModelFactoryImpl.create(SelectModelFactoryImpl.java:55) org.tynamo.examples.pphl.pages.Query.setupRender(Query.java:200) org.tynamo.examples.pphl.pages.Query.advised$setupRender_844d26137ccc(Query.java) org.tynamo.examples.pphl.pages.Query$Invocation_setupRender_844d26137ccb.proceedToAdvisedMethod(Unknown Source) org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84) org.got5.tapestry5.jquery.services.ImportJQueryUIWorker$2.advise(ImportJQueryUIWorker.java:94) org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86) org.tynamo.examples.pphl.pages.Query.setupRender(Query.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174) org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133) org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181) org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72) org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124) org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
RE: how to use HibernateEntityValueEncoder
Here is the tml tr align=left td align=center select t:type=Select t:id=yearSelect t:clientId=yearSelect id=yearSelect t:model=prop:yearSelectModel t:encoder=prop:yearValueEncoder t:value=prop:year blankOption=never / /td How do I know which valuencoder its using? Why the NPE ?
RE: how to use HibernateEntityValueEncoder
whats so bad about a year class ? @Entity @ClassDescriptor(hasCyclicRelationships = true, nonVisual = false) public class Year implements Cloneable, Serializable { private static final Log log = LogFactory.getLog(Year.class); private Integer id = null; private Integer yearStart = new Integer(0); private Integer yearEnd = new Integer(0); private League league = null; private Long created = new Long(GregorianCalendar.getInstance() .getTimeInMillis()); private Long accessed = new Long(GregorianCalendar.getInstance() .getTimeInMillis()); /** * CTOR */ public Year() { } public Year(Year dto) { try { BeanUtils.copyProperties(this, dto); } catch (Exception e) { log.error(e.toString()); e.printStackTrace(); } } /** * Accessor for id * * @return Integer * @hibernate.id generator-class=increment unsaved-value=-1 * type=java.lang.Integer unique=true insert=true */ @Id @GeneratedValue(strategy = GenerationType.AUTO) @PropertyDescriptor(readOnly = true) public Integer getId() { return id; } @PropertyDescriptor public Integer getYearStart() { return yearStart; } @PropertyDescriptor public Integer getYearEnd() { return yearEnd; } @ManyToOne public League getLeague() { return league; } @PropertyDescriptor(nonVisual = true, searchable = false) public Long getCreated() { return created; } @PropertyDescriptor(nonVisual = true, searchable = false) public Long getAccessed() { return accessed; } @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public String getCreatedAsString() { Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(created.longValue()); return DatePattern.sdf.format(cal.getTime()); } @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public String getAccessedAsString() { Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(accessed.longValue()); return DatePattern.sdf.format(cal.getTime()); } public void setId(Integer id) { this.id = id; } public void setYearStart(Integer yearStart) { this.yearStart = yearStart; } public void setYearEnd(Integer yearEnd) { this.yearEnd = yearEnd; } public void setLeague(League league) { this.league = league; } @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public void setCreatedAsString(String value) throws Exception { Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(DatePattern.sdf.parse(value).getTime()); this.created = new Long(cal.getTimeInMillis()); } @Transient @PropertyDescriptor(nonVisual = true, searchable = false) public void setAccessedAsString(String value) throws Exception { Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(DatePattern.sdf.parse(value).getTime()); this.accessed = new Long(cal.getTimeInMillis()); } public void setAccessed(Long accessed) { this.accessed = accessed; } public void setCreated(Long created) { this.created = created; } @Override public int hashCode() { return (getId() != null ? getId().hashCode() : 0); } @Override public Year clone() { return new Year(this); } /** * equals and hashCode need to be hammered out for hibernate to work * properly * * Check the matrix summary for best practices at * http://www.hibernate.org/109.html */ @Override public boolean equals(Object rhs) { if (this == rhs) return true; // instance equality if (rhs == null || getClass() != rhs.getClass()) return false; // null/class equality final Year castedObject = (Year) rhs; return !(getId() != null ? !getId().equals(castedObject.getId()) : castedObject.getId() != null); } public String toString() { return getYearStart().toString() + / + getYearEnd().toString(); } }
RE: how to use HibernateEntityValueEncoder
Hi Thiago, Here is the console... after I induce the NPE. 2013-05-13 16:11:14.622:INFO:oejs.Server:jetty-7.6.0.v20120127 2013-05-13 16:11:22.970:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one. 2013-05-13 16:11:23.424:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/C:/Prototype/Mavenized/Product/tynamo/trunk/tynamo-examples/pphl/src/main/webapp/},file:/C:/Prototype/Mavenized/Product/tynamo/trunk/tynamo-examples/pphl/src/main/webapp/ 2013-05-13 16:11:29.726:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080 [INFO] Started Jetty Server 127.0.0.1 - - [13/May/2013:20:11:34 +] GET /pphl/login HTTP/1.1 200 3301 - Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/core/default.css HTTP/1.1 200 2089 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/kawwa2_asset/css/k-structure.css HTTP/1.1 200 990 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/core/tree.css HTTP/1.1 200 570 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/core/t5-alerts.css HTTP/1.1 200 386 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/core/tapestry-console.css HTTP/1.1 200 322 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/jquery/form.css HTTP/1.1 200 77 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/kawwa2_asset/css/library.css HTTP/1.1 200 137 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/facebook/components/fb-button.css HTTP/1.1 200 1395 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/tap-jquery/tapestry.js HTTP/1.1 200 1739 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/openid-0.2.1-SNAPSHOT-1367865189000/components/button.css HTTP/1.1 200 1429 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/jquery/ui_1_8_24/jquery.ui.widget.js HTTP/1.1 200 2344 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/jquery/ui_1_8_24/jquery.ui.core.js HTTP/1.1 200 3439 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/jquery/ui_1_8_24/jquery.ui.position.js HTTP/1.1 200 2772 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/jquery/jquery.effects.show.js HTTP/1.1 200 105 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/jquery/ui_1_8_24/jquery.effects.highlight.js HTTP/1.1 200 608 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/jquery/jquery.json-2.2.js HTTP/1.1 200 1930 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET /assets/1.0-SNAPSHOT-1368475842243/jquery/ui_1_8_24/jquery.effects.core.js HTTP/1.1 200 5436 http://localhost:8080/pphl/login; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 127.0.0.1 - - [13/May/2013:20:11:38 +] GET
RE: how to use HibernateEntityValueEncoder
Thanks Jens... I just stepped thru debugger... @SetupRender void setupRender() { grid.reset(); years = new ArrayList(TynamoUTIL.loadCollection(hibernatePersistenceService, Year.class)); yearValueEncoder = new EnumValueEncoder(typeCoercer, Year.class); this is what the debugger shows for my years collection after loadCollection gets called. [2012/2013] Thats an entity... Year.class... the toString method So the collection is populating properly. Its stored with standard hibernate Integer id. Kinda blue in the face... kinda
RE: how to use HibernateEntityValueEncoder
Ooops... this is the code I am exercising... @Persist @Property private EnumValueEncoder yearValueEncoder; @Inject @Property private TypeCoercer typeCoercer; @Inject private SelectModelFactory selectModelFactory; @Property private SelectModel yearSelectModel; @Property @Persist(PersistenceConstants.FLASH) private Year year; @SetupRender void setupRender() { grid.reset(); years = new ArrayList(TynamoUTIL.loadCollection(hibernatePersistenceService, Year.class)); yearValueEncoder = new EnumValueEncoder(typeCoercer, Year.class); yearSelectModel = selectModelFactory.create(years, year);
RE: how to use HibernateEntityValueEncoder
Thanks Jens... I believe I posted the Year.class for Thiago the primary keye is just ID Is this a bug ? I would like to get into the create routine for the factory but dont know how
RE: how to use HibernateEntityValueEncoder
its obviously happening on the valueencoder final PropertyAdapter propertyAdapter = classPropertyAdapter.getPropertyAdapter(labelProperty);5455final ValueEncoder encoder = this.valueEncoderSource.getValueEncoder(propertyAdapter.getType());56 I changed the property method to toString() and it still fails with NPE
RE: div block ID name collisions with 3rd party libraries
Thanks Lance, Thats helpful information. I have a case where explicit raw usage of those ID's header, nav, main... are being used right within a CSS file or even in explicit style . So my layout is being blown off the map... (oops page). I still am wondering what solution I should impose. Thanks Ken
RE: div block ID name collisions with 3rd party libraries
Thanks Lance, These options are all great... helpful. I am interfacing with the author and trying to communicate what I have identified is a show stopper for the users of their library. I think some rules of thumb need to be agreed upon especially with regard to owness. So it should really be up to the component library author to self contain and secure it's library from coming apart at the seams no matter who's camp it lands in. Any best practice recommendations for component library developers would be helpful. It seems like a wide open issue. I wonder if tapestry recommends or advises special attention to this. But you have been a tremendous help so far. Thanks I am in a holding pattern wondering whether I should modify my webapp code or wait til something changes for the component library author. - cheers Ken
logout taking me to home instead of login
Hi Folks, I believe my webapp is wired up properly. But not so when I click logout link. Here is my logout link handler. @InjectPage(Login) private Login loginPage; Object onActionFromTynamoLogoutLink() { // Need to call this explicitly to invoke onlogout handlers (for // remember me etc.) SecurityUtils.getSubject().logout(); try { // the session is already invalidated, but need to cause an // exception since tapestry doesn't know about it // and you'll get a container exception message instead without // this. Unfortunately, there's no way of // configuring Shiro to not invalidate sessions right now. See // DefaultSecurityManager.logout() // There's a similar issues in Tapestry - Howard has fixed, but no // in T5.2.x releases yet request.getSession(false).invalidate(); } catch (Exception e) { } return loginPage; } I have yet to see it take me to Login on clicking my logout link on my home page. USE CASE: So... if while the app is up and running at Home page... I click logout link, it takes me to Home page and I get NPE for referring to what become null structures in my home template. USE CASE: But... if while the app is up and running at Home page... I click the URL http://localhost:9011/pphl/login i am brought to login page in its inverted form which shows the same logout link t:actionlink t:id=tynamoLogoutLinkLogout/t:actionlink and when I click that same structured link as the same one in my home page, this one takes me back to the login page like its suppose to. I have these configured configuration.add(SecuritySymbols.LOGIN_URL, / + PATH_PREFIX + /login); configuration.add(SecuritySymbols.SUCCESS_URL, /home); configuration.add(SecuritySymbols.UNAUTHORIZED_URL, / + PATH_PREFIX + /unauthorized); Is there a deficiency in tapestry preventing me from gracefully operating the first USE CASE ? Thanks for any tips. Ken
RE: logout taking me to home instead of login
The logout handlers are virtually identical for HOME and LOGIN pages Here is the HOME one... http://localhost:9011/pphl/home.layout.loginlink.tynamologoutlink Here is the LOGIN one for the URL on my browser bar http://localhost:9011/pphl/login.tynamologoutlink Can anyone explain why the HOME link keeps bringing me home instead of back to LOGIN ? Thank You
RE: logout taking me to home instead of login
George, Thanks friend... that worked terrific. I used both annotations @RequiresAuthentication @RequiresUser
div block ID name collisions with 3rd party libraries
Folks, I am operating a tapestry web app. I have my own web app specific layout which defines a myriad of DIV blocks that use ID for header, content, page, main, etc and I operate these ID definitions heavily within my own CSS. But then along comes a third party library that promotes usage of their component implementations. But I dont know what they are operating for DIV block ID names. I guess I was able to get the source code I could see. Lets just say a component library decides to release a dozen components while operating DIV blocks and coincidentally decides to use the ID's for the DIV's header, content, page, main, etc and they also decide to operate these ID definitions heavily within their own CSS. Is there going to be a problem here ? Specifically collision ? Can anyone comment on this ? Should web app developers be appending the two letters My in front of their DIV block ID's if such a component library existed and does operate ID's for the DIV's header, content, page, main, etc and they also decide to operate these ID definitions heavily within their own CSS. Thanks for your input to this subject
Re: kawwa tapestry component NPE
If the kawwa folks could work on stabilizing their release and deploy somethign that can be predictably built that woujld be nice. it would gain me alot of sleep time I have reverted to several revisions and cannot get past this build problem. but the crash remains persistent. i dont know what works and trying to commit to this tapestry library without any response from the support developing it ??? some help would be appreciated. [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for net.atos.tapestry:tapestry5-kawwa-components:jar:2.0.4-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 42, column 21 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 89, column 21 [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 kawwaportal-components 2.0.4-SNAPSHOT [INFO] [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ tapestry5-kawwa-components --- [INFO] Deleting C:\Prototype\Mavenized\Product\kawwa\trunk\kawwa2-tapestry\target [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ tapestry5-kawwa-components --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 390 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ tapestry5-kawwa-components --- [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Compiling 68 source files to C:\Prototype\Mavenized\Product\kawwa\trunk\kawwa2-tapestry\target\classes [INFO] [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ tapestry5-kawwa-components --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 36 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ tapestry5-kawwa-components --- [INFO] Not compiling test sources [INFO] [INFO] --- maven-surefire-plugin:2.8.1:test (default-test) @ tapestry5-kawwa-components --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ tapestry5-kawwa-components --- [INFO] Building jar: C:\Prototype\Mavenized\Product\kawwa\trunk\kawwa2-tapestry\target\kawwaportal-components.jar [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ tapestry5-kawwa-components --- [INFO] Installing C:\Prototype\Mavenized\Product\kawwa\trunk\kawwa2-tapestry\target\kawwaportal-components.jar to C:\apache-tomcat-6.0.26\webapps\m2.repository\net\atos\t apestry\tapestry5-kawwa-components\2.0.4-SNAPSHOT\tapestry5-kawwa-components-2.0.4-SNAPSHOT.jar [INFO] Installing C:\Prototype\Mavenized\Product\kawwa\trunk\kawwa2-tapestry\pom.xml to C:\apache-tomcat-6.0.26\webapps\m2.repository\net\atos\tapestry\tapestry5-kawwa-co mponents\2.0.4-SNAPSHOT\tapestry5-kawwa-components-2.0.4-SNAPSHOT.pom [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 5.257s [INFO] Finished at: Sun Apr 21 04:02:30 EDT 2013 [INFO] Final Memory: 9M/23M [INFO] [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for net.atos:kawwa2:war:1.0.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 75, 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 Kawwa2 Portal 1.0.0 [INFO] Downloading: http://repository.atosworldline.com/nexus/content/groups/public/org/got5/tapestry5-jquery/3.3.6-SNAPSHOT/maven-metadata.xml Downloading: http://repository.atosworldline.com/nexus/content/groups/public-snapshots/org/got5/tapestry5-jquery/3.3.6-SNAPSHOT/maven-metadata.xml [WARNING] Could not transfer metadata org.got5:tapestry5-jquery:3.3.6-SNAPSHOT/maven-metadata.xml from/to XA Repository
RE: kawwa tapestry component NPE
with the advertuisements to use their libratry are they aware anyone is even attempting to use it? I have been frustratingly watchign this library limping along for the past month they obviously tried to refactor the AppModule and left a train wreck in its wake but it hasnt been working properly for a month and its been guess work now I am diverted trying to soklve KAWWA instead of working on my own code can you guys tighten this stuff up ? ??? [INFO] - [ERROR] COMPILATION ERROR : [INFO] - [ERROR] \Prototype\Mavenized\Product\kawwa\trunk\Portal\src\main\java\awl\frontsolutions\services\AtosModule.java:[16,33] cannot find symbol symbol : class AtosServiceImpl location: class awl.frontsolutions.services.atos.AtosModule [ERROR] \Prototype\Mavenized\Product\kawwa\trunk\Portal\src\main\java\awl\frontsolutions\services\AtosModule.java:[17,38] cannot find symbol symbol : class AtosAuthentificationImpl location: class awl.frontsolutions.services.atos.AtosModule [ERROR] \Prototype\Mavenized\Product\kawwa\trunk\Portal\src\main\java\awl\frontsolutions\services\AtosModule.java:[18,33] cannot find symbol symbol : class AtosMailImpl location: class awl.frontsolutions.services.atos.AtosModule [INFO] 3 errors [INFO] - [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 2.449s [INFO] Finished at: Sun Apr 21 04:09:19 EDT 2013 [INFO] Final Memory: 9M/24M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project kawwa2: Compilation failure: I had to copy in the AtosModule only to find out it depends on more fix the build please manuelle THANK YOU
RE: kawwa tapestry component NPE
manuel I reverted to rev 80 and I still receive this build error [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 2.777s [INFO] Finished at: Sun Apr 21 04:15:32 EDT 2013 [INFO] Final Memory: 9M/24M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project kawwa2: Compilation failure: Compilation failure: [ERROR] \Prototype\Mavenized\Product\kawwa\trunk\Portal\src\main\java\awl\frontsolutions\services\AppModule.java:[33,39] package awl.frontsolutions.services.atos does not exist [ERROR] \Prototype\Mavenized\Product\kawwa\trunk\Portal\src\main\java\awl\frontsolutions\services\AppModule.java:[48,11] cannot find symbol [ERROR] symbol: class AtosModule [ERROR] @SubModule(AtosModule.class) [ERROR] - [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/MojoFailureException [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for net.atos.tapestry:Kawwa2:pom:1.0.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 11, column 29 [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. can you please advise a build revision to operate? or where to get a stable release ? I asked for help before but I was ignored... I did use the support email. About a month ago. Thanks
RE: kawwa tapestry component NPE
Folks, I am just plagued with this library. All I am asking for is a simple tab component and a menu. But this kawwa keeps jamming the round head image advertisement guy with a neck tie all over the front of the app. ATOS WORLDWIDE If they want money I will pay for it. I just want it to work. The checkout from their tree wont build properly and the source is unstable. Can the kawwa folks please declare what they have here ? Is it for public consumption? Why havent they been able to respond to me when I sent email. ?? Should I be committing to this component library ? Can anyone suggest something else ? I have had re-checked out the source code to this and re-deleted and rebuilt my local repo over til i am blue in the face. This code base has serious problems. It would be fair if the developers would respond. I am available anytime to engage kcola...@gmail.com Thanks
RE: kawwa tapestry component NPE
This download into my repo is whats plaguing the usage of this library. I have snapshots turned off. If anyone using this tapestry library can explain I would be greatful I dont know why this is overriding my build and interfering with development. its been happening for a month now and I am receiving all kinds of unstable checkins into my runtime I would hate to think this is a production issue when something is released [INFO] Downloading: http://nexus.codehaus.org/snapshots/net/atos/tapestry/tapestry5-kawwa-components/2.0.4-SNAPSHOT/maven-metadata.xml Downloading: http://nexus.devlab722.net/nexus/content/repositories/snapshots/net/atos/tapestry/tapestry5-kawwa-components/2.0.4-SNAPSHOT/maven-metadata.xml Downloaded: http://nexus.devlab722.net/nexus/content/repositories/snapshots/net/atos/tapestry/tapestry5-kawwa-components/2.0.4-SNAPSHOT/maven-metadata.xml (796 B at 1.8 K B/sec) Downloading: http://nexus.devlab722.net/nexus/content/repositories/snapshots/net/atos/tapestry/tapestry5-kawwa-components/2.0.4-SNAPSHOT/tapestry5-kawwa-components-2.0.4- 20130416.073342-48.pom Downloaded: http://nexus.devlab722.net/nexus/content/repositories/snapshots/net/atos/tapestry/tapestry5-kawwa-components/2.0.4-SNAPSHOT/tapestry5-kawwa-components-2.0.4-2 0130416.073342-48.pom (6 KB at 16.4 KB/sec) Downloading: http://nexus.devlab722.net/nexus/content/repositories/snapshots/net/atos/tapestry/tapestry5-kawwa-components/2.0.4-SNAPSHOT/tapestry5-kawwa-components-2.0.4- 20130416.073342-48.jar Downloaded: http://nexus.devlab722.net/nexus/content/repositories/snapshots/net/atos/tapestry/tapestry5-kawwa-components/2.0.4-SNAPSHOT/tapestry5-kawwa-components-2.0.4-2 0130416.073342-48.jar (2216 KB at 510.9 KB/sec) [INFO]
RE: kawwa tapestry component NPE
there isn't even a 2.0.3 release everything is hardwired to 2.0.4 but its all snapshots and if I look at their releases repository its empty ???
RE: kawwa tapestry component NPE
Manuelle... will you please email me stable binaries please ? And a support email address that I can get a response from? Thank You kcola...@gmail.com
RE: kawwa tapestry component NPE
Why is KAWWA cluttering up the front page of my web app when I try to use one simple component ? Why are you advertising and requested me to use you r tapestry library and forcing my webapp to display your images all over the front of the page ? I asked this before and you refuse to respond. Is this some kind of joke? Does it occur to you I am up at 5am dealing with this ? The code base and release of tapestry5-kawwa-components-2.0.4-SNAPSHOT remains unstable off yoru repo and even if I checkout the sources and revert to some early release. Its broken Can you please help fix ?
RE: kawwa tapestry component NPE
The stack trace I originally posted takes down the tapestry app and breaks it by refusing to render properly within its service.
RE: kawwa tapestry component NPE
Thanks Emmanual... Ok no rush... I dont have a corporate comercial release due like monday or anything. I just felt cornered at 4am wrestling with this and blew a gasket. But I would like to resolve asap. 1. There is legit crash... my first post. 2. And I want to see about what I need to check out or refer to to keep a stable release. Thanks for your fast response. And I will use your email from here on out. Sorry to the tap list. - cheers Ken
tap5 with jquery - tab component
Folks, Has anyone used this ? How is it? Does it retain state across tabs? meaning... if I render tab3 with a list and hit my HOME link... will this tab retain the tabbed tab state? Instead of jumping back to tab 0 ? Thanks Ken
RE: tap5 with jquery - tab component
ooops here is the link. http://tapestry5-jquery.com/components/docsjquerytabs I am wondering if there is a similar menubar component. Could this be the upcoming menubar widget? for this library ? http://wiki.jqueryui.com/w/page/38666403/Menubar If so i think I might want to pilot its use.
kawwa tapestry component NPE
Is it ok to ask for help on this forum for this tapestry library? I have asked before from the authors without any luck. I am currently experiencing a ramdom NPE from their component. An unexpected application exception has occurred.java.lang.NullPointerExceptionFilter stack frames Stack trace net.atos.kawwaportal.components.services.KawwaPortalComponentsModule$2.renderMarkup(KawwaPortalComponentsModule.java:102) org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47) org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67) org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64) org.apache.tapestry5.services.TapestryModule$38.handle(TapestryModule.java:) org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) org.tynamo.security.SecurityComponentRequestFilter.handlePageRender(SecurityComponentRequestFilter.java:49) org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95) org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119) org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:27) org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:55) org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:53) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380) org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:53) org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852) org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
BIRT integration
Folks, Is there a doc or tech help on how to integrate BIRT into my tapestry app? Thanks in advance. I havent found anything. - cheers Ken
RE: grid exception - not sure if bug or not
Here is the grid usage... I have two entities in the database and its failing on the third row iteration when getting row values someone is passing in a bad endIndex kawwa, tapestry or tynamo... not sure But I will keep looking package org.tynamo; import org.apache.tapestry5.grid.GridDataSource; import org.apache.tapestry5.grid.SortConstraint; import org.tynamo.services.PersistenceService; import java.util.List; /** * A simple implementation of {@link org.apache.tapestry5.grid.GridDataSource} based on a Tynamo PersistenceService and a known * entity class. This implementation does support multiple {@link org.apache.tapestry5.grid.SortConstraint sort * constraints}; however it assumes a direct mapping from sort constraint property to Hibernate property. * p/ * This class is emnot/em thread-safe; it maintains internal state. * p/ * Typically, an instance of this object is created fresh as needed (that is, it is not stored between requests). */ public class TynamoGridDataSource implements GridDataSource { private final PersistenceService persistenceService; private final Class entityType; private int startIndex; private List preparedResults; public TynamoGridDataSource(PersistenceService persistenceService, Class entityType) { this.persistenceService = persistenceService; this.entityType = entityType; } /** * Returns the total number of rows for the configured entity type. */ public int getAvailableRows() { return persistenceService.count(entityType); } /** * Prepares the results, performing a query (applying the sort results, and the provided start and end index). The * results can later be obtained from {@link #getRowValue(int)} }. * * @param startIndex index, from zero, of the first item to be retrieved * @param endIndexindex, from zero, of the last item to be retrieved * @param sortConstraints zero or more constraints used to set the order of the returned values */ public void prepare(int startIndex, int endIndex, ListSortConstraint sortConstraints) { this.startIndex = startIndex; preparedResults = persistenceService.getInstances(entityType, startIndex, (endIndex - startIndex) + 1); } /** * Returns a row value at the given index (which must be within the range defined by the call to {@link * #prepare(int, int, java.util.List)} ). * * @param index of object * @return object at that index */ public Object getRowValue(int index) { return preparedResults.get(index - startIndex); } /** * Returns the entity type, as provided via the constructor. */ public Class getRowType() { return entityType; } }
RE: grid exception - not sure if bug or not
My prepared list is counting two but returning 1 and the other null when getInstances is called So it is looking more like ... well not sure yet public void prepare(int startIndex, int endIndex, ListSortConstraint sortConstraints) { this.startIndex = startIndex; preparedResults = persistenceService.getInstances(entityType, startIndex, (endIndex - startIndex) + 1); } public Object getRowValue(int index) { return preparedResults.get(index - startIndex); }
tapestry method exception
Folks, I am trying to seed my database with two default standard entities. is there a reason why tapestry wont allow me to catch this exception ? Its really annoying. that I have to comment out and uncomment the code just to get my databse seeded properly. I thought catchign the exception would be sufficient to continue... though I feel its a substabntive hack,... i got no other choice. AppModule.JAVA public static void contributeSeedEntity(OrderedConfigurationObject configuration) { /**/ try { PersonBuilder pb = new PersonBuilder(); Person administrator = pb.build(); administrator.setUsername(Person.Role.administrator.toString()); administrator.setPassword(Person.Role.administrator.toString()); SetPerson.Role roles = new HashSetPerson.Role(); roles.add(Person.Role.administrator); SetPerson.Permission perms = new HashSetPerson.Permission(); perms.add(Person.Permission.create); perms.add(Person.Permission.read); perms.add(Person.Permission.update); perms.add(Person.Permission.delete); administrator.setPermissions(perms); configuration.add(administrator, administrator); AdminLayoutBuilder alb = new AdminLayoutBuilder(); AdminLayout al = alb.build(); configuration.add(adminlayout, al); } catch (Exception e) { } } left outer join UploadableMedia uploadable5_ on this_.splash_id=uploadable5_.id where ( 1=1 ) 2013-03-29 15:50:11.984:WARN::failed app: java.lang.RuntimeException: Exception constructing service 'SeedEntity': Error invoking constructor public org.tynamo.seedentity.hibernate.services.SeedEntityImpl(org.slf4j.Logger,org.apache.tapestry5.hibernate.HibernateSessionSource,java.util.List): a different object with the same identifier value was already associated with the session: [org.tynamo.examples.pphl.model.AdminLayout#1] 2013-03-29 15:50:11.984:WARN::Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@167e003{/,C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp} java.lang.RuntimeException: Exception constructing service 'SeedEntity': Error invoking constructor public org.tynamo.seedentity.hibernate.services.SeedEntityImpl(org.slf4j.Logger,org.apache.tapestry5.hibernate.HibernateSessionSource,java.util.List): a different object with the same identifier value was already associated with the session: [org.tynamo.examples.pphl.model.AdminLayout#1] at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:54)
RE: tapestry method exception
Ok the catch block is vestigial since the exception is thrown after the method is processed... not during... So back to commenting out the code to seed my database. Does anyone have any ideas? I cant invoke a hibernate session here due to separation of concerns. Thanks
RE: grid exception - not sure if bug or not
Folks, This is fixed... I was specifying bogus schema on my collection methods in my person object. False alarm... - cheers