带参数的 Portlet 页面导航 - Spring MVC、WebSphere Portal 和JSR 286

发布于 2024-08-23 15:59:40 字数 585 浏览 4 评论 0原文

这是场景: 我们有一个在 Webphere Portal Server 6.1 和 Spring MVC 上运行的应用程序。有一个带有单个 portlet 的页面,显示了充满记录的网格。单击其中一个记录后,它必须导航到驻留在不同页面上的另一个 portlet(甚至可能是同一门户服务器上的不同 portlet 应用程序)并显示该特定记录。

问题如下: 我读到,通过使用 Portal 2.0 的“公共渲染参数”,您可以在 portlet 之间共享数据 - 这应该可以解决我的大部分问题。问题是,我无法找到使用 Spring MVC 时它是如何工作的。我在 Spring MVC 技术文档中找不到对“公共渲染参数”的引用,但有些人说他们可以使用它。有人可以具体向我展示有关此问题的详细文档在哪里,或者给我一个示例的小代码片段,以显示如何在我的控制器类中访问这些公共渲染参数?另外,如果有更好的方法在我的环境中实现这一目标,它是什么以及在哪里可以找到示例?请不要回答“如果您需要这样做,则不应使用门户”或“如果您使用 XYZ 技术,那么您可以这样做或那样做” ”。我无法改变环境 - 它就是这样 - 我只需要让它发挥作用! :) 谢谢!

Here is the scenerio:
We have an application running on Webphere Portal Server 6.1 and Spring MVC. There is a page with a single portlet that shows a grid full of records. Once one of those records is clicked, it must navigate to another portlet that resides on a different page - possibly even a different portlet application on the same portal server - and display that specific record.

Here's the question:
I've read that, through the use of Portal 2.0's "Public Render Parameters", you can share data between portlets - and that should solve most of my problems. The trouble is, I cannot find how that works when using Spring MVC. I can't find a reference to "Public Render Parameters" in the spring MVC technical documentation, yet some people have said they have it working. Can someone show me specifically where the detailed documentation on this is, or give me small code snippit of an example that shows how I can access these public render parameters in my controller classes? Also, if there is a better way to achieve this in my environment, what is it and where can I find an example? Please don't answer with, "If you need to do this, you shouldn't be using a portal" or "If you use XYZ technology instead, then you can do this and that". I cannot change the environment - it is what it is - I just need to make it work! :) Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

累赘 2024-08-30 15:59:40

您可以像使用自己的渲染参数一样使用公共渲染参数
渲染参数。您只需在 portlet.xml 中声明它们即可。
请注意,您不允许拥有公共渲染参数
与“私有”渲染参数同名。

您只需将类似这样的内容添加到您的 portlet.xml:

<public-render-parameter>
      <identifier>myParam</identifier>
      <qname xmlns:x="http://sun.com/params">x:myParam</qname>
</public-render-parameter>

并将以下行添加到您的 portlet 描述符:

<portlet>
      . . .
     <supported-public-render-parameter>myParam</supported-public-render-parameter>
</portlet>

然后,您可以在所有 portlet 描述符中具有此条目的 portlet 中对“myParam”使用常规 getRenderParameter 调用。

欲了解更多信息:
http://blogs.oracle.com/deepakg/entry/jsr286_public_render_parameter_feature

You can use public render parameters in the same way as you use your own
render parameters. You just have to declare them in your portlet.xml.
Just be aware that you are not allowed to have public render parameters that
have the same name as "private" render parameters.

You only need to add something like this to your portlet.xml:

<public-render-parameter>
      <identifier>myParam</identifier>
      <qname xmlns:x="http://sun.com/params">x:myParam</qname>
</public-render-parameter>

and add the following line to your portlet descriptor:

<portlet>
      . . .
     <supported-public-render-parameter>myParam</supported-public-render-parameter>
</portlet>

Then you can use the regular getRenderParameter calls for "myParam" in all portlets that have this entry in their portlet descriptor.

For more information:
http://blogs.oracle.com/deepakg/entry/jsr286_public_render_parameter_feature

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文