In order to support more mime/types in Action wizard it is necessary to move
specification of standard Actions from DataLoader.defaultActions() to layer.xml
of module and every data loader should consider overriding actionsContext()
rather than defaultActions().
Also people overriding DataNode.getDefaultAction() (or .getPreferredAction())
should generally not do so; the default action will then be the first listed in
the context menu, which is usually what you wanted anyway. This was true even
So if it's now a bug to use defaultActions(), shouldn't this method be
deprecated, so people know there is something wrong about it?
I don't know.
May be Jesse is able to answer...
I'm not sure if we want to deprecate defaultActions() generally - maybe, maybe
not. But we do want to deprecate it for nb.org modules, or at least for the
cases that I know of.
Ok, thanks for the answer. BTW, what is the recommended actionsContext() value
in the case when the loader consumes multiple MIME types? Would be useful to
clarify this in the actionsContext() Javadoc.
My guess is that e.g. for the following MIME types:
I would use action context "text/x-dd-servlet".
I might rather recommend using a separate DataLoader for each MIME type (they
can share the same DataObject impl class, I think). But I don't have a strong
opinion. I don't think it really matters.
(Or you may decide to use only one MIME type for all servlet versions. Depends
on whether you would realistically want e.g. different actions or icons for
All done except for the holdouts in the web module.