Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Arun Meriyala
Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 3, 2011 4:00 AM
Answer

Arun Meriyala

Rank: Junior Member

Posts: 29

Join Date: January 20, 2011

Recent Posts

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
David H Nebinger
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 3, 2011 10:25 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7237

Join Date: September 1, 2006

Recent Posts

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?
Juan Gonzalez
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 4, 2011 12:11 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1983

Join Date: October 28, 2008

Recent Posts

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
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 4, 2011 1:09 AM
Answer

Arun Meriyala

Rank: Junior Member

Posts: 29

Join Date: January 20, 2011

Recent Posts

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.
Sreeraj AV
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 4, 2011 1:57 AM
Answer

Sreeraj AV

Rank: Regular Member

Posts: 233

Join Date: April 26, 2010

Recent Posts

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
Juan Gonzalez
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 4, 2011 6:46 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1983

Join Date: October 28, 2008

Recent Posts

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.
Arun Meriyala
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 4, 2011 2:44 AM
Answer

Arun Meriyala

Rank: Junior Member

Posts: 29

Join Date: January 20, 2011

Recent Posts

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.
Sreeraj AV
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 4, 2011 3:49 AM
Answer

Sreeraj AV

Rank: Regular Member

Posts: 233

Join Date: April 26, 2010

Recent Posts

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


1   
2        <add-default-resource>true</add-default-resource>
3    </portlet>


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

in my case i used
1<liferay-portlet:renderURL var="linkURL" portletName="DocumentLibraryExternal_WAR_DocumentLibraryExternalportlet" portletMode="view" windowState="maximized" />
2<a href="<%= linkURL%>">link to document portlet </a>
David H Nebinger
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
March 4, 2011 6:49 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7237

Join Date: September 1, 2006

Recent Posts

Arun Meriyala:
4. No. this portlet will be displayed only when the user clicks on the link.Even I tried with
1<A href="<liferay:renderURL plid="11127" portletName="adminBill_WAR_adminBillportlet" portletMode="view" windowState="maximized"></liferay:renderURL>"> Admin Bill Info</A>



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

Try something like:
1<a href='<liferay:renderURL plid="11127" portletName="adminBill_WAR_adminBillportlet" portletMode="view" windowState="maximized"></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...
Jay Trivedi
RE: Facing problem with <liferay:renderURL>/<liferay:actionURL>
November 29, 2012 11:21 PM
Answer

Jay Trivedi

Rank: Regular Member

Posts: 104

Join Date: November 23, 2012

Recent Posts

Hi David,
I want to call my action class to delete a database entry from searcontainer delete icon.
here is my code.
 1
 2
 3<liferay-ui:search-container delta="5"  emptyResultsMessage="No-Record-Found-In-Database">
 4    <liferay-ui:search-container-results
 5        results = "<%= FooLocalServiceUtil.getAll()%>"
 6        total="<%= FooLocalServiceUtil.getAll().size() %>"
 7    />
 8   
 9    <liferay-ui:search-container-row
10        className="com.test.model.Foo" keyProperty="fooId"    modelVar="foo"
11    >
12        <liferay-ui:search-container-column-text
13            
14            name="fooId"
15                value="<%= String.valueOf(foo.getFooId()) %>"
16        />
17   
18        <liferay-ui:search-container-column-text
19            
20            name="companyId"
21                value="<%= String.valueOf(foo.getCompanyId()) %>"
22        />
23       
24        <liferay-ui:search-container-column-text
25            
26            name="UserId"
27                value="<%= String.valueOf(foo.getUserId()) %>"
28        />
29       
30        <liferay-ui:search-container-column-text
31            
32            name="companyName"
33                value="<%= String.valueOf(foo.getUserName()) %>"
34               
35        />
36       
37        <liferay-ui:search-container-column-text >
38                   
39    [color=#f72e2e]       <liferay-ui:icon image="edit" message="edit" ></liferay-ui:icon>
40           <liferay-ui:icon image="delete" onClick="<%= deleteActionURL%>" message="delete"></liferay-ui:icon>[/color]
41                  
42       </liferay-ui:search-container-column-text>
43       
44      
45     </liferay-ui:search-container-row>
46    <liferay-ui:search-iterator
47    />
48
49</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.