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 130461 - Provide support for action classes
Summary: Provide support for action classes
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 135258 176494 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-18 22:45 UTC by nexeh
Modified: 2009-11-13 02:24 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nexeh 2008-03-18 22:45:42 UTC
I made the following post on Java.Sun.Com and found it more apropreate for it to be here. If this is not a bug I would 
like to know how this is done.

I am new to the Swing Application Framework and I'm running into something that has me stumped, I'm using Netbeans 6.0 
for the GUI builder:

Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\Safety\.netbeans\6.0

When I go to assign an action to a control I can select "Create new action" then I'm asked to define the "Action's 
Class" and my only options are for my actions to be defined in the form or in my main class. Is there any way to to 
have a separate class to contain my actions. For example, could I have a class RegistrationActions that contains all 
registration related actions and another class TitleActions that contains titling actions.

I have tried creating these classes and marked it's methods with the @Action annotation but they do not appear in the 
Netbeans drop down of actions. I realize that this topic is also netbeans related but I feel it's more of a swing 
application framework question. any suggestions    
  
Andre_Uhres 
Posts:593 
Registered: 17/05/05  Re: Swing Application Framework - Action class      
Mar 18, 2008 12:12 PM (reply 1 of 3)  Helpful 
This sounds more like a NetBeans choice. Users should be able to implement other options by hand.    
  

Nexeh 
Posts:16 
Registered: 7/6/07  Re: Swing Application Framework - Action class      
Mar 18, 2008 12:55 PM (reply 2 of 3)   
  

  
  You may be very well correct! I would think that they would have planned on most developers would want to have there 
actions in a separate class. Given the possibility that this is just a limitation of the IDE, does anyone have any 
examples for doing it by hand. I do have a PPT from JavaONE but it's dated and not very detailed because it was before 
the framework was completed. I am however still interested if there is a solution to the problem.    
  

Nexeh 
Posts:16 
Registered: 7/6/07  Re: Swing Application Framework - Action class      
Mar 18, 2008 5:41 PM (reply 3 of 3)   
   

  
  I wanted to update this post to let everyone know that I have sucessfully entered in out class manually. So i guess 
the questions comes down to is there a way to get Netbeans to do that with out useing the customize code option which 
isn't very user friendly. Again, I relize that this is more netbeans related and I will be cross posting this in 
Issuezilla but if any of has imput it would be greatly apreciated!
Comment 1 Jan Stola 2008-03-25 13:59:04 UTC
Unfortunately, the current version of NetBeans (6.0 and upcoming 6.1) does not have support for action classes. On the 
other hand, we understand to importance of this support and plan to improve this area.
Comment 2 nexeh 2008-03-26 01:09:11 UTC
Please let me know if there is anything I can do to contribute.
Comment 3 Tomas Pavek 2008-07-01 17:57:51 UTC
*** Issue 135258 has been marked as a duplicate of this issue. ***
Comment 4 Jan Stola 2009-11-13 02:24:22 UTC
*** Bug 176494 has been marked as a duplicate of this bug. ***