Re: [T5.1] @SessionState an generic pages

2009-06-24 Thread Piero Sartini
> protected Class getValueClass() > { > return (Class) ((ParameterizedType) > getClass().getGenericSuperclass()).getActualTypeArguments()[0]; } > > I use something similar in DAOs, idea came from here: > https://www.hibernate.org/328.html Thanks!! Had an abstract getEntityClass() method for

Re: Re: [T5.1] @SessionState an generic pages

2009-06-23 Thread Thiago H. de Paula Figueiredo
Em Tue, 23 Jun 2009 17:32:25 -0300, nille hammer escreveu: Hi Thiago, Hi Nille! Hi Hammer! :) Friends call me nille. Just joking. :P Hey! That's my open source code being used by someone besides me! Nice. :D Just trying to learn from the masters ;-) I'm not a master, just someone

Re: Re: Re: [T5.1] @SessionState an generic pages

2009-06-23 Thread nille hammer
Hi Martin, thanks for the hint. > > protected Class getValueClass() > { > return (Class) ((ParameterizedType) > getClass().getGenericSuperclass()).getActualTypeArguments()[0]; > } > > > I use something similar in DAOs, idea came from here: > https://www.hibernate.org/328.html Similar to t

Re: Re: [T5.1] @SessionState an generic pages

2009-06-23 Thread Martin Strand
On Tue, 23 Jun 2009 22:32:25 +0200, nille hammer wrote: > That's the trick! Thinking about your hint I rewrote GenericEntityPage a > bit. Code follows: > > /** >* @return the page to be forwarded to in case value does not exist as > SSO >*/ > protected abstract Obje

Re: Re: [T5.1] @SessionState an generic pages

2009-06-23 Thread nille hammer
Hi Thiago, > Hi Hammer! :) Friends call me nille. > Hey! That's my open source code being used by someone besides me! Nice. :D Just trying to learn from the masters ;-) > .Maybe the solution to what you want to do is to use > ApplicationStateManager directly. That's the trick! Thinking about y

Re: [T5.1] @SessionState an generic pages

2009-06-22 Thread Thiago H. de Paula Figueiredo
Em Mon, 22 Jun 2009 19:08:40 -0300, nille hammer escreveu: Hi List, Hi Hammer! :) @SessionState private T value; @SessionState is handled by ApplicationStateManager per type, so I guess that it looked at your field and saw an Object. I have looked for inspiration on ars-mach

[T5.1] @SessionState an generic pages

2009-06-22 Thread nille hammer
Hi List, in many of my pages I find myself doing similar things. I collect data with a form and store it in a SessionState field. Then i forward to a summary page. In onActivate of summary page check for existence of SessionState value whith boolean valueExists. If value exists I show the summa