W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1997

Creating a new resource editor

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Tue, 4 Feb 1997 23:48:22 +0100 (MET)
Message-Id: <199702042248.XAA07054@www43.inria.fr>
To: karenkay@sholink.com (Karen Cheng)
Cc: www-jigsaw@w3.org
Karen Cheng writes:
 > Hi there,
 > 
 > If I wanted to create my own resource editor (subclass of 
 > GenericResourceEditor), how do I register it with the FormEditorFactory?
 > Do I have to create a subclass of FormEditorFactory and use registerEditor()
 > in the static block?  Then how do I tell jigsaw to use my FormEditorFactory
 > subclass instead of the default FormEditorFactory?
 > 

That's how IPTemplatesAttribute register its specific attribute editor:

classs IPTemplatesAttribute ... {
static {
    FormFieldRegistry.registerField("w3c.jigsaw.auth.IPTemplatesAttribute"
                                    , "w3c.jigsaw.auth.IPTemplatesField");
}
}

It's basically the same thing for new class of resources, except that
you register them to the FormEditorFactory, at static init of your
resource class.

Anselm.
Received on Tuesday, 4 February 1997 17:48:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT