title: Preferred alternative to creating a new object in Spring Webflow
body: <p>I am currently working with <code>Spring 3.1.2 (webflow version 2.3.1)</code> and I'm facing an older problem once again. The problem is creating a new object via Spring webflow. So what I'd like to do is following : </p>
  
  <p><code>&lt;set name="myBean.foo" value="new Bar()"</code></p>
  
  <p>I did some research and found out it was a no-go. Now facing that same problem, I'm wondering if there are maybe some new facilities for this problem that I don't know about, or a preferred alternative. In the past I used a static factory for this. </p>
  
  <p>In addition to Alan J Liu's response : the object needs to be initiated every time a certain transition is made (or every time a certain view is entered).</p>
  
  <p>PS : <a href="http://forum.springsource.org/showthread.php?75778-Can-we-create-an-object-in-Spring-Web-Flow-2-expression" rel="nofollow">springsource</a> did not quite answer my question here. Thanks in advance!</p>