It may not be a "best practice", but if MyInfoPanel does not need to be
"reusable" you can make it an inner class of MyProfile. Then userId can be
accessed directly.

Phil

On Mon, Sep 29, 2008 at 6:45 AM, Steve Swinsburg <
[EMAIL PROTECTED]> wrote:

> Hi all,
> I'm a new Wicket user and am developing an application making use of
> Panels. The Panels are working, however I need to access some objects in the
> panel that are defined in the parent class and am not sure how to do this.
>
> e.g.
>
> MyProfile.java:
>
> String userId = Profile.getCurrentUserId();
>
> add(new MyInfoPanel("myInfoPanel"));
>
>
> and in MyInfoPanel.java
>
> I need to be able to access userId for example.
>
> This is just a basic example, I need to access certain objects in
> MyInfoPanel.java that are defined in the parent class MyProfile.java
>
>
>
> cheers,
> Steve
>
>
>
>
>
>
>
>


-- 
Phil Grimm
Mobile: (858) 335-3426
Skype: philgrimm336

Reply via email to