Announcement Announcement Module
Collapse
No announcement yet.
Wrong setup of backing bean? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wrong setup of backing bean?

    Hi all,

    I'm using a WizardFormController to set up a couple of subsequent pages for a dialog. Apparently, something is wrong about the setting of either the backing bean (called docbook.FormInput) or with the Errors object accompanying the request.

    So far, I have found the following phenomena:
    1) The first page appears without difficulty
    2) If the values are valid (i.e. no errors.reject... is called) a JspTagException is thrown with the message "Neither Errors instance nor plain target object for bean name 'formInput' available as request attribute". This probably happens somewhere between leaving validatePage() and preparing for the next form.
    3) If any of the values is not valid, errors.rejectValue(...) is called which causes a NotReadablePropertyException with the message "Invalid property 'formInput' of bean class [docbook.FormInput]: Bean property 'formInput' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?"

    I inserted some test output into the validatePage method of the Controller which assures that both an Errors object and a FormInput object do exist.

    The code of the jsp page is as follows:

    Code:
    <html>
      <head>
      </head>
      <body style="font-family:century gothic;">
        <img src="file:/docbook/WEB-INF/jsp/sicap.gif" alt="Sicap Logo" />
        <h2>SICAP DocBook Server</h2>
        <br/><br/>
        <form:form>
          <table>
            <tr>
              <td>User Name</td>
              <td>
                <spring:bind path="command.name">
                  <form:input path="name"/>
                </spring:bind>
              </td>
            </tr>
            <tr>
              <td>Password</td>
              <td>
                <spring:bind path="command.password">
                  <form:password path="password"/>
                </spring:bind>
              </td>
            </tr>
            <tr>
              <td><input type="submit" value="Cancel" name="_cancel"/></td>
              <td><input type="submit" value="Login" name="_target1"/></td>
            </tr>
          </table>
         </form:form>     
      </body>
    </html>
    Any suggestions? Could it be caused by the submit clauses?

    Dieter
Working...
X