Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-295

change button tag to prevent RuntimeException

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • NetUI
    • None
    • Beehive SVN / Tomcat 5.0.25

    Description

      If I use a button tag in a form to cancel and the action of that button points to an action that doesn't declare a form bean, I get a RuntimeException for every field in the form. The exceptions seem harmless, but I would rather not have the exception or have a single, specific exception.

      I will attach the stack trace that I got using the following code:

      — in the JSP
      <netui:button type="submit" value="submit"/>
      <netui:button action="cancel" type="submit" value="cancel"/>
      </netui:form></p>

      — in the controller
      @Jpf.SimpleAction( name="cancel", returnAction="newProductCancel" )
      }

      The obvious work-around (and probably correct use of the cancel action in this case) work fine, so this isn't recorded as a bug against Beehive.

      — the 'correct' controller code
      @Jpf.Action(
      forwards=

      { @Jpf.Forward(name="success", returnAction="newProductCancel") }

      ,
      useFormBean="newProductForm"
      )
      protected Forward cancel( NewProductForm newProductForm ) {
      return new Forward( "success" );
      }

      • jeremiah

      Attachments

        1. BEEHIVE-295.tar
          8.96 MB
          Jeremiah Johnson
        2. catalina.out
          108 kB
          Jeremiah Johnson
        3. log4j.xml
          1 kB
          Jeremiah Johnson
        4. newWebAppAndLogs.tar
          9.04 MB
          Jeremiah Johnson

        Activity

          People

            Unassigned Unassigned
            jerjohns Jeremiah Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: