Re: How to stay on same page

2013-05-13 Thread mailingl...@j-b-s.de
Hi Ken! Can you paste your onPassivate method? Maybe you always return Team.class as context parameter instead of beanType member? I expect you want to see the selection in the URL like: query/team right? Than you need an proper on activate, too. So if you use your enum ReportType in

how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
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: Tapestry Hibernate Session usage

2013-05-13 Thread Dmitry Gusev
On Mon, May 13, 2013 at 2:59 AM, Boris Horvat horvat.z.bo...@gmail.comwrote: Hi all, Hi! I have a question about what should be the best way to use hibernate session in tapestry. My environment consists of 2 layers (relevant to this). The first one would be a group of classes that

Re: hover pop show image widget

2013-05-13 Thread mailingl...@j-b-s.de
Hi Ken! I use bootstrap / tapestry-jquery for this. See: http://tapestry5-jquery.com/mixins/docstooltip Sent from my iPhone On 13.05.2013, at 04:29, nhhockeyplayer nashua nhhockeypla...@hotmail.com wrote: Hi Folks, Is there a hover show widget? Something like what netflix does when you

Strategy for dealing with stale sessions?

2013-05-13 Thread Ben Titmarsh
My application is heavily dependent on state using @Persist annotations. If a user gets the application into a certain state, then their session becomes stale (i.e. they leave their computer for half an hour), what is the preferred approach for graceful recovery of the application now that the

Re: how to use HibernateEntityValueEncoder

2013-05-13 Thread Thiago H de Paula Figueiredo
On Mon, 13 May 2013 04:44:36 -0300, Ken in Nashua kcola...@live.com wrote: Hi Folks, Hi! 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

Re: how to use HibernateEntityValueEncoder

2013-05-13 Thread Taha Hafeez Siddiqi
In case you exclusively want to get the encoder, you can inject ComponentDefaultProvider and then use http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ComponentDefaultProvider.html#defaultValueEncoder(java.lang.String, org.apache.tapestry5.ComponentResources) regards

Re: How do you remove link Parameters generically?

2013-05-13 Thread Alejandro Scandroli
Hi Barry I've been using a different workaround for this and maybe it could help you. You can listen for the DECORATE_PAGE_RENDER_LINK and then decorate the link as you want. Add something like this to your page. @OnEvent(EventConstants.DECORATE_PAGE_RENDER_LINK) void decoratePageRenderLink(Link

Re: How do you remove link Parameters generically?

2013-05-13 Thread Barry Books
Thanks, That does exactly what I needed. It appears to be called before the new parameters are added so it lets you remove the defaults. On Mon, May 13, 2013 at 7:27 AM, Alejandro Scandroli alejandroscandr...@gmail.com wrote: Hi Barry I've been using a different workaround for this and

Re: Strategy for dealing with stale sessions?

2013-05-13 Thread Michael Prescott
I think this is an application-specific question. When the application server's underlying session expires, all your @Persisted fields become null, as you say. If the user continues, it's just as if a random, unknown user arrived and attempted to start interacting with your application somewhere

Re: Strategy for dealing with stale sessions?

2013-05-13 Thread Lenny Primak
FlowLogix library handles this generically by reloading the page if session expired. Take a look specifically at @AJAX annotation. http://code.google.com/p/flowlogix/wiki/TapestryLibrary http://code.google.com/p/flowlogix/wiki/TLAJAXAnnotation On May 13, 2013, at 6:24 AM, Ben Titmarsh

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
thanks guys... but I keep gettign an NPE @Persist @Property HibernateEntityValueEncoderYear yearValueEncoder; @Inject private ValueEncoderSource valueEncoderSource; @Inject private SelectModelFactory selectModelFactory; private ArrayList years;

RE: How to stay on same page

2013-05-13 Thread nhhockeyplayer nashua
Thnanks jens Here is my passivate @OnEvent(EventConstants.PASSIVATE) Object[] passivate() {return new Object[] { beanType }; } but I toggle it when I hit submit @OnEvent(value = go) public Object submit() { logger.debug(In submit : ); switch (reportType) { case TEAM:

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
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

Re: how to use HibernateEntityValueEncoder

2013-05-13 Thread Thiago H de Paula Figueiredo
Please copy stack traces from the console, not the error page. On Mon, 13 May 2013 16:00:50 -0300, Ken in Nashua kcola...@live.com wrote: thanks guys... but I keep gettign an NPE @Persist @Property HibernateEntityValueEncoderYear yearValueEncoder; @Inject private

Re: how to use HibernateEntityValueEncoder

2013-05-13 Thread Thiago H de Paula Figueiredo
By the way, do you really have an Year class? Why? On Mon, 13 May 2013 16:00:50 -0300, Ken in Nashua kcola...@live.com wrote: thanks guys... but I keep gettign an NPE @Persist @Property HibernateEntityValueEncoderYear yearValueEncoder; @Inject private

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
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 =

Re: Tapestry Hibernate Session usage

2013-05-13 Thread Boris Horvat
Hi Dmitry Please ignore the naming as I haven't really user he real names here as this is just an example (the project also has nothing to do with Students but it is easier for the explanations :) ). In all fairness though I do prefer to append DAOService in front as it allows me to search for

Re: how to use HibernateEntityValueEncoder

2013-05-13 Thread mailingl...@j-b-s.de
Hi Ken! Just a shot in the dark: Are you sure the PKs of your hibernate beans are not null (maybe you have a newly created bean instance which is not persited yet)? Afair the HibernateValueEncoder requires properly filled PK fields otherwise pk.toString() fails. Unfortunately the stacktrace

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
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

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
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);

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
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

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
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

2013-05-13 Thread Thiago H de Paula Figueiredo
On Mon, 13 May 2013 17:15:05 -0300, Ken in Nashua kcola...@live.com wrote: Hi Thiago, Here is the console... after I induce the NPE. It doesn't contain the stack trace, so it's completely useless. -- Thiago H. de Paula Figueiredo

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
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

RE: Strategy for dealing with stale sessions?

2013-05-13 Thread Ben Titmarsh
Lenny, George, Thanks for the replies. I actually left a somewhat crucial piece of information out of my initial post in that I am talking specifically about Ajax! So Lenny this library looks fantastic, exactly what I was looking for! CC: users@tapestry.apache.org From:

Re: how to use HibernateEntityValueEncoder

2013-05-13 Thread Jens Breitenstein
Hi Ken, please paste the whole Bean class, too. I got an NPE in the past due to an leading underscore in my pk member name. _pk -- NPE pk -- works fine. Guess this is a bug, because Tapestry in general is happy with _ when accessing properties. Jens Am 13.05.13 23:26, schrieb Ken in