Announcement Announcement Module
Collapse
No announcement yet.
How to use AbstractFormController Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use AbstractFormController

    Hi
    I have been successfully using SimpleFormController and creating my own implementations of Controller for a while. But now I need form based behaviour but no validation and no 'succes' view (the form is parameters for a list filter, output always shown on the same listing page). AbstractFormController seems the way to go.... but the commandName I have used is not found in the request when fowarding to the JSP...

    Code:
    <bean id="genericListController" class="com.wiley.uk.coi.web.spring.FilteredListController">
    	<property name="commandName"><value>filter</value> </property>
    	<property name="commandClass"><value>com.knowsense.coi.model.ContentListFilter</value> </property>
    	<property name="contentManager"><ref bean="contentManager"/></property>
    </bean>
    Code:
    <spring&#58;bind path="filter.status">
       <select name="<c&#58;out value="$&#123;status.expression&#125;"/>">
          <c&#58;forEach var="statusName" items="$&#123;allStatuses&#125;">
    	  <option <c&#58;if test="$&#123;statusName == status.value&#125;">selected</c&#58;if> value="<c&#58;out value="$&#123;statusName&#125;"/>">
    	  <c&#58;out value="$&#123;statusName&#125;"/></option>
        </c&#58;forEach>
      </select>
    </spring&#58;bind>

    I've overridden the processFormSubmission() and showForm() methods to return a ModelAndView object - but these don't affect the binding of the command object into the request do they? So why can't the JSP find the filter object?

    Your thoughts appreciated

    Neil Canham
Working...
X