Announcement Announcement Module
Collapse
No announcement yet.
JSPs throw error with PR4 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSPs throw error with PR4

    This may be related to http://forum.springframework.org/showthread.php?t=16545. When I attempt to reference a command object name in my JSPs that I configured using

    Code:
    setFormObjectName("requestForm");
    my JSPs throw a

    Code:
    javax.servlet.jsp.JspTagException: Neither Errors instance nor plain target
    object for bean name 'requestForm' available as request attribute
    I guess it's saying there is no attribute by that name. It worked with PR3. Did someone change it so that you have to reference the flowScope in the JSP or something? Am doing something wrong or is this a bug?

    Here's how I'm referencing it in my JSP:

    Code:
    <spring:bind path="requestForm.projectTitle">
    --Joe
    Last edited by robyn; May 16th, 2006, 03:06 AM.

  • #2
    No, nothing changed there. The sample applications (e.g. PhoneBook) do exactly this, for example.

    Can you turn on debug logging for org.springframework.webflow -- look at what gets put in the ViewDescriptor -- you should see your requestForm object in the model.

    Just to make sure: you're executing FormAction.setupFrom before you enter your view state?

    Keith

    Comment


    • #3
      Hi Keith,

      Thanks for the reply. I will turn on debugging and follow your instructions, but to answer your question about if I'm executing setupForm before the view state, here is a snippet from my flow:

      Code:
      <webflow id="createFlares" start-state="RequestStart">
      	
      	<view-state id="RequestStart" view="RequestForm">
      	  <setup bean="requestFormAction" method="setupForm"/>
      		<transition on="submit" to="bindAndValidateRequestForm"/>
      	</view-state>
                    .
                    .
                    .
      I'm thinking now that maybe I need to use the <entry> tags in PR4? Hehehe...I'm sure that is the reason. Let me try...

      --Joe

      Comment


      • #4
        That has to be it: entry is more generic, applicable to any state type. setup is no longer with us :-)

        Why didn't the XML parser barf? Is there a old copy of PR3 lying around?

        Comment


        • #5
          Yes, it was the <setup bean="" method=""/> tag that was screwing it up. I replaced it with the new <entry> tags and it works now. The parser didn't give an error, so I guess the <setup> tag is still ok syntactically, but it does not work. Thanks Keith for clearing that up for me.

          --Joe

          Comment

          Working...
          X