Portlet的URL生成从阿贾克斯的Servlet [英] Portlet URL Generation From AJAX Servlet

查看:100
本文介绍了Portlet的URL生成从阿贾克斯的Servlet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想修改的portlet加载数据超过AJAX的表,因为WS调用需要很长时间才能完成一个可笑的金额。表基本上是与每个表行的一个条目,并在每一行中,以更详细的信息的条目的链接的概述

I am trying to modify a portlet to load data for a table over AJAX because the WS calls take a ridiculous amount of time to complete. The table is basically an overview with one entry per table row and a link in each row to more detailed information on the entry.

下面是我的我目前正在创建的URL为表中的每一行:

Here is how I am currently creating the URLs for each row in the table:

<portlet:renderURL portletMode="VIEW" windowState="maximized" var="showURL">
    <portlet:param name="id" value="${entry.ID}"/>
</portlet:renderURL>

我已经创建了一个AJAX servlet来接收AJAX调用和返回,这将动态使用jQuery的回调被添加到表JSON。该servlet工作正常,并且各行添加到表中,没有真正的问题。目前我遇到的问题是应在表中的链接。

I have created an AJAX servlet to receive the AJAX calls and return JSON which will be added to the table dynamically using jQuery callbacks. The servlet works fine and the rows are added to the table with no real problems. The problem I am having is currently with the links that should be in the table.

我的问题是我怎么模仿上面的JSP code在servlet生成正确的Portlet URL?!?!我是一个有点新的portlet和他们的网址似乎是胡言乱语的序列化烂摊子给我。

My question is how do I mimic the above JSP code in the servlet to generate the correct portlet URLs?!?! I'm a bit new to portlets and their URLs seem to be a serialized mess of gibberish to me.

推荐答案

看看<一href="https://www.ja-sig.org/svn/uPortal/tags/rel-3-2-0-RC2/uportal-war/src/main/webapp/WEB-INF/flows/portlet-manager/listChannels.jsp"相对=nofollow>这个JSP页面对于如何做到这一点的一个例子 - 一个很好的方法,反正。看看附近的页面顶部的 editPortletUrl 的定义,然后再看看它是如何以后使用。

Take a look at this JSP page for an example of how this is done -- one good method, anyway. Look at the definition for editPortletUrl near the top of the page, then look at how it's used later.

有一个 PORTLETID 标记嵌入在URL中,这就是后来由JS一个真正的价值代替。

There's a PORTLETID token embedded in the URL, which is later replaced with a real value by JS.

此portlet使用补液,我建议非常的强大,可访问的,higher-基于jQuery为了部件。

This portlet uses Fluid Infusion, which I recommend highly for powerful, accessible, higher-order widgets based on jQuery.

布赖恩说

感谢您的想法。我试图做你有什么,但我没有看到JS如何能够子真正的ID为占位符。使用的renderURL我得到这个在JS:

Thanks for the idea. I tried doing what you had but I don't see how the JS will be able to sub the real ID for the placeholder. Using renderURL I get this in the JS:

var baseShowUrl = "/wps/myportal/portalname/!ut/p/c5/hY7NCoJAFEafpSe4X_Pf0hJ0Sied6M9NCEVIWS2ioqdvwo2b6H7LczhcqijsUj-aY31vrpf6TFuq9C52yJ32DAZCworYz_V0DIDRqq1fTdu8D_tOFUra0oqgZoKD-VLabBpzQPXVDVWqV9UjE6qFzGcmD1XQ-vtHz0jSQgVjmXnr5xxm2HH8uAgdnyRRKnQGJJpJMCcXLI9WSLj6wwW59Noe6NYafjr59BkNBh8sH-CA/dl3/d3/L0lDU0NsQ1FvS1VRIS9JSFNBQ0l3a1FBd3FibTZtLzRDMWI5WUF4RW1TUVVnZyEvN19ETjBNTjdSMjA4MDQ1MEk0RFJPN0pCMDAwMi92aWV3L0NPTlRSQUNUSUQ!/";

这是德鲁·威尔斯的更新

你能告诉我你是如何或标记?

Could you show me how your or tag?

这篇关于Portlet的URL生成从阿贾克斯的Servlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆