RE: how to use HibernateEntityValueEncoder

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

RE: how to use HibernateEntityValueEncoder

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

Re: how to use HibernateEntityValueEncoder

2013-05-16 Thread Thiago H de Paula Figueiredo
On Thu, 16 May 2013 15:55:39 -0300, Ken in Nashua wrote: 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. Just i

RE: how to use HibernateEntityValueEncoder

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

RE: how to use HibernateEntityValueEncoder

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

Re: how to use HibernateEntityValueEncoder

2013-05-15 Thread Thiago H de Paula Figueiredo
On Tue, 14 May 2013 23:39:46 -0300, Ken in Nashua wrote: tapestry cannot articulate the labelProperty I specified "toString" Of course Tapestry cannot find the toString property. As Joakim said, toString() is not a property. It's a method, but not a property. Properties are defined by g

Re: how to use HibernateEntityValueEncoder

2013-05-14 Thread Joakim Olsson
What if you add a getDisplayString-method that just do return toString() and change to displayString as property instead. toString does not follow the bean property naming standard get/set/is. /Joakim On Wed, May 15, 2013 at 4:39 AM, Ken in Nashua wrote: > Thanks Thiago... trust me I would se

RE: how to use HibernateEntityValueEncoder

2013-05-14 Thread Ken in Nashua
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.NullPoi

Re: how to use HibernateEntityValueEncoder

2013-05-14 Thread Thiago H de Paula Figueiredo
What could really help us in helping you was if you told us in which line the NPE happens. It's really quite hard to help you sometimes. You post a lot of messages and still doesn't provide us the information needed to help you. :( On Tue, 14 May 2013 09:15:16 -0300, Ken in Nashua wrote:

RE: how to use HibernateEntityValueEncoder

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

RE: how to use HibernateEntityValueEncoder

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

RE: how to use HibernateEntityValueEncoder

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

RE: how to use HibernateEntityValueEncoder

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

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

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 metho

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 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 - To uns

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 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 yearSelectM

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); t

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 16:11:23.424:INFO:oejsh.Conte

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 i

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 = new

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 wrote: thanks guys... but I keep gettign an NPE @Persist @Property HibernateEntityValueEncoder yearValueEncoder; @Inject private ValueEncoderSource valueEncoderSource;

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 wrote: thanks guys... but I keep gettign an NPE @Persist @Property HibernateEntityValueEncoder yearValueEncoder; @Inject private ValueEncoderSource valueEnc

RE: how to use HibernateEntityValueEncoder

2013-05-13 Thread Ken in Nashua
Here is the tml How do I know which valuencoder its using? Why the NPE ?

RE: how to use HibernateEntityValueEncoder

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

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 Tah

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 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 strings. HibernateEnt