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 144399 - [65cat] Struts ActionForm JavaDoc During File Generation
Summary: [65cat] Struts ActionForm JavaDoc During File Generation
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Struts (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: _ potingwu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-19 14:39 UTC by adam_myatt
Modified: 2008-08-22 16:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adam_myatt 2008-08-19 14:39:13 UTC
[ BUILD # : 200808170243 ]
[ JDK VERSION : 1.6.0_07 ]

Fix the consistency in JavaDoc generated between Struts Action and
ActionForm classes. After using the New File wizard to create Struts
Action class, the 'execute' method of a generated Action class has
this  :

    /**
     * This is the action called from the Struts framework.
     * @param mapping The ActionMapping used to select this
instance.
     * @param form The optional ActionForm bean for this request.
     * @param request The HTTP Request we are processing.
     * @param response The HTTP Response we are processing.
     * @throws java.lang.Exception
     * @return
     */
    public ActionForward execute(ActionMapping mapping, ActionForm 
form,
            HttpServletRequest request, HttpServletResponse
response)
            throws Exception {
        
        return mapping.findForward(SUCCESS);
        
    }
    
 However, when an ActionForm class is generated using the New File
wizard, the 'validate' method has no JavaDoc, only this : 
 
    public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        if (getName() == null || getName().length() < 1) {
            errors.add("name", new
ActionMessage("error.name.required"));
            // TODO: add 'error.name.required' key to your resources
        }
        return errors;
   }
   

I would expect this validate method to also have the auto-generated
JavaDoc present like the execute method of the Struts Action classes.
I know I can edit the Struts Templates that come with the IDE, but
these two Struts templates should be similar out of the box.
Comment 1 Peter Pis 2008-08-19 14:51:07 UTC
Reassigning to "web".
Comment 2 _ potingwu 2008-08-19 17:20:07 UTC
I will fix it.
Comment 3 _ potingwu 2008-08-19 18:51:00 UTC
I will fix it by using the following Javadoc similar to the execute() method:
    /**
     * This is the action called from the Struts framework.
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
Comment 4 Quality Engineering 2008-08-21 05:58:32 UTC
Integrated into 'main-golden', available in build *200808210201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/22cccfbb3bd3
User: potingwu@netbeans.org
Log: Fix Issue#144399, [65cat] Struts ActionForm JavaDoc During File Generation.
Comment 5 _ potingwu 2008-08-22 16:55:24 UTC
Fixed in the trunk,
changeset 22cccfbb3bd3 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=22cccfbb3bd3