How to associate a new WAApplication to a component?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to associate a new WAApplication to a component?

stephane ducasse
hi all

I read the FAQ but the following sentence is unclear to me

How do I subclass WAApplication?
It is sometimes necessary to subclass WAApplication, for instance when  
it is needed to display a session expiration page.
When you subclass WAApplication, make sure that the subclass  
reimplements #description on the class side, this will ensure that you  
can differentiate the WAApplication subclasses in the "config"  
application. Once the WAApplication is in place you can use the  
"config" application to create your Seaside application.
New Seaside applications can also be created programmatically by  
carefully reimplementing#applicationWithPath: on the class side of  
your root component.


"Once the WAApplication is in place you can use the "config"  
application to create your Seaside application."
and I could not find applicationWithPath: ?

I found applicationNamed: but it seems that WAApplication is hard  
coded there.

Component class>>applicationNamed: aString
        | application |
        application := WAApplication named: aString.
        application configuration addAncestor: WARenderLoopConfiguration new.
        application preferenceAt: #rootComponent put: self.
        ^ application

Should I duplicate it and change the WAApplication?

Component class>>applicationNamed: aString
        | application |
        application := XXXXApplication named: aString.
        application configuration addAncestor: WARenderLoopConfiguration new.
        application preferenceAt: #rootComponent put: self.
        ^ application

Thanks

Stef



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How to associate a new WAApplication to a component?

Ken Treis
Hi Stef,

I think the FAQ may be a little out of date. Older versions of Seaside  
let you specify the application class in the config application, but  
in Seaside 2.8 it's hard-coded (as you found). As far as I know,  
overriding #applicationNamed: is the only way to do this for now.


Ken

On Jan 26, 2008, at 11:57 AM, stephane ducasse wrote:

> hi all
>
> I read the FAQ but the following sentence is unclear to me
>
> How do I subclass WAApplication?
> It is sometimes necessary to subclass WAApplication, for instance  
> when it is needed to display a session expiration page.
> When you subclass WAApplication, make sure that the subclass  
> reimplements #description on the class side, this will ensure that  
> you can differentiate the WAApplication subclasses in the "config"  
> application. Once the WAApplication is in place you can use the  
> "config" application to create your Seaside application.
> New Seaside applications can also be created programmatically by  
> carefully reimplementing#applicationWithPath: on the class side of  
> your root component.
>
>
> "Once the WAApplication is in place you can use the "config"  
> application to create your Seaside application."
> and I could not find applicationWithPath: ?
>
> I found applicationNamed: but it seems that WAApplication is hard  
> coded there.
>
> Component class>>applicationNamed: aString
> | application |
> application := WAApplication named: aString.
> application configuration addAncestor: WARenderLoopConfiguration new.
> application preferenceAt: #rootComponent put: self.
> ^ application
>
> Should I duplicate it and change the WAApplication?
>
> Component class>>applicationNamed: aString
> | application |
> application := XXXXApplication named: aString.
> application configuration addAncestor: WARenderLoopConfiguration new.
> application preferenceAt: #rootComponent put: self.
> ^ application
>
> Thanks
>
> Stef
>
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

--
Ken Treis
Miriam Technologies, Inc.

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside