Re: Problem with aso

2008-09-06 Thread Geoff Callender
For the record, you CAN reassign an ASO (eg. curruser = u). Don't know what I was thinking. Sorry if I misled anyone. Cheers, Geoff On 03/09/2008, at 9:44 PM, Geoff Callender wrote: Fernando's right. Your field curruser starts out as an ASO but if you reassign it (eg. curruser = u) then

Re: Problem with aso

2008-09-04 Thread Natia Gdzelishvili
i've solved it, thank you all for helping On Wed, Sep 3, 2008 at 8:46 PM, Marcus <[EMAIL PROTECTED]> wrote: > Hi Natia, > just correcting: > > _visit.setMyLoginId(u.getUserName()); > > and check Jonathan's tip. (old Tapestry libraries in your classpath.) > > > Marcus >

Re: Problem with aso

2008-09-03 Thread Marcus
Hi Natia, just correcting: _visit.setMyLoginId(u.getUserName()); and check Jonathan's tip. (old Tapestry libraries in your classpath.) Marcus

RE: Problem with aso

2008-09-03 Thread Jonathan Barker
mber 03, 2008 08:14 > To: Tapestry users > Subject: Re: Problem with aso > > public class Visit { > // The logged in user > private boolean _loggedIn = false; > private String _myLoginId = null; > > public void noteLogIn(User user) { > _lo

Re: Problem with aso

2008-09-03 Thread Marcus
Hi Natia, My suggestions: - put the setter's on Visit class. - remove methods noteLogIn() and noteLogOut() , when you want to logout just attrib null to ASO, inside any page. and try this approach: @ApplicationState private Visit _visit; public Object submitLoginForm() { Class nextPage;

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
yes i've tried many times On Wed, Sep 3, 2008 at 5:09 PM, Geoff Callender < [EMAIL PROTECTED]> wrote: > Crazy thought - in your old project, if you're using Eclipse, have you > tried Project > Clean... ? > > > On 03/09/2008, at 11:05 PM, Natia Gdzelishvili wrote: > > no I'm not tapestry 4 user

Re: Problem with aso

2008-09-03 Thread Geoff Callender
Crazy thought - in your old project, if you're using Eclipse, have you tried Project > Clean... ? On 03/09/2008, at 11:05 PM, Natia Gdzelishvili wrote: no I'm not tapestry 4 user I'm new in tapestry i thins there is some problem with my project, i've make new project anad tested aso and i

Re: Problem with aso

2008-09-03 Thread Geoff Callender
I'm stumped. When you say "can't be resolved", I'm guessing you're using debug in an IDE. Which IDE? Field u is a detached entity which may have some lazy-loaded fields. Is the IDE showing that? What if you print u, _visitExists and _visit before and after _visit.noteLogIn(u) ? Are they

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
no I'm not tapestry 4 user I'm new in tapestry i thins there is some problem with my project, i've make new project anad tested aso and it is working, I'll try to find out what it is thank you On Wed, Sep 3, 2008 at 4:59 PM, Geoff Callender < [EMAIL PROTECTED]> wrote: > Yeah, old habits die hard

Re: Problem with aso

2008-09-03 Thread Geoff Callender
Yeah, old habits die hard. On 03/09/2008, at 10:52 PM, Thiago H. de Paula Figueiredo wrote: Em Wed, 03 Sep 2008 08:44:43 -0300, Geoff Callender <[EMAIL PROTECTED] > escreveu: @ApplicationState private Visit _visit; private boolean _visitExists; Visit? Can I guess yo

Re: Problem with aso

2008-09-03 Thread Thiago H. de Paula Figueiredo
Em Wed, 03 Sep 2008 08:44:43 -0300, Geoff Callender <[EMAIL PROTECTED]> escreveu: @ApplicationState private Visit _visit; private boolean _visitExists; Visit? Can I guess you were a long time Tapestry 4 user? :) Thiago ---

Re: Problem with aso

2008-09-03 Thread Thiago H. de Paula Figueiredo
Em Wed, 03 Sep 2008 06:24:44 -0300, Fernando Padilla <[EMAIL PROTECTED]> escreveu: So you should use another class to contain a reference to the current active user, call it "UserContainer". I would call it "Session", then it could be used to hold more info about the user session. Thiag

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
maybe i have to add some configuration in appmodule... package ge.bog.merchants.regform.pages; import ge.bog.merchants.exception.UserNotFoundException; import ge.bog.merchants.model.User; import ge.bog.merchants.regform.helper.Visit; import ge.bog.merchants.regform.services.IBusinessServicesLocato

Re: Problem with aso

2008-09-03 Thread Geoff Callender
I can't see anything obviously wrong. Can you post the whole Login class - all of it. On 03/09/2008, at 10:13 PM, Natia Gdzelishvili wrote: public class Visit { // The logged in user private boolean _loggedIn = false; private String _myLoginId = null; public void noteLogIn(User

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
public class Visit { // The logged in user private boolean _loggedIn = false; private String _myLoginId = null; public void noteLogIn(User user) { _loggedIn = true; _myLoginId = user.getUserName(); } public void noteLogOut() { _loggedIn = false;

Re: Problem with aso

2008-09-03 Thread Carl Crowder
Is this actually a compilation error? Natia Gdzelishvili wrote: > in version 5.0.9 it is working > > I've addedvist class but still same situation _visit cannot be resolved > > On Wed, Sep 3, 2008 at 3:44 PM, Geoff Callender < > [EMAIL PROTECTED]> wrote: > >> Fernando's right. Your field curru

Re: Problem with aso

2008-09-03 Thread Marcus
Hi Natia, Can you post ASO code? Marcus

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
in version 5.0.9 it is working I've addedvist class but still same situation _visit cannot be resolved On Wed, Sep 3, 2008 at 3:44 PM, Geoff Callender < [EMAIL PROTECTED]> wrote: > Fernando's right. Your field curruser starts out as an ASO but if you > reassign it (eg. curruser = u) then it bec

Re: Problem with aso

2008-09-03 Thread Geoff Callender
Fernando's right. Your field curruser starts out as an ASO but if you reassign it (eg. curruser = u) then it becomes something else which is not an ASO. Your code looks like it's a mod of JumpStart, but JumpStart actually does the same kind of thing Fernando's saying: @Applicatio

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
I've made both but it doesn't work i.ve added ${user.getUserName} and on another page there is "merchantregform Start PageApplicationStateManager " On Wed, Sep 3, 2008 at 2:56 PM, Hugo Palma <[EMAIL PROTECTED]> wrote: > You have two ways of setting the currUser DAO: > > 1. Copy fields from one o

Re: Problem with aso - a further query

2008-09-03 Thread photos
Quoting Hugo Palma <[EMAIL PROTECTED]>: You have two ways of setting the currUser DAO: 1. Copy fields from one object to another. Just add this to your code: currUser.setUsername(user.getUsername); currUser.setPassword(user.getPassword); . You don't have to assign the currUser field. That

Re: Problem with aso

2008-09-03 Thread Hugo Palma
You have two ways of setting the currUser DAO: 1. Copy fields from one object to another. Just add this to your code: currUser.setUsername(user.getUsername); currUser.setPassword(user.getPassword); . You don't have to assign the currUser field. That will the done for you by Tapestry. 2.

Re: Problem with aso

2008-09-03 Thread Sven Homburg
a short sample public class UserASO { private USER userEntity; private Logger logger; public UserASO(final Logger logger) { this.logger = logger; logger.info("UserASO created"); } public USER getUserEntity() { return userEntity; } publ

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
ok, but why I can not make assignment? On Wed, Sep 3, 2008 at 2:53 PM, Sven Homburg <[EMAIL PROTECTED]>wrote: > the aso created internal by tapestry > you should not create the object by youself > > aso should used as container > > 2008/9/3 Natia Gdzelishvili <[EMAIL PROTECTED]> > > > I'm not usi

Re: Problem with aso

2008-09-03 Thread Sven Homburg
the aso created internal by tapestry you should not create the object by youself aso should used as container 2008/9/3 Natia Gdzelishvili <[EMAIL PROTECTED]> > I'm not using userExists, > in tapestry 5.0.9 everything was working, i was doing the same > > On Wed, Sep 3, 2008 at 1:24 PM, Fernando

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
I've tried to do this: currUser=new User(); and then set some values but it does not work... On Wed, Sep 3, 2008 at 2:26 PM, Natia Gdzelishvili <[EMAIL PROTECTED]>wrote: > I'm not using userExists, > in tapestry 5.0.9 everything was working, i was doing the same > > > On Wed, Sep 3, 2008 at 1:24

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
I'm not using userExists, in tapestry 5.0.9 everything was working, i was doing the same On Wed, Sep 3, 2008 at 1:24 PM, Fernando Padilla <[EMAIL PROTECTED]> wrote: > Also, i thought you were to think of an ASO almost as a singleton or a > service. Tapestry will create it for you on first access

Re: Problem with aso

2008-09-03 Thread Fernando Padilla
Also, i thought you were to think of an ASO almost as a singleton or a service. Tapestry will create it for you on first access. I didn't know you could set it. Even if I'm wrong, using this design pattern might clean things up a little. So you should use another class to contain a referen

Re: Problem with aso

2008-09-03 Thread Hugo Palma
You could also add the created=false parameter to the ApplicationState annotation if you want to keep the assignment and not have to copy every field to the ASO object. Martijn Brinkers wrote: Just a guess, I'm not sure, correct me if I'm wrong, but I don't think you can just replace the ASO

Re: Problem with aso

2008-09-03 Thread José Paumard
Natia, I think there is a mistake in your code : private User currUser ; private boolean userExists ; I dont think T5 will link userExists and currUser, currUser should be named user, or userExists currUserExists (please correct me if I'm wrong). That said, what do you mean "I cant access cu

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
no assignment cant be done currUser = u; // "currUser cannot be resolved" when i;m inspecting currUser On Wed, Sep 3, 2008 at 1:02 PM, Hugo Palma <[EMAIL PROTECTED]> wrote: > When you say that you can't access currUser what exactly does that mean ? > That it's always null ? > > > Natia Gdzelish

Re: Problem with aso

2008-09-03 Thread Hugo Palma
When you say that you can't access currUser what exactly does that mean ? That it's always null ? Natia Gdzelishvili wrote: I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: public class Login { private String username; private String password; @Inject private IBu

Re: Problem with aso

2008-09-03 Thread Martijn Brinkers
Just a guess, I'm not sure, correct me if I'm wrong, but I don't think you can just replace the ASO like you are doing. getMerchantCreator().login probably does not return an ASO object. You should make a shallow copy (ie copy all relevant info) from the returned object to you ASO object. Martij

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
no On Wed, Sep 3, 2008 at 12:52 PM, Sven Homburg <[EMAIL PROTECTED]>wrote: > any exception stack ? > > 2008/9/3 Natia Gdzelishvili <[EMAIL PROTECTED]> > > > I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: > > > > public class Login { > >private String username; > >private

Re: Problem with aso

2008-09-03 Thread Sven Homburg
any exception stack ? 2008/9/3 Natia Gdzelishvili <[EMAIL PROTECTED]> > I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: > > public class Login { >private String username; >private String password; >@Inject >private IBusinessServicesLocator _businessServicesLocator;

Re: Problem with aso

2008-09-03 Thread Natia Gdzelishvili
can anyone help me, what I'm doing wrong... On Wed, Sep 3, 2008 at 11:06 AM, Natia Gdzelishvili <[EMAIL PROTECTED] > wrote: > I'm using tapestry 5.0.14 ,i vahe problem with aso, my code is: > > public class Login { > private String username; > private String password; > @Inject >