Foren

Facing problem with <liferay:renderURL>/<liferay:actionURL>

Arun Meriyala, geändert vor 13 Jahren.

Facing problem with <liferay:renderURL>/<liferay:actionURL>

Junior Member Beiträge: 29 Beitrittsdatum: 20.01.11 Neueste Beiträge
Hi All,

I am having two tabs(Welcome,Billing). Welcome tab consists of generic portlets and Billing tab consists of one portlet and this portlet will call another portlet based on the roles assigned to the user. I am using an hyper link in order to call the child portlet by using the below code:

1. <A href="<liferay:renderURL portletName="adminBill_WAR_adminBillportlet" portletMode="view" windowState="maximized">
</liferay:renderURL>"> Admin Bill Info</A>
<br></br>
2. <a href="<liferay-portlet:actionURL portletName="adminBill_WAR_adminBillportlet" portletMode="view" windowState="maximized">
</liferay-portlet:actionURL>">Bill Info</a>

The value of portletName attribute is the calling portlet(It is not instanceble). When i click on this i am getting a blank page.

Request to give any suggestions where i am making mistake.

Thanks in advance.

Regards
Arun
thumbnail
David H Nebinger, geändert vor 13 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
Could be a typo, I guess, but are you really using double quotes everywhere? You should have a mix of single and double quotes, no?
thumbnail
Juan Gonzalez P, geändert vor 13 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Are there any error on logs?

Have VIEW permission on AdminBillPortlet?

Is adminBillPortlet instanceable? If so you'll have to change portletName.

Is adminBillPortlet in other page? Is so you'll have to set plid attribute.

Is adminBillPortlet added to a page? If itsn't, you'll have to set <add-default-resource/> tag in liferayl-portlet.xml to true.
Arun Meriyala, geändert vor 13 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL> (Antwort)

Junior Member Beiträge: 29 Beitrittsdatum: 20.01.11 Neueste Beiträge
Hi Juan,

1. There is no errors on log.
2. Yes, i gave view permissions to all roles.
3. No, I made adminBillPortlet uninstanceable, by <instanceable>false</instanceable>
4. No. this portlet will be displayed only when the user clicks on the link.Even I tried with
<A href="<liferay:renderURL plid="11127" portletName="adminBill_WAR_adminBillportlet" portletMode="view" windowState="maximized"></liferay:renderURL>"> Admin Bill Info</A>

<a href="<liferay-portlet:actionURL plid="11127" portletName="overview_WAR_overviewportlet_INSTANCE_Fg7v" portletMode="view" windowState="maximized"></liferay-portlet:actionURL>">Bill Info</a>

5. Not able to understand the point. Can you give me more details regarding this.


Thanks in advance.

Regards
Arun.
thumbnail
Juan Gonzalez P, geändert vor 13 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>

Liferay Legend Beiträge: 3089 Beitrittsdatum: 28.10.08 Neueste Beiträge
Arun Meriyala:
Hi Juan,
5. Not able to understand the point. Can you give me more details regarding this.


What I asked is if the portlet was added to any page, or is a portlet used by other portlets only. If not, you'll have to set that attribute in liferay-portlet.xml to make that portlet available even if isn't added to any page.

Another point, the best way to set "maximized" window state value is with WindowState.MAXIMIZED.toString() method.
thumbnail
David H Nebinger, geändert vor 13 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
Arun Meriyala:
4. No. this portlet will be displayed only when the user clicks on the link.Even I tried with
<a href="<liferay:renderURL plid=" 11127" portletname="adminBill_WAR_adminBillportlet" portletmode="view" windowstate="maximized">"&gt; Admin Bill Info</a>



Seriously, Arun, I don't think you should be mixing single and double quotes this way...

Try something like:
<a href="<liferay:renderURL plid=&quot;11127&quot; portletName=&quot;adminBill_WAR_adminBillportlet&quot; portletMode=&quot;view&quot; windowState=&quot;maximized&quot;></liferay:renderURL>"> Admin Bill Info</a>


With your full use of double quotes everywhere, you're going to be stuck with fragments:

  • "<liferay:renderURL plid="
  • " portletName="
  • " portletMode="
  • " windowState="
  • "></liferay:renderURL>"


and it would be no wonder that things weren't working correctly...
thumbnail
Jay Trivedi, geändert vor 11 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>

Regular Member Beiträge: 109 Beitrittsdatum: 24.11.12 Neueste Beiträge
Hi David,
I want to call my action class to delete a database entry from searcontainer delete icon.
here is my code.


<liferay-ui:search-container delta="5" emptyresultsmessage="No-Record-Found-In-Database">
    <liferay-ui:search-container-results results="<%= FooLocalServiceUtil.getAll()%>" total="<%= FooLocalServiceUtil.getAll().size() %>" />
    
    <liferay-ui:search-container-row classname="com.test.model.Foo" keyproperty="fooId" modelvar="foo">
   	 <liferay-ui:search-container-column-text name="fooId" value="<%= String.valueOf(foo.getFooId()) %>" />
    
   	 <liferay-ui:search-container-column-text name="companyId" value="<%= String.valueOf(foo.getCompanyId()) %>" />
   	 
   	 <liferay-ui:search-container-column-text name="UserId" value="<%= String.valueOf(foo.getUserId()) %>" />
   	 
   	 <liferay-ui:search-container-column-text name="companyName" value="<%= String.valueOf(foo.getUserName()) %>" />
   	 
   	 <liferay-ui:search-container-column-text>
	   		 	
	[color=#f72e2e]   	<liferay-ui:icon image="edit" message="edit"></liferay-ui:icon> 
	   	<liferay-ui:icon image="delete" onclick="<%= deleteActionURL%>" message="delete"></liferay-ui:icon>[/color]
	   	   	
   	</liferay-ui:search-container-column-text>
   	 
 	 
	 </liferay-ui:search-container-row>
    <liferay-ui:search-iterator />

</liferay-ui:search-container>


I dont know why but its not working can u give me hint or any other alternate i don't want to redirect this to another jsp page.
thumbnail
Raju OO7, geändert vor 13 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>

Regular Member Beiträge: 239 Beitrittsdatum: 27.04.10 Neueste Beiträge
so u are having two pages PAGE-1 and PAGE-2

PAGE-1 has PORTLET-1 & PAGE-2 has PORTLET-2

PORTLET-1 has a link which calls PORTLET-2, right?

Go to Look and Feel of PORTLET-1 and, there u can see "Link Portlet URLs to Page", Choose PAGE-2 as the target then save it.

if the portlet instance name is correct it will call second page and open the particular portlet instance.

refer this link to know how to create links to another portlet
Arun Meriyala, geändert vor 13 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL> (Antwort)

Junior Member Beiträge: 29 Beitrittsdatum: 20.01.11 Neueste Beiträge
Hi,

My Requirement is as below:

There are three tabs named as Welcome, User Information and WorkInformation.
1.Welcome page consists of portlets Overview and sign In portlets.
2.User Information page consists of "Bill Information" portlet. Now when user clicks on Bill Information from menu tab(User Information->Bill Information) it will display a portlet with a link as "Admin Bill Info". When user clicks on it, it has to display "Admin Bill Information" portlet on the same page i.e. User Information->Bill Information.

Presently i am getting a blank page.

Please check the attached screen shots of my requirement.
thumbnail
Raju OO7, geändert vor 13 Jahren.

RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>

Regular Member Beiträge: 239 Beitrittsdatum: 27.04.10 Neueste Beiträge
initially admin-bill-information portlet is not there in user information page, right?

i think u have to follow what Juan Gonzalez P is suggesting..

put this code in liferay-portlet.xml of admin-bill-information portlet


	
		<add-default-resource>true</add-default-resource>
	


then in bill-information portlet u create a liferay-portlet:renderURL

in my case i used
<liferay-portlet:renderurl var="linkURL" portletName="DocumentLibraryExternal_WAR_DocumentLibraryExternalportlet" portletMode="view" windowState="maximized" />
<a href="<%= linkURL%>">link to document portlet </a>