Beehive
  1. Beehive
  2. BEEHIVE-295

change button tag to prevent RuntimeException

    Details

    • Type: Wish Wish
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: NetUI
    • Labels:
      None
    • Environment:
      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
      1. newWebAppAndLogs.tar
        9.04 MB
        Jeremiah Johnson
      2. log4j.xml
        1 kB
        Jeremiah Johnson
      3. catalina.out
        108 kB
        Jeremiah Johnson
      4. BEEHIVE-295.tar
        8.96 MB
        Jeremiah Johnson

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Jeremiah Johnson
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development