获取显示标签以使用操作 URL 进行页面切换

发布于 2024-09-16 17:01:45 字数 923 浏览 4 评论 0原文

我正在尝试在带有 DisplayTag 1.2 的 JSR-286 portlet 中使用外部分页。

我希望 DisplayTag 从我定义的参数化操作 URL 生成分页链接,但我似乎无法做到这一点。

下面是我的 JSP 中的代码:

<portlet:actionURL var=actionUrl >
<portlet:param name="someParam" value="someValue" >
</portlet:actionURL >

<display-el:table id="personsTable"
                  name="${portletSessionScope.persons}"
                  requestURI="${actionUrl}"
                  partialList="true"
                  size="${portletSessionScope.total}"
                  pagesize="${portletSessionScope.pageSize}" >

<display-el:column property="firstName"/ >


</display-el:table >

通过上面的代码,显示标签看起来会忽略提供的 ${actionUrl} 并生成默认的渲染 URL。生成的链接工作正常(我可以在页面之间移动),但由于我的 portlet 需要一个操作请求来获取其他页面的数据,因此会话中的列表永远不会更新,并且表始终包含相同的数据,无论我在哪个页面选择。

有什么办法可以让我做到这一点吗? DisplayTag 支持我想要做的事情吗?

预先感谢您的帮助!

I'm trying to use external paging in a JSR-286 portlet with DisplayTag 1.2.

I would like DisplayTag to generate the paging links from a parameterized Action URL that i have defined, but i can't seem to make that work.

Here is the code in my JSP:

<portlet:actionURL var=actionUrl >
<portlet:param name="someParam" value="someValue" >
</portlet:actionURL >

<display-el:table id="personsTable"
                  name="${portletSessionScope.persons}"
                  requestURI="${actionUrl}"
                  partialList="true"
                  size="${portletSessionScope.total}"
                  pagesize="${portletSessionScope.pageSize}" >

<display-el:column property="firstName"/ >


</display-el:table >

With the above code, it looks like Display-tag ignores the provided ${actionUrl} and generates a default Render URL. The generated links work fine (i can move through pages), but since my portlet requires an Action request to fetch other pages of data, the list in the session is never updated and the table always contains the same data, regardless of which page i select.

Is there a way i might make that work? Does DisplayTag support what i'm trying to do?

Thanks in advance for your help!

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

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

发布评论

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

评论(1

我不会写诗 2024-09-23 17:01:45

在 JSP 中创建一个表单,并将表单名称作为表单属性值传递给 displaytag:table。这将调用您指定的操作 URL。

Create a form in your JSP and pass the form name to the displaytag:table as form attribute value. This will invoke the action URL that you have specified.

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