Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 64153 - specify standard action in layer
specify standard action in layer
Product: apisupport
Classification: Unclassified
Component: Project
All All
: P3 (vote)
: 5.x
Assigned To: pzajac
Depends on: 64154 64196 64197 64198 64199 64200 64201 64202 64203 64204 64206 64207 64208 64209 64210 64211 68413
  Show dependency treegraph
Reported: 2005-09-12 17:12 UTC by pzajac
Modified: 2006-11-23 16:51 UTC (History)
4 users (show)

See Also:
Issue Type: TASK


Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2005-09-12 17:12:59 UTC
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
before actionsContext().
Comment 1 Petr Jiricka 2005-09-15 11:54:18 UTC
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?
Comment 2 pzajac 2005-09-15 12:46:42 UTC
I don't know.

May be Jesse is able to answer...
Comment 3 Jesse Glick 2005-09-15 18:56:41 UTC
I'm not sure if we want to deprecate defaultActions() generally - maybe, maybe
not. But we do want to deprecate it for modules, or at least for the
cases that I know of.
Comment 4 Petr Jiricka 2005-09-16 15:25:57 UTC
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".

Comment 5 Jesse Glick 2005-09-16 17:31:06 UTC
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.
Comment 6 Jesse Glick 2005-09-16 17:32:20 UTC
(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
different versions.)
Comment 7 Jesse Glick 2005-12-12 19:23:45 UTC
All done except for the holdouts in the web module.
Comment 8 pzajac 2006-11-23 16:51:23 UTC

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo