简体   繁体   中英

Is it possible to transfer data between html pages driven by spring web flow?

I am aware of passing data between jsp in spring web flow.

Is it possible to transfer data between html pages driven by spring web flow. I don't want to use the HTML5 local storage capabilities.

Example:

Page 1: Search box for an employee id.
Page 2: Search result for the employee details.

Two ways that I could think:

  1. Get the employee details in page 1 by ajax and pass the result to the page two .
  2. Pass the employee id to page 2 and get the result by ajax in onload .

In both case I need to pass any variable/data. I am confused in doing this.

Is there anything in the Spring webflow using which I could do this?

Thanks in advance, Easwar

Of course you can do either one. You'll need to have a listener in between to accept the employee ID from page 1, do the search for details, put the results into request or session scope, and redirect to the displaying page. You don't even need Spring web flow to do it; a simple Controller will do.

I don't even see why you'd need two pages. It's common for the selection from one text box or drop down to be used to populate a second on the same page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM