Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
R charan
Liferay-ui Icon link not working
September 14, 2009 3:38 AM
Answer

R charan

Rank: Junior Member

Posts: 72

Join Date: October 28, 2008

Recent Posts

hi all,

i have developed a news portlet, i have the action menu in news_entry_action.jsp , the code is

 1 <%@ include file="/html/portlet/ext/News/init.jsp" %>
 2<%
 3ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
 4News news = (News)row.getObject();
 5%>
 6<liferay-ui:icon-menu>
 7                                <portlet:renderURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="viewURL">
 8                                <portlet:param name="struts_action" value="/ext/News/displayNews" />
 9                                <portlet:param name="redirect" value="<%= currentURL %>" />
10                                <portlet:param name="newsId" value="<%= String.valueOf(news.getNewsId()) %>" />
11                                </portlet:renderURL>
12                                <liferay-ui:icon image="view" url="<%= viewURL %>" />
13
14                                <portlet:renderURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="editURL">
15                                <portlet:param name="struts_action" value="/ext/News/editNews" />
16                                <portlet:param name="redirect" value="<%= currentURL %>" />
17                                <portlet:param name="newsId" value="<%= String.valueOf(news.getNewsId()) %>" />
18                                </portlet:renderURL>
19                                <liferay-ui:icon image="edit" url="<%= editURL %>" />
20</liferay-ui:icon-menu>


You can see from the image that every thing is appearing fine even the url for view and edit are valid, but i could not able to click the options. No action is being performed.( I think it might be error in javascript because if i keep url as a normal string , then it is navigating to the page name)

When i keep mouse on 704 ID edit option , the following is the url appears
1
2javascript:%20submitForm(document.hrefFm,%20'http%3A%2F%2Flocalhost%3A9090%2Fweb%2Fguest%2Fhome%3Fp_p_id%3DNEWS%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26_NEWS_struts_action%3D%252Fext%252FNews%252FeditNews%26_NEWS_redirect%3D%252Fweb%252Fguest%252Fhome%253Fp_p_id%253DNEWS%2526p_p_lifecycle%253D1%2526p_p_state%253Dmaximized%2526p_p_mode%253Dview%2526_NEWS_struts_action%253D%25252Fext%25252FNews%25252FsetNews%2526_NEWS_userId%253D11102%26_NEWS_newsId%3D704');


Even i tried individually also by coding like this ..
1
2<liferay-security:permissionsURL
3modelResource="<%= News.class.getName() %>"
4modelResourceDescription="news"
5resourcePrimKey="<%= Long.toString(news.getNewsId()) %>"
6var="permissionsEntryURL"
7/>
8<liferay-ui:icon image="permissions" url="<%= permissionsEntryURL %>" />


then also same problem , no action is performed on clicking, Any body went through this problem or any body know what is the solution ..

thanks in advance,
charan.
Attachment

Attachments: news.png (17.6k)
Ravi Muppidi
RE: Liferay-ui Icon link not working
October 8, 2009 9:52 PM
Answer

Ravi Muppidi

Rank: New Member

Posts: 9

Join Date: September 3, 2009

Recent Posts

Hi Charan,

Are you getting any error? If so Tell me the error.

Do little modification .....
Remove the below tag inside <portlet:renderURL tag. and try it.

<portlet:param name="redirect" value="<%= currentURL %>" />

Because if "currentURL" contains any url it will redirect to that page.


Thanks

Ravi
R charan
RE: Liferay-ui Icon link not working
September 14, 2009 9:20 PM
Answer

R charan

Rank: Junior Member

Posts: 72

Join Date: October 28, 2008

Recent Posts

hi ravi,

i have tested with removing that line also, but not working (same result)


Thanks in advance,
charan
Ravi Muppidi
RE: Liferay-ui Icon link not working
September 14, 2009 10:11 PM
Answer

Ravi Muppidi

Rank: New Member

Posts: 9

Join Date: September 3, 2009

Recent Posts

In the same situation we are not getting any error. working finely.

What is the error or exception u facing?
Liferay version?


-Ravi
R charan
RE: Liferay-ui Icon link not working
September 14, 2009 10:35 PM
Answer

R charan

Rank: Junior Member

Posts: 72

Join Date: October 28, 2008

Recent Posts

hi ravi,

no exception or error. Nothing is performed when i click an option in menu, (version 5.1.1)

thanks ,
charan
Jay Trivedi
RE: Liferay-ui Icon link not working
November 29, 2012 9:49 PM
Answer

Jay Trivedi

Rank: Regular Member

Posts: 107

Join Date: November 23, 2012

Recent Posts

Hi,
I am having similar problem with little modification, when i click on my delete icon i want a scriptlet to run on same page that deletes the record, But its deletes all the records.
Can we get clickEvent of confirmation on delete icon.
Guide me.

Thanks in advance.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!