You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ex...@nokia.com on 2002/12/05 14:13:29 UTC

[jelly] Subclassing JellyContext

Hi,

Is there any way I can override the creation of JellyContext instances so I can put in my own subclass?

Thanks,
Mike.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [jelly] Subclassing JellyContext

Posted by James Strachan <ja...@yahoo.co.uk>.
There's a factory method, createChildContext() which you can override to
create your own context...

public class MyContext extends JellyContext {

    public MyContext(JellyContext parent) {
        super(parent);
    }

    protected JellyContext createChildContext() {
        return new MyContext(this);
    }
}

Note that soon we'll be refactoring the variable scope logic out of the
JellyContext so that you could just provide your own variable Scope
implementation to change how variables behave. Thats typically the usual
reason folks need their own JellyContext implementation

There's more details of this here...

http://jira.werken.com/secure/ViewIssue.jspa?key=JELLY-1

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: <Ex...@nokia.com>
To: <co...@jakarta.apache.org>
Sent: Thursday, December 05, 2002 1:13 PM
Subject: [jelly] Subclassing JellyContext


Hi,

Is there any way I can override the creation of JellyContext instances so I
can put in my own subclass?

Thanks,
Mike.

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>