Take the 2-minute tour ×

I am using tiles, Spring MVC, Spring form tag. I want to make a form that step by step. When click a button, show more inputs from another tiles definition. But throw a exception can not find "Neither BindingResult nor plain target object for bean name " , It looks the "more inputs" can not get bindle object from previous request, is it right?

Source code:

<form:form action="/saveTicker.do" commandName="ticker" modelAttribute="ticker" method="post">
 <form:input path="name" id="name"/>
 <a href="#" class="btn" onclick="confirmTicker();">Confirm</a>
<div class="row" id="filelist">


var confirmTicker=function(){
var ticker=$('input:text').val();


want to import another file

<table class="table ">
<c:forEach var="f" items="${fileList}">
            <form:checkbox path="files" value="${f}"></form:checkbox>

The error is

Neither BindingResult nor plain target object for bean name 'files' available as request attribute
share|improve this question
Can you post the controller method code as well? –  Dangling Piyush Feb 18 '13 at 5:07
Use commandName or modelAttribute; Not both. And Did you add 'ticker' in the model. Check my answer HERE. Might help. –  Vinay Feb 18 '13 at 9:11

1 Answer 1

up vote 0 down vote accepted

If I am reading this correct, what you want is a "wizard" form where the user is passed from one form to the next as a series of steps. First, I believe Spring Web Flow does this out of the box, but, if like me, you cannot use Spring Web Flow you can do this manually.

First, you need a Form Bean (read Command object) that has all the possible inputs from all the forms.

Next, you will either have one Controller method that accepts your Form Bean and returns the proper step (this is what I did), or you can have multiple methods...it doesn't matter. You will use the @ModelAttribute annotation on the handler method to bind the Form Bean to the view form. Also, @SessionAttributes annotation at the top of the controller to set the Form Bean as a session attribute. Make sure the name of the @ModelAttribute, @SessionAttribute, and the view all correspond to the same attribute name.

Last, create multiple views, each with the same , but each with only the pieces you want to set on the FormBean at that point. You cannot use JSR 303, or at least I don't know how you can, since you can't have validation done between steps. You will have to handle validation at the end on your own.

share|improve this answer
It looks a little hard, just found a simple solution, use jquery load a new form to instead of old form. –  atu0830 Mar 16 '13 at 1:52

Your Answer


