Results 1 to 7 of 7

Thread: Redirects In Java base flow

  1. #1
    Join Date
    Dec 2004
    Location
    CA
    Posts
    208

    Default Redirects In Java base flow

    Greetings!

    I upgraded to Preview 5 and it seems the old way of doing a redirect in a Java base flow has change. What is the correct way of handling redirects now?

    Curtney
    Curtney Jacobs

  2. #2
    Join Date
    Aug 2004
    Posts
    1,905

    Default

    How are you doing redirects ATM?

  3. #3
    Join Date
    Dec 2004
    Location
    CA
    Posts
    208

    Default

    In preview 3, you accomplish a redirect in a java base flow by doing the following:

    new RedirectViewDescriptorCreator ("XXXXXXXXX);


    In preview 5 the above class is no longer available. I have looked at the API, but I don't see how this can be done now. Also, I don't have access to "*.binding.Expression" API which appears to be what I need now. There is no link to this API.

    Curtney
    Curtney Jacobs

  4. #4
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    In PR5 you still have the RedirectViewDescriptorCreator, however it is in the org.springframework.webflow.support package. So basically you could do:

    new ViewState(getFlow(), stateId, new RedirectViewDescriptorCreator("/viewName?param0=value0&param1=value1"), transitions, properties);

    Or alternatively:

    addViewState(stateId, "redirect:/viewName?param0=value0&param1=value1", transitions, properties);

    The binding library comes in the spring-binding-....jar file which is included in the SWF distribution. Source code is also included.

    Erwin

  5. #5
    Join Date
    Dec 2004
    Location
    CA
    Posts
    208

    Default

    Thanks Erwin,

    Curtney
    Curtney Jacobs

  6. #6
    Join Date
    Dec 2004
    Location
    CA
    Posts
    208

    Default

    Erwin, I checked the api again, under support, and it is not there. Also, I checked the pr5 jar and was unable to find the class. Do I have to download a separate jar?

    Curtney
    Curtney Jacobs

  7. #7
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    Sorry, my mistake. In PR5 the class is actually a static inner class of the TextToViewDescriptorCreator:

    org.springframework.webflow.TextToViewDescriptorCr eator.RedirectViewDescriptorCreator

    Check the JavaDoc of TextToViewDescriptorCreator for details: http://static.springframework.org/sp...orCreator.html

    "addViewState(stateId, "redirect:/viewName?param0=value0&param1=value1", transitions, properties);" should still work though...

    We've rearranged packages a bit for the next RC1 release to make classes more accessible.

    Erwin

Similar Threads

  1. FlowExecutionStorage in a DB
    By cacho in forum Web Flow
    Replies: 7
    Last Post: Oct 19th, 2009, 03:36 PM
  2. Redirects and Spring Web Flow
    By Scott Battaglia in forum Web Flow
    Replies: 11
    Last Post: Oct 27th, 2005, 07:56 PM
  3. Is a 'singleton' flow a bad idea?
    By akw in forum Web Flow
    Replies: 4
    Last Post: Oct 6th, 2005, 01:16 AM
  4. Request vs. Flow Scope: documentation?
    By Tom Hicks in forum Web Flow
    Replies: 5
    Last Post: Aug 2nd, 2005, 03:30 PM
  5. Spring Web Flow - Preview 1 Released
    By Colin Sampaleanu in forum Announcements
    Replies: 13
    Last Post: Apr 6th, 2005, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •