Creating a new resource editor

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 UTC