> to this?
> ---------------------------------
>       public void init(Object data) {
>               this.data = (TurbineUser) data;
>       }
> ---------------------------------

This is almost correct.  However, to make this more flexible, I would cast
the data object to the User interface instead of the TurbineUser concrete
implementation.


> An example would be excellent also.

public class TrivialSessionTool implements ApplicationTool
{
   //Current user for this session tool
   User user;

   public void init(Object data)
   {
      this.user = (User) data;
   }

   public String getUserName()
   {
      this.user.getUserName();
   }
   
   public void refresh()
   {
      //Not needed for this example
   }
}

hth,
Scott



> -----Original Message-----
> From: Kai Porter [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 1:54 AM
> To: [EMAIL PROTECTED]
> Subject: Session and Persistent tools
> 
> 
> Greetings turbine users,
> 
> I'm Looking for more information on session and persistant 
> tools. While it's 
> a good overview, the Pull Model Howto is pretty light on application.
> 
> I've done well with global and request tools, but am a little 
> stuck here.
> 
> I understand that the init function takes a user object 
> instead of data, but 
> I think I need a little more information...
> 
> Is it as simple as changing this
> ---------------------------------
>       public void init(Object data) {
>               this.data = (RunData) data;
>       }
> ---------------------------------
> to this?
> ---------------------------------
>       public void init(Object data) {
>               this.data = (TurbineUser) data;
>       }
> ---------------------------------
> 
> Thanks in advance for any help. An example would be excellent also.
> 
> Kai
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Reply via email to