留言板

processAction method invocation problem from php page in PHPPortlet

Ravi Kumar,修改在16 年前。

processAction method invocation problem from php page in PHPPortlet

New Member 帖子: 6 加入日期: 08-1-22 最近的帖子
Hi,

We are facing problem to invoke processAction() method from php page in phpportlet

In general the following syntax is used to call processAction() method from a JSPPortlet.

-----------------------------------Sample JSP Action process invocation-------------------

<form action="<portlet:actionURL></portlet:actionURL>" method="post">
<input type="submit" value="Submit" />
</form>
-------------------------------------------------------------------------------------------------

The above syntax works fine incase of JSP Portlet to call processAction() method. But when trying to use the same syntax in PHP page, it is going render method of PHPPortlet always. Following is sample PHP code

---------------------------------------PHP Page code ----------------------------------------
<?php
echo 'PHP DEMO PORTLET';
echo '<br>';
echo '<a href="http://localhost:8080/group/guest/1?p_p_id=phpportlet_WAR_phpportlet&p_p_action=1">Invoke processAction() Method of PHPPortlet </a>';
// The above href url is string of <portlet:actionURL></portlet:actionURL>
echo '<br>';
echo '<br>';
?>
--------------------------------------------------------------------------------------------------

I am using the follwoing version

liferay-portal-tomcat-5.5-jdk5-4.4.0

Please let me know if there is any additional configuration to be done to invoke process method of phpportlet.

Thanks in advance,
Ravi
thumbnail
Jorge Ferrer,修改在16 年前。

RE: processAction method invocation problem from php page in PHPPortlet

Liferay Legend 帖子: 2871 加入日期: 06-8-31 最近的帖子
Hi Ravi,

Note that the PHP integration tries to abstract the concepts associated with portlets from PHP developers. The reasoning is that it's targeted at users who are familiar with the PHP platform and want to keep using the same tools

To achieve this the URLs are automatically rewritten and converted into render URLs. The reason why action URLs are not used is because there won't be any changes in windowState, preferences or any state of the portal, and everything else can be done in the portal.

If this limitations do not match your case, it is also possible to create your own PHPPortlet based on the one provided by Liferay and keep the benefit from the Quercus integration.
thumbnail
leandro s smal,修改在15 年前。

RE: processAction method invocation problem from php page in PHPPortlet

New Member 帖子: 17 加入日期: 08-3-17 最近的帖子
Jorge,
Im made a php portlet and now i require to make some links like users ->mysummaryPortlet , wikiArticles ->wikiPortlet ,is there a way to achieve that?
I mean links inside the php portlets are easy but with other portlets seems quite hard,almost impossible to achieve from php.
I think using some functionality from quercus i can instanciate for example the taglib:<liferay-portlet:renderURL> but i dont know how

Can you give me some feedback about it?
Thanks
thumbnail
Jorge Ferrer,修改在15 年前。

RE: processAction method invocation problem from php page in PHPPortlet

Liferay Legend 帖子: 2871 加入日期: 06-8-31 最近的帖子
Hi Leandro,

Probably your best option is to use friendlyURLs. The portlet spec does not provide any method to link from one portlet to another. Liferay has a custom taglib to do that, but Java taglibs cannot be used from PHP. If you have the time you can research using the renderResponse object find out if the is a way to cast it to Liferay's specific implementation class and use it to create the URL.
thumbnail
Michael Charles,修改在13 年前。

RE: processAction method invocation problem from php page in PHPPortlet

New Member 帖子: 15 加入日期: 11-1-20 最近的帖子
Any Update on this top since 2008?
thumbnail
Michele Zanarotti,修改在12 年前。

RE: processAction method invocation problem from php page in PHPPortlet

Junior Member 帖子: 94 加入日期: 12-2-20 最近的帖子
Hi.
I made a custom PhpPortlet and a PhpServletRequest to allow processing of ActionURL. But for now i have found no solutions for that.

Maybe passing a special code to the RenderRequest and force the portlet call the processAction with a brand new actionResponse ?

My aim is to create links to other portlets, but the most important thing is to send event as specified in
the 'Inter Portlet Communication' documentation between portlets. If I cannot access the ActionRequest/Response, there's
some other way to generate such inter portlet event without those Action objects ?
Bruno Lima,修改在9 年前。

RE: processAction method invocation problem from php page in PHPPortlet

Junior Member 帖子: 49 加入日期: 14-5-20 最近的帖子
Jorge Ferrer:
Hi Ravi,

Note that the PHP integration tries to abstract the concepts associated with portlets from PHP developers. The reasoning is that it's targeted at users who are familiar with the PHP platform and want to keep using the same tools

To achieve this the URLs are automatically rewritten and converted into render URLs. The reason why action URLs are not used is because there won't be any changes in windowState, preferences or any state of the portal, and everything else can be done in the portal.

If this limitations do not match your case, it is also possible to create your own PHPPortlet based on the one provided by Liferay and keep the benefit from the Quercus integration.



I'm trying to make a simple alert with a name that was typed from a form with a $_POST value and nothing happen!
I followed https://www.liferay.com/en/community/wiki/-/wiki/Main/PHP+Portlets and nothing happen.

My Quercus is ok...