Jonas Yuan Vor 15 Jahren This is really helpful. Thank you, Eduardo! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Julio Camarero Vor 15 Jahren nice! thank you Eduardinho!! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jonatan Oyola Vor 15 Jahren I think It's a great feature.What happend when a portlet has got a friendly url mapper? Will it transform the url too? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Prabhpreet Singh Vor 15 Jahren Eduardo,Does this mean that by using this mechanism I can integrate internal Liferay's Portlets for e.g Articles, Journals, etc directly into non-Liferay portal based web applications?If yes, can you please provide a sample to use Article Portlet in a web application, lets say based on Zend framework?Regards,Prabhpreet Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Banji O Vor 15 Jahren Help I tried to run the code below. It is not going to my action class.var renderURL = Liferay.PortletURL.createRenderURL(); //renderURL.setWindowState('exclusive'); renderURL.setParameter('struts_action','/my/action/class'); renderURL.setParameter('cmd', classType); renderURL.setParameter('fromDate', _from_Date); jQuery.ajax( { data: data, url: renderURL.toString() } ); Can this be used with a class declared as follows?"public class ViewReportsAction extends PortletAction " Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Camilo Aguilar Banji O Vor 14 Jahren Hi Eduardo, I am playing with Liferay.PortletURL a lot but I am having troubles because I am not see which servlet is attending request's in this uri /c/portal/portlet_url. When I try: var portletUrl = new Liferay.PortletURL.createRenderURL(); portletUrl.setWindowState('pop_up'); portletUrl.setPortletMode('view'); portletUrl.setPortletId('58'); portletUrl.setParameter('struts_action', '/login/account/create'); portletUrl.setParameter('saveLastPath', '0'); //alert( "that is the url: " + portletUrl.toString() ); Liferay.Popup( { modal: true, url: portletUrl.toString(), width: 600 } );I am getting a lot of html code from server instead of portlet url +info: I am using Liferay 5.2.3 Community Edition Thanks ! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Camilo Aguilar Banji O Vor 14 Jahren Hi Eduardo, I am playing with Liferay.PortletURL a lot but I am having troubles because I am not see which servlet is attending request's in this uri /c/portal/portlet_url. When I try: var portletUrl = new Liferay.PortletURL.createRenderURL(); portletUrl.setWindowState('pop_up'); portletUrl.setPortletMode('view'); portletUrl.setPortletId('58'); portletUrl.setParameter('struts_action', '/login/account/create'); portletUrl.setParameter('saveLastPath', '0'); //alert( "that is the url: " + portletUrl.toString() ); Liferay.Popup( { modal: true, url: portletUrl.toString(), width: 600 } );I am getting a lot of html code from server instead of portlet url +info: I am using Liferay 5.2.3 Community Edition Thanks ! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
dennis monsewicz Vor 14 Jahren Is there a way to do this programmaticly?Like, if I wanted to do this using PHP. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Archi Madhu Vor 14 Jahren This is reallt greate!Thanks a lot! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Sultee khan Vor 13 Jahren Thanks.. Does this work in liferay 6? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Thiago Leão Moreira Sultee khan Vor 13 Jahren Hi Sultee,Two things you need to do on 6.0.1- you need to add the "liferay/portlet_url.js" to the list of javascripts on property "javascript.barebone.files"2 - you need to wrap the javascript code as followingvar faleConoscoURL;AUI().use("liferay-portlet-url", function(a) { faleConoscoURL = Liferay.PortletURL.createRenderURL(); faleConoscoURL.setParameter("page", $layout.getFriendlyURL()"); faleConoscoURL.setParameter("pageTitle", "$layout.getHTMLTitle($locale)");});Eduardo, correct me if I'm doing something wrong (I didn't like the way I created the url wrapped in that AUI function).Um abraço Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Oliver Dudas Thiago Leão Moreira Vor 13 Jahren Hi,I have a problem with the language part in the url.Normally I have an url: http://localhost:8080/cs/web/guest/something,but the Liferay.PortletURL.createRenderURL() generates the url without the language part:http://localhost:8080/web/guest/somethingWhen I fire the incorrect url, i get a response with this content:Failed to load source for: http://localhost:8080/web/guest/something, and then, Liferay, redirects me to the correct url:http://localhost:8080/cs/web/guest/something.Problem: when I submit the page with post method with the incorrect action url, Liferay redirects me to the correct url, but all my form parameters are lost Is there something I have missed? In the portlet_url.js I saw nothing about setting the language.Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Thiago Leão Moreira Sultee khan Vor 13 Jahren Hi Sultee,Two things you need to do on 6.0.1- you need to add the "liferay/portlet_url.js" to the list of javascripts on property "javascript.barebone.files"2 - you need to wrap the javascript code as followingvar faleConoscoURL;AUI().use("liferay-portlet-url", function(a) { faleConoscoURL = Liferay.PortletURL.createRenderURL(); faleConoscoURL.setParameter("page", $layout.getFriendlyURL()"); faleConoscoURL.setParameter("pageTitle", "$layout.getHTMLTitle($locale)");});Eduardo, correct me if I'm doing something wrong (I didn't like the way I created the url wrapped in that AUI function).Um abraço Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Oliver Dudas Thiago Leão Moreira Vor 13 Jahren Hi,I have a problem with the language part in the url.Normally I have an url: http://localhost:8080/cs/web/guest/something,but the Liferay.PortletURL.createRenderURL() generates the url without the language part:http://localhost:8080/web/guest/somethingWhen I fire the incorrect url, i get a response with this content:Failed to load source for: http://localhost:8080/web/guest/something, and then, Liferay, redirects me to the correct url:http://localhost:8080/cs/web/guest/something.Problem: when I submit the page with post method with the incorrect action url, Liferay redirects me to the correct url, but all my form parameters are lost Is there something I have missed? In the portlet_url.js I saw nothing about setting the language.Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Oliver Dudas Thiago Leão Moreira Vor 13 Jahren Hi,I have a problem with the language part in the url.Normally I have an url: http://localhost:8080/cs/web/guest/something,but the Liferay.PortletURL.createRenderURL() generates the url without the language part:http://localhost:8080/web/guest/somethingWhen I fire the incorrect url, i get a response with this content:Failed to load source for: http://localhost:8080/web/guest/something, and then, Liferay, redirects me to the correct url:http://localhost:8080/cs/web/guest/something.Problem: when I submit the page with post method with the incorrect action url, Liferay redirects me to the correct url, but all my form parameters are lost Is there something I have missed? In the portlet_url.js I saw nothing about setting the language.Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Pam Griffith Vor 13 Jahren Is there actual documentation for this anywhere? What is the difference between actionURL, renderURL, etc? What are the acceptable parameters for all of the set methods? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jakub Liska Vor 13 Jahren Guys I don't know how about you, but in current LR revision, there is no Liferay.PortletURL object in Liferay .... At least if I'm using it from within AUI sandbox, I don't have it there... Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jakub Liska Jakub Liska Vor 13 Jahren I see, it's a module : AUI().use('liferay-portlet-url', function(A) { ..... Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jakub Liska Jakub Liska Vor 13 Jahren I see, it's a module : AUI().use('liferay-portlet-url', function(A) { ..... Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
sri p Vor 12 Jahren Hi, I tried to use the createRenderURL() method in javascript, but it did not work.It is saying "Liferay.PortletURL is undefined"I really appreciate any help out here.the following are the things that I did to utilize liferay javascript methods :Liferay EE 6.0.11JBOSS 5.1portal-ext.properties :jdbc.default.jndi.name=jdbc/LiferayPoolmail.session.mail.pop3.host=localhostmail.session.mail.pop3.password=mail.session.mail.pop3.port=110mail.session.mail.pop3.user=mail.session.mail.smtp.auth=falsemail.session.mail.smtp.host=smtp-relay.cswg.commail.session.mail.smtp.password=mail.session.mail.smtp.port=25mail.session.mail.smtp.user=mystoremail.session.mail.store.protocol=pop3mail.session.mail.transport.protocol=smtpportlet.event.distribution=ALL_PORTLETSportlet.public.render.parameter.distribution=ALL_PORTLETSportlet.event.max.generation=3javascript.fast.load=falsetheme.css.fast.load=falsetheme.images.fast.load=false#### JavaScript#### Set a list of JavaScript files that will be loaded automatically in# /html/common/themes/top_js.jsp.## There are two lists of files specified in the properties# "javascript.barebone.files" and "javascript.everything.files".## As the name suggests, the barebone list is the minimum list of JavaScript# files required for most cases. The everything list includes everything# else not listed in the barebone list.## The two lists of files exist for performance reasons because# unauthenticated users usually do not utilize all the JavaScript that is# available. See the property "javascript.barebone.enabled" for more# information on the logic of when the barebone list is used and when the# everything list is used and how to customize that logic.## The list of files are also merged and packed for further performance# improvements. See the property "javascript.fast.load" for more details.### Specify the list of barebone files.## The ordering of the JavaScript files is important.## The Liferay scripts are grouped in such a way, that the first grouping# denotes utility scripts that are used by the second and third groups. The# second grouping denotes utility classes that rely on the first group, but# does not rely on the second or third group. The third grouping denotes# modules that rely on the first and second group.#javascript.barebone.files=\\## YUI core#\aui/yui/yui.js,\\## YUI modules#\aui/attribute/attribute.js,\aui/event-custom/event-custom.js,\aui/loader/loader.js,\aui/oop/oop.js,\\## Alloy core#\aui/aui-base/aui-base.js,\\## Liferay module definitions#\liferay/modules.js,\\## Liferay base utility scripts#\liferay/dependency.js,\liferay/events.js,\liferay/language.js,\liferay/liferay.js,\liferay/util.js,\\## Liferay utility scripts#\liferay/portal.js,\liferay/portlet.js,\liferay/portlet_sharing.js,\liferay/portlet_url.js--------- end of portal-ext.properties -------------------jsp file :<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%><%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet"%><%@ taglib uri="http://liferay.com/tld/aui" prefix="liferay-aui"%><!-- Common references --><jsp:include page="../../jsp/mystore.common.jsp" flush="true" /><script src="<%=request.getContextPath()%>/portlets/deliveryStatus/js/custom.js" type="text/javascript" charset="utf-8"></script> <portlet:defineObjects/><c:set var="namespace"><portlet:namespace/></c:set><script type="text/javascript"> var $jq = jQuery.noConflict(); $jq(document).ready(function(){alert ( " liferay url : "+ Liferay.PortletURL.createRenderURL()); }); // EOF ready functionalert ( " liferay url : "+ Liferay.PortletURL.createRenderURL()); </script>========== result==============Liferay.PortletURL is undefinedThank you in advance,Sri Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Dave Col Vor 12 Jahren Could you guys do everyone a favor and generate some actual documentation on this feature? Blog posts are not the way to do that. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Parkash Kumar Vor 11 Jahren Useful information about the Liferay JavaScript technique. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Piyush Ramani Vor 11 Jahren Really.. Very helpful information for directly use the value in javascirpts Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Piyush Ramani Vor 11 Jahren Really.. Very helpful information for directly use the value in javascirpts Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jeel Prajapati Vor 2 Monaten - Bearbeitet Hi , I tried to use to create the redner url AUI().use('liferay-portlet-url', function(A) { }); method in javascript In Liferay 7.3 SP3 DXP version, but it did not work. In the console it saying Uncaught Error: No inputNode specified. I really appreciate any help out here. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen