简体   繁体   English

如何在Struts2应用程序中使用Jquery从一个弹出页面导航到另一页面

[英]How to navigate from one popup page to another using Jquery in struts2 application

I wish to navigate through multiple pages in a pop-up block. 我希望在弹出框中浏览多个页面。 That is, my main page would be inactive when i navigate through pop-up flow as below 也就是说,当我浏览弹出窗口时,我的主页将处于不活动状态,如下所示

[[Main Page]]
    [popup-page1]--Next--> [popup-page2]--Next--> [popup-submit page3] --Submit--> 
[[Main Page]]

Each page has different set of attributes that are populated by user input such as radio buttons and text fields etc for instance, below are some of the attributes that are filled on each page. 每个页面都有一组不同的属性,这些属性由用户输入填充,例如单选按钮和文本字段等,下面是每个页面上填充的一些属性。

[page1]--> your name, DOB, country
[page2]--> your preference, your package, direction 
[page3]--> email address and submit 

How can i retain these values and submit as a form? 我如何保留这些值并以表格形式提交? Do I need to submit each popup page as a separate form or in one shot by retaining all these value till the end? 是否需要将所有这些值保留到最后,以单独的形式或以一张照片的形式提交每个弹出页面?

Note that my application is in strut2 and usually for page navigation I take the help of model driven arch. 请注意,我的应用程序位于strut2中,通常在页面导航中,我借助模型驱动的arch。 (putting the fields in one bean and keep a track of value changes using hidden attributes from one form to another)..How can this be achieved using pop-ups. (将字段放在一个bean中,并使用从一种形式到另一种形式的隐藏属性来跟踪值的变化)。如何使用弹出窗口来实现此目的。 I have limited knowledge about sj:dialog 我对sj:dialog了解有限

EDIT 编辑

Use Jquery to simulate pop-up navigation by display none and block property. 使用Jquery通过不显示任何内容和阻止属性来模拟弹出导航。 Then, for submit do an AJAX call, this will perform an async call in the background. 然后,为了进行提交进行AJAX调用,这将在后台执行异步调用。

In order to navigate through multiple pages in a pop-up block. 为了在弹出窗口中浏览多个页面。

  1. I created multiple divs inside the parent div and on click of each continue button I took help of show and hide using Jquery. 我在父div内创建了多个div,在单击每个继续按钮时,我借助Jquery进行了显示和隐藏。
  2. At the end of the flow, submit the request to an URL using an AJAX call (GET request)pass values entered by user as params. 在流程的最后,使用用户作为参数输入的AJAX调用(GET请求)传递值将请求提交到URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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