问题标签 [portletbridge]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
69 浏览

java - 什么是 getServletContextLocal() 和 getServletContextProvider()

在我阅读的教程中,我遇到了 getServletContext() 但这两个是什么?
这就是这条线的样子:

这与以下有何不同:

0 投票
1 回答
310 浏览

ajax - Liferay portlet issue with Richfaces 4.2 and PortletBridge 3.1

We have an application with numerous portlets for Liferay 6.0.6 using JSF1.2 with RichFaces 3.3.3.Final and PortletBridge 2.1.1 and everything was working fine. We decided to upgrade our stuff to JSF2 with RichFaces 4.2.3.Final and PortletBridge 3.1.2. Everything seemed to be fine until we tried to use some ajax-enabled command buttons (a4j:commandButton or h:commandButton with f:ajax) for navigation: in that case the portlet does the navigation but the whole Liferay screen disappears and only the JSF components remain on screen. If we try to use some navigation again, it'll soon fail (after 1-3 tries) with this exception:

It also logs some interesting things like this:

UPDATE: After some digging we realized it's quite a bad practice to use ajax for navigation (even if it worked with JSF1.2 and RichFaces 3.3), so changed our templates to avoid this everywhere. And also changed from JBoss PorletBridge to Liferay's own Faces Bridge and it seems to work fine. All the exceptions above is gone and the navigation works as it should.

0 投票
1 回答
384 浏览

liferay - Liferay/Icefaces portlet 不允许在 doView 方法中访问

我对 doView() 方法的访问有疑问。我使用 Liferay 6.3 作为 CMS、ICEFACES 3.3.0 和 tomcat 7 编写了一个 portlet。我使用了liferay-faces-bridge以便在 Liferay 中使用 Icefaces 框架。出于这个原因,我以这种方式设置了 portlet.xml:

我也有一个这样的 ManagedBean(用于业务逻辑):

问题是当portlet 启动时doView() 方法没有被调用。也许这是一个桥梁问题。我不知道。

我希望有一个人可以帮助我。

谢谢

0 投票
1 回答
721 浏览

jsf - Websphere 中 JSF 2.0 驱动的 portlet - 如何实现 commandLinks

我知道如何创建 JSF 2.0 servlet,也知道如何创建 portlet,但是我在结合这两种技术时遇到了问题。我的 JSF portlet 运行良好,直到我必须通过<h:commandLink />. 当我单击这些链接时,当前页面会重新加载,并且不会调用任何方法。我认为我的应用程序需要一些额外的配置。为了使这样的命令链接正常工作需要做什么:

请注意,我正在使用一个 WebSphere 8 门户服务器,它提供了一个 JSF 2.0 portlet 桥。

编辑

我在这里看到一个基本的冲突:

  • portlet API 负责生成 URL - 生成有效的门户 URL
  • JSF 负责生成 URL - 生成有效的 JSF-URL

我的托管 bean 是使用注释配置的:

这是我的 faces-config.xml

0 投票
1 回答
217 浏览

jsf-2 - WAS Liberty Profile JSF2 portlet

如何为 WebSphere Liberty Profile 开发 JSF 2.0 portlet?似乎他们忘记了提供一个 portlet 桥接器。我尝试使用 WAS 完整配置文件中的 com.ibm.faces20.portlet.FacesPortlet,但这不起作用。此外,我尝试使用一些通用的 portlet 桥,但也没有成功。

0 投票
1 回答
1232 浏览

jsf - 为什么 Liferay Faces 不处理 JSF portlet 操作事件?

我在尝试使用 Liferay Faces 以及任何 JSF 组件来触发动作事件时遇到问题。

我已经完成了 Liferay 的开发 JSF Portlets指令页面的第一部分,直到(但不包括)成功国际化 JSF Portlets 部分。我继续并添加了一些其他 JSF 组件,也取得了一些成功,但是,事件不起作用。

此示例的目标是有一个文本框,用户可以在其中更改“World”的默认文本,并且文本区域将在每次击键时通过 AJAX 更新“Hello, XXX”(其中 XXX 是框中的文本)。是的,在一个单独的 JSF 项目中,我尝试了 view.xhtml 和 TestBean.java 并且它可以工作。

在 Liferay 门户中,portlet 显示出来,当我键入时,我得到了一个回发到服务器的信息。DebugPhaseListener 只导致 BEFORE/AFTER RESTORE_VIEW 1 和 BEFORE/AFTER RENDER_RESPONSE 6。两者之间没有阶段,我认为这表明存在问题。(注意:Liferay Faces Portlet 桥接 Portlet 生命周期事件并模拟 JSF 生命周期。)

我正在使用 Liferay 6.2,在 Eclipse Luna 中运行,带有 Liferay 最新的 Tomcat 包和来自 Liferay 更新站点的最新 eclipse 插件。Java 1.7.0_71。

以下是我认为与弄清楚发生了什么相关的所有资产和代码。您可以提供的任何帮助将不胜感激。

视图.xhtml:

TestBean.java

portlet.xml

liferay-portlet.xml

按下每个键的调试输出:

0 投票
2 回答
2965 浏览

jsf - Redirect after p:remoteCommand not working

I'm having problem with redirecting user to homepage after some action. I have searched stackoverflow and found many solutions, especially from @BalusC, but neither of them worked for me.

pageA - remoteCommand:

pageA - submit button that calls modal dialog for signing content

After user click commandButton there is some data logic that is being run in bean, modal dialog is called with its own bean, and from there p:remoteCommand is called:

h:message in view.xhtml:

Long story short - when user press the submit button (that calls dialog), modal dialog pops up, user click submit button again, there is some logic to be processed and then remoteCommand is called and pop up is closed. That's the moment when redirect should be done but nothing happens after pop up is closed, just error:

There is no action, I'm not sure why is URL null?

EDIT - CONFIGURATION:

Liferay 6.2 CE GA3
Primefaces 5.2
Liferay Faces 3.2.5-ga6

0 投票
1 回答
36 浏览

richfaces - Richfaces错误页面重定向与gatein,jboss 5.1.0 ga portlet桥罐和我的错误

我知道有很多关于相同/相似主题的类似问题,但我无法将任何解决方案应用于我的问题。

每当在呈现 portlet 页面时捕获到异常时,我想将用户重定向到自定义错误页面。为什么在渲染页面时抛出异常?这是因为我们在后台抛出它是为了给用户一些有用的信息,这样设计并且不会很快改变,所以我的意图是保持这种方式。

我相信如果我给出例子会更好: 这是一个简单的 portlet,我提供使用名称并按“>>”按钮以获取有关该用户的一些信息,在以前的实现中它的工作正常,请参见第二张图片..

在此处输入图像描述

第二张图:

正如您所看到的布局是正确的""(这是它的外观)错误页面只是简单地将 portlet 内容替换为它自己的内容以及为什么我们无法获得有关用户的任何信息的错误消息。到目前为止,一切都很好。

在此处输入图像描述

现在让我们看一下问题案例:我们已经从 jboss 4.2.3 ga 升级到 5.1.0 ga,现在 GateIn 开始发挥作用。还有一些旧的 jar 用来创建这个 portlet 视图,现在它们都升级到了新的。如:

Gatein 本身使用 jsr168 兼容的 jars + 我们有 jsf 1.2 版本(此版本使用标签)。

问题案例:如您所见,我们想要获取一些用户信息的 portlet 被破坏并合并到域详细 portlet 中。看起来像汤。

产生这种混乱的代码也属于我们。它曾经正常工作,但现在它以某种方式破坏了整个布局。

在此处输入图像描述

让我向您展示呈现视图的代码:

在这段代码中,可以看到有super.renderView(context, viewToRender);

它一直到服务并进行服务调用。服务调用返回此用户在 DB 中没有信息的异常。并且这个异常在路上被转换成 FacesException(我们正在做)。

问题不是异常,也不是将其转换为 FacesException。

问题出现在这部分

据我们调试。我们相信由于异常而部分呈现的旧视图不能用错误视图替换。

但是,如果它以前可以正常工作,该怎么办。我们没有更改这部分代码。

这些信息是否足以引发有关问题的想法?你们需要更多细节吗?你认为我们在这里做错了什么?

感谢和问候

0 投票
1 回答
430 浏览

java - 获取在 IBM websphere 门户 8.0 上运行的发布数据 JSR-286 portlet

我有一个在 IBM Websphere Portal 8.0 上运行的 JSR-286 portlet 此 portlet 在以下友好 url 下发布:http://myServer/wps/portal/mySite/menu/my-portlet-friendly-url

在另一台服务器(和域)中有一个外部页面,它想要将 POST 数据发送到我的 portlet。

例如,想象一下这种情况:

外部页面http://www.externalServer.com/externalPage.html

然后,我想在我的 portlet 中读取“externalParam”(“valueExternalParam”)的值。

0 投票
1 回答
455 浏览

pdf - Portlet 应用程序/pdf 不是受支持的 mime 类型错误

我正面临这个错误 - “应用程序/pdf”不是受支持的 mime 类型。我正在尝试将 p:editor 的内容保存为 pdf 到我的本地机器。

进口

功能

在以下精彩帖子之后:https ://forum.primefaces.org/viewtopic.php?f=3&t=21342&p=170835#p170835

请帮忙 !

编辑 - - - - - - - - -

如果我使用 mime 类型作为图像/jpg,那么我也会收到相同的错误。问题看起来像别的东西。谁能给我指点一下。