This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 64153

Summary: specify standard action in layer
Product: apisupport Reporter: pzajac <pzajac>
Component: ProjectAssignee: pzajac <pzajac>
Status: VERIFIED FIXED    
Severity: blocker CC: jglick, jtulach, pjiricka, raccah
Priority: P3 Keywords: UMBRELLA
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Bug Depends on: 64154, 64196, 64197, 64198, 64199, 64200, 64201, 64202, 64203, 64204, 64206, 64207, 64208, 64209, 64210, 64211, 68413    
Bug Blocks:    

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 nb.org 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:

text/x-dd-servlet2.4
text/x-dd-servlet2.3
text/x-dd-servlet2.2

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
v