2 Replies Latest reply on Aug 21, 2008 5:15 AM by OLga Chikvina

    Struts Code Generate not working as tutorial advertises

    Tanya Ruttenberg Expert

      I am using the nightly build of the Tools w/Eclipse 3.4 and am working my way through the Struts tutorial (v. 2.1.0.CR1).

      I'm up to Chapter 3: Generating Stub Coding. The tutorial says

      * Right click a blank space in the diagrm and select Generate Java Code.
      * Leave everything as is in the dialog box and click Generate.
      You should see a screen that says :

      etc. etc.

      This operation is supposed to generate an Action class and a Form Bean class. Instead here's what sort of works (but not completely).

      Here's what does occurs:

      Right clicking on a blank space drops down a menu with only

      Add
      Create comment...


      However, selecting the Action (GetNameForm) and right-clicking does produce the Generate Java Code selection in the menu. But I can't get it to produce the ActionFormBean. Even when I select org.apache.struts.action.ActionFormBean in the Base Class field (of the Struts Action window) it seems to just produce an Action class and not an ActionFormBean.

      I know I can type it all in manually, but since I'm such a java neophyte it would be really useful if this code generation worked as advertised. Is this broken? Or is the tutorial out of date? Is there more up-to-date documentation on this tool?

      TDR