Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8716359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:03:41+00:00 2026-06-13T06:03:41+00:00

I am currently working with Spring 3.1.2 (webflow version 2.3.1) and I’m facing an

  • 0

I am currently working with Spring 3.1.2 (webflow version 2.3.1) 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 :

<set name="myBean.foo" value="new Bar()"

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.

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).

PS : springsource did not quite answer my question here. Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:03:42+00:00Added an answer on June 13, 2026 at 6:03 am

    The ‘value’ attribute accepts SpEL (http://static.springsource.org/spring/docs/3.0.x/reference/expressions.html), so you can use the ‘new’ operator, just make sure that you are using the fully-qualified class name. Finally, newly created objects are in flow-scope by default, but you can specify the desired scope explicitly, this is working for me:

    <view-state id="searchScreen" view="/WEB-INF/jsp/query.view.jsp">
        <on-entry>
            <set name="flashScope.test" value="new java.util.Date()"/>
        </on-entry>
        <transition on="..." to="...">
            <evaluate expression="..."/>
        </transition>
    </view-state>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently running a working Spring + Apache Tiles webapp. I need to show
Im currently working on a grizzly, spring and jersey project and i have encountered:
I'm currently working with an async task that parses a JSON string. Once the
Currently working on a Spring 2.5 web application, looks as if the business has
I'm currently working my way through 'Spring in Action'. Being stuck starting with the
I'm currently working on a Java web project (Spring) which involves heavy use of
I am currently working on a spring portlet mvc 3 project. I have a
I am currently working on securing a web application using spring-security 3.0. I have
I am currently working on creating an import-based pipeline for my indie game using
currently I am working on a spring based application. I do have some unit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.