Forums de discussion

passing a parameter in the URL

thumbnail
asile elisa, modifié il y a 14 années.

passing a parameter in the URL

Regular Member Publications: 126 Date d'inscription: 17/02/10 Publications récentes
hi everyone,

I am tring to understand how in the entreprise Admin portlet we can assign a user to an organisation then a location.
well he opens an other window where he listed the location relative to one particular organisation.
this is how he open an other window but I did not get how he passed the organisationId as parameter in the URL:

<input class="portlet-form-button" type="button" value="<%= LanguageUtil.get(pageContext, &quot;select&quot;) %>" onClick="var locationWindow = window.open('

<portlet:renderURL 
windowState=" <%="LiferayWindowState.POP_UP.toString()" %>"&gt;
<portlet:param name="struts_action" value="/enterprise_admin/select_location" />


&amp;<portlet:namespace />parentOrganizationId=' + document.<portlet:namespace />fm.<portlet:namespace />organizationId.value,
 'location', 'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=680'); 
void('');
locationWindow.focus();"&gt;


thanks in advance
thumbnail
asile elisa, modifié il y a 14 années.

RE: passing a parameter in the URL

Regular Member Publications: 126 Date d'inscription: 17/02/10 Publications récentes
hi,

any one can help me with that:

&amp;<portlet:namespace />parentOrganizationId=' + document.<portlet:namespace />fm.<portlet:namespace />organizationId.value,
 'location', 
'directories=no,height=640,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=680');


I did not have a documentation of this method:window.open

thanks in advance
thumbnail
Amos Fong, modifié il y a 14 années.

RE: passing a parameter in the URL

Liferay Legend Publications: 2047 Date d'inscription: 07/10/08 Publications récentes
Hey Asile,

What you want to do is in select_location.jsp, when you click the location you want, have it execute a javascript function inside the original jsp that changes the value of the location variable.

A good example of this is in document library. When you edit a folder you can select the parent folder in a popup window.
thumbnail
asile elisa, modifié il y a 14 années.

RE: passing a parameter in the URL

Regular Member Publications: 126 Date d'inscription: 17/02/10 Publications récentes
hi,
thank you,
where can I have the library example?
Babu Janarthanan, modifié il y a 14 années.

RE: passing a parameter in the URL

Regular Member Publications: 128 Date d'inscription: 31/07/08 Publications récentes
you can find it in the portal source.

Action Classes: portal\portal-impl\src\com\liferay\portlet\documentlibrary
JSP's: portal\portal-web\docroot\html\portlet\document_library

you can also find the JSP's @ server location.