通过多个jsp页面进行动态导航
你好
我正在使用 Spring 3.0、Hibernate 和 JSP 页面作为视图技术来开发 Web 应用程序。我陷入了将页面链接在一起的问题上。
情况如下:
我确实启动并运行了简单的 jsps,用于添加、编辑(相同的表单)和显示所有元素(使用数据表)。到目前为止,一切正常,因为我仅使用索引页面中的所有记录访问网格,从那里我可以打开编辑页面(后退按钮仅链接到网格以及用于向网格添加点的控制器方法)。
但是我确实有一些连接的记录:
- 请购单
- 解析
- 名称
经过几个小时的编码和大量思考后,我无法想出如何将此“堆栈”信息从一个页面传递到另一个页面的解决方案。
我将不胜感激任何建议(框架或解决方案)。
PS。如果您需要一些源代码,只需编写,我会尽快将其发布在这里,但我认为这个问题更多的是关于一个想法和一般解决方案,而不是为我的特定代码制定一些解决方案。
PS2。问题还在于我不知道需要多少层关联,因此需要一些通用的解决方案。
Johnnnie
Hello
I am developing web application using Spring 3.0, Hibernate and JSP pages as a view technology. And I am stuck on the problem of linking pages together.
Here is the situation:
I do have simple jsps up and running for adding, editing (same form) and displaying all elements (using datatables). So far everything works as I am only accesing the grid with all records from index page, from where I can open an edit page (back button just links to the grid and a controller method for adding points to grid also).
But I do have some records connected:
- requisition
- resolution
- appelation
Obviously I can display each of those on their own as well as edit. But each requisition has list of associated resolutions (so when you display a resolution update form, grid with associated resolutions should be present) and you should be able to open edit form for picked resolution where situation repeats with appelations for the resolution. Problem is that I would like to have "back button" on each edit form which would take you "one step back" (sort of a stack).
After several hours of coding and lot of thinking I was not able to come up with the solution how to pass this "stack" info from one page to another.
I would be thankful for any advice (either framework or solution).
PS. If you need some source code just write and I will post it here ASAP but I consider this question more to be about an idea and general solution than crafting some solution for my particular code.
PS2. Problem also is that I do not know how many layers of associations will be needed so some general solution is needed.
Thank you for you advice and patience.
Johnnnie
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
让我们讨论一下 portlet,认为您正在使用 portlet。 portlet 的索引 JSP 将以
And 开头,位于控制器内
Lets talk about portlets thinking you are working with portlets. The index JSP of your portlet will start with
And within your controller