You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Raymond <pp...@hotmail.com> on 2004/08/03 13:24:27 UTC

cannot create visit object?!

Hello I have problem with my Tapestry code as below, the visit object was
not created about a call to IPage.getVisit();

#################################################
public abstract class Border extends BaseComponent
{
    private Visit _visit;
..
 public void finishLoad() {
        IPage page = getPage();
        _visit = (Visit)page.getVisit();
        if (_visit == null) throw new RuntimeException("Visit NOT
created!!!");    // this runtime exception was actually thrown during
execution
        ...
    }
..
}
################################################

Does anyone know what's wrong with my code? Or is there any other ways to
achieve the same effect? (I need to use the visit object in the web app's
border). Instead of having the visit object being created lazily I simply
want every user to have a session and a corresponding visit object ASAP (as
soon as they connect to my app).

Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: cannot create visit object?!

Posted by Raymond <pp...@hotmail.com>.
I specified org.apache.tapestry.visit-class in the application spec, not
web.xml.

But aren't they supposed to be equivalent?

The problem is that before I moved the part of the code to create the visit
object in the finishLoad() method there was no problem. The visit object was
accessible in other methods of the border component.




----- Original Message ----- 
From: "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>
To: "'Tapestry users'" <ta...@jakarta.apache.org>; "'Raymond'"
<pp...@hotmail.com>
Sent: Tuesday, August 03, 2004 10:43 PM
Subject: RE: cannot create visit object?!


Have you specified your visit class in your application or web.xml file?

http://jakarta.apache.org/tapestry/doc/TapestryUsersGuide/state.visit.html#d
0e2070

It's all I can think of.

-Filip S. Adamsen

-----Original Message-----
From: Raymond [mailto:pps18033@hotmail.com]
Sent: Tuesday, August 03, 2004 1:24 PM
To: Tapestry users
Subject: cannot create visit object?!

Hello I have problem with my Tapestry code as below, the visit object was
not created about a call to IPage.getVisit();

#################################################
public abstract class Border extends BaseComponent
{
    private Visit _visit;
.
 public void finishLoad() {
        IPage page = getPage();
        _visit = (Visit)page.getVisit();
        if (_visit == null) throw new RuntimeException("Visit NOT
created!!!");    // this runtime exception was actually thrown during
execution
        ...
    }
.
}
################################################

Does anyone know what's wrong with my code? Or is there any other ways to
achieve the same effect? (I need to use the visit object in the web app's
border). Instead of having the visit object being created lazily I simply
want every user to have a session and a corresponding visit object ASAP (as
soon as they connect to my app).

Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: cannot create visit object?!

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Have you specified your visit class in your application or web.xml file?

http://jakarta.apache.org/tapestry/doc/TapestryUsersGuide/state.visit.html#d
0e2070

It's all I can think of.

-Filip S. Adamsen

-----Original Message-----
From: Raymond [mailto:pps18033@hotmail.com] 
Sent: Tuesday, August 03, 2004 1:24 PM
To: Tapestry users
Subject: cannot create visit object?!

Hello I have problem with my Tapestry code as below, the visit object was
not created about a call to IPage.getVisit();

#################################################
public abstract class Border extends BaseComponent
{
    private Visit _visit;
..
 public void finishLoad() {
        IPage page = getPage();
        _visit = (Visit)page.getVisit();
        if (_visit == null) throw new RuntimeException("Visit NOT
created!!!");    // this runtime exception was actually thrown during
execution
        ...
    }
..
}
################################################

Does anyone know what's wrong with my code? Or is there any other ways to
achieve the same effect? (I need to use the visit object in the web app's
border). Instead of having the visit object being created lazily I simply
want every user to have a session and a corresponding visit object ASAP (as
soon as they connect to my app).

Thank you. 



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org