Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-02 Thread Richard Hill
Yes. query the db for the id that has been created. On Wed, 2011-03-02 at 03:49 -0800, robnangle wrote: > Is it because when a new user registers there user id is set by the database > and not the java class? If so is there any way of solving the problem? > > -- > View this message in context:

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-02 Thread robnangle
Is it because when a new user registers there user id is set by the database and not the java class? If so is there any way of solving the problem? -- View this message in context: http://tapestry.1045711.n5.nabble.com/org-apache-tapestry5-runtime-ComponentEventException-tp3404853p3406425.html Se

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Howard Lewis Ship
On Tue, Mar 1, 2011 at 9:59 AM, robnangle wrote: > > Richard Hill-7 wrote: >> >> I haven't used the @SessionState annotation, I use the >> ApplicationStateManager directly to store SSOs but a quick look at the >> docs suggest it's doing the same thing. >> >> Firstly, I don't understand your User c

RE: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread robnangle
Richard Hill-7 wrote: > > I haven't used the @SessionState annotation, I use the > ApplicationStateManager directly to store SSOs but a quick look at the > docs suggest it's doing the same thing. > > Firstly, I don't understand your User class - it seems to also contain a > User field? Sounds li

RE: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Richard Hill
I haven't used the @SessionState annotation, I use the ApplicationStateManager directly to store SSOs but a quick look at the docs suggest it's doing the same thing. Firstly, I don't understand your User class - it seems to also contain a User field? Sounds like a stackoverflow in the making

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Rich M
If you want it to return a String, do something like this. Also, @SessionState would not be necessary in a class like this. The @SessionState in your page class(es) will maintain the object for you. public class User { private String user_id; public User getUser_id() { return user_id;

RE: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread robnangle
Richard Hill-7 wrote: > > > Getting the user id depends on what public methods your user object has. > Presumably it has something like .getId() ? > > > > On Tue, 2011-03-01 at 06:44 -0800, robnangle wrote: >> Im probably wording the question wrong but that returns something like a >> memory

RE: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Kristian Marinkovic
override the toString() implementation of your user entity... you can use apache-commons ToStringBuilder. Von:robnangle An: users@tapestry.apache.org Datum: 01.03.2011 15:44 Betreff:RE: org.apache.tapestry5.runtime.ComponentEventException Im probably wording the question

RE: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Richard Hill
Getting the user id depends on what public methods your user object has. Presumably it has something like .getId() ? On Tue, 2011-03-01 at 06:44 -0800, robnangle wrote: > Im probably wording the question wrong but that returns something like a > memory address: Entities.User@12e7cb6 > > I want

RE: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread robnangle
Im probably wording the question wrong but that returns something like a memory address: Entities.User@12e7cb6 I want to find the user_id of that user? -- View this message in context: http://tapestry.1045711.n5.nabble.com/org-apache-tapestry5-runtime-ComponentEventException-tp3404853p3405030.h

RE: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread WINDEY Pieter AWL-IT
>>> Hi, >>>Is there any way to convert the @Sessionstate user value to a string or a >>>readable value? Yes user.toString() ! Atos Worldline SA/NV - Chaussee de Haecht 1442 Haachtsesteenweg - 1130 Brussels - Belgium RPM-RPR Bruxelles-Brussel - TVA-BTW BE 0418.547.872

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread robnangle
Hi, Is there any way to convert the @Sessionstate user value to a string or a readable value? -- View this message in context: http://tapestry.1045711.n5.nabble.com/org-apache-tapestry5-runtime-ComponentEventException-tp3404853p3405008.html Sent from the Tapestry - User mailing list archive at N

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread robnangle
Hi ye the craeateDb() set's all of that. Got it sorted anyway, thanks people. I didn'y fully understand the @Property annotation, that was my problem. All the elements were null. -- View this message in context: http://tapestry.1045711.n5.nabble.com/org-apache-tapestry5-runtime-ComponentEventExc

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Kristian Marinkovic
where is your connection (field conn) set? Von:robnangle An: users@tapestry.apache.org Datum: 01.03.2011 13:53 Betreff:Re: org.apache.tapestry5.runtime.ComponentEventException Yes stupidly I forgot to set the connection but the errors remain. The onSuccess(): public String

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread robnangle
Yes stupidly I forgot to set the connection but the errors remain. The onSuccess(): public String onSuccess() throws Exception { createDb(); String statement = "INSERT INTO teams(user_id, team_name, keeper, fullBack1, fullBack2, fullBack3, halfBack1, halfBack2, hal

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Thiago H. de Paula Figueiredo
On Tue, 01 Mar 2011 09:35:00 -0300, robnangle wrote: Ye I noticed that but cant see what could be wrong with that line: Line 245: String statement = "INSERT INTO teams(user_id, team_name, keeper, fullBack1, fullBack2, fullBack3, halfBack1, halfBack2, halfBack3, midfield1, midfield2, halfF

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread robnangle
Ye I noticed that but cant see what could be wrong with that line: Line 245: String statement = "INSERT INTO teams(user_id, team_name, keeper, fullBack1, fullBack2, fullBack3, halfBack1, halfBack2, halfBack3, midfield1, midfield2, halfForward1, halfForward2, halfForward3, fullForward1, fullForward

Re: org.apache.tapestry5.runtime.ComponentEventException

2011-03-01 Thread Bryan Lewis
The stack trace says you have an NPE in your onSuccess method, at SelectPlayers.java:246. The ComponentEventException has little to do with it... it's only saying the exception occurred during the 'success' event. On Tue, Mar 1, 2011 at 7:18 AM, robnangle wrote: > I have seen a couple thru the