Fórum
How to bring out My account from dockbar to add portlet page
Taruna Notnani, modificado 9 Anos atrás.
How to bring out My account from dockbar to add portlet page
New Member Postagens: 8 Data de Entrada: 04/06/14 Postagens Recentes
Hi,
I am trying to bring out My Account portlet from dockbar to the add portlet page in liferay 6.2. Can anyone please help me with this.
Thanks in advance
I am trying to bring out My Account portlet from dockbar to the add portlet page in liferay 6.2. Can anyone please help me with this.
Thanks in advance
Malhar Shah, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
Junior Member Postagens: 41 Data de Entrada: 17/08/14 Postagens Recentes
So what is the problem?
Just drag and drop your portlet from dockbar to the portal page.
Just drag and drop your portlet from dockbar to the portal page.
Taruna Notnani, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
New Member Postagens: 8 Data de Entrada: 04/06/14 Postagens Recentes
Hi Malhar,
My Account portlet appears in the dropdown of the username in the dockbar. Our requirement is to bring out My Account from the dockbar to the add portlet page, so that when we select add portlet My Account should appear there in the list. Drag and drop wont work in this case.
My Account portlet appears in the dropdown of the username in the dockbar. Our requirement is to bring out My Account from the dockbar to the add portlet page, so that when we select add portlet My Account should appear there in the list. Drag and drop wont work in this case.
Devi Nimmagadda, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
New Member Postagens: 23 Data de Entrada: 05/07/13 Postagens Recentes
Hi Taruna Notnani,
Create one EXT plugin and in liferay-portlet-ext.xml --> do below steps:
1. copy the portlet name definition of my account portlet ( portlet-name =2) and paste this code in to the file :liferay-portlet-ext.xml (the above file) and remove the control panel entries from this file :
<control-panel-entry-category>my</control-panel-entry-category>
<control-panel-entry-weight>1.0</control-panel-entry-weight>
So your portlet will not be added in control panel now..
2. In your Liferay-display.xml --> add portlet name in and give your desired category name, so that it will be added in add application menu..
Create one EXT plugin and in liferay-portlet-ext.xml --> do below steps:
1. copy the portlet name definition of my account portlet ( portlet-name =2) and paste this code in to the file :liferay-portlet-ext.xml (the above file) and remove the control panel entries from this file :
<control-panel-entry-category>my</control-panel-entry-category>
<control-panel-entry-weight>1.0</control-panel-entry-weight>
So your portlet will not be added in control panel now..
2. In your Liferay-display.xml --> add portlet name in and give your desired category name, so that it will be added in add application menu..
Taruna Notnani, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
New Member Postagens: 8 Data de Entrada: 04/06/14 Postagens Recentes
Hi Devi Nimmagadda,
Thanks for the reply. When we create an ext, I guess there is no file like display.xml, So by Liferay display.xml file do you mean the display.xml file we have in the liferay bundle ? If not then please provide me the path of liferay display.xml file in an ext.
Regards
Thanks for the reply. When we create an ext, I guess there is no file like display.xml, So by Liferay display.xml file do you mean the display.xml file we have in the liferay bundle ? If not then please provide me the path of liferay display.xml file in an ext.
Regards
Mohammad Danish, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
Regular Member Postagens: 187 Data de Entrada: 05/03/12 Postagens Recentes
\liferay-portal-6.1.10-ee-ga1\tomcat-7.0.25\webapps\ROOT\WEB-INF\liferay-display.xml is the path.
You need to make an entry for portlet with id 2.
You need to make an entry for portlet with id 2.
Taruna Notnani, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
New Member Postagens: 8 Data de Entrada: 04/06/14 Postagens Recentes
Hi,
I have created an ext with the steps provided. In liferay-portlet-ext.xml the code is :
<?xml version="1.0"?>
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd">
<liferay-portlet-app>
<portlet>
<portlet-name>2</portlet-name>
<icon>/html/icons/my_account.png</icon>
<struts-path>my_account</struts-path>
<portlet-url-class>com.liferay.portal.struts.StrutsActionPortletURL</portlet-url-class>
<preferences-owned-by-group>true</preferences-owned-by-group>
<use-default-template>false</use-default-template>
<private-request-attributes>false</private-request-attributes>
<private-session-attributes>false</private-session-attributes>
<render-weight>50</render-weight>
<header-portlet-css>/html/portlet/users_admin/css/main.css</header-portlet-css>
<footer-portlet-javascript>/html/portlet/users_admin/js/main.js</footer-portlet-javascript>
<css-class-wrapper>portlet-users-admin</css-class-wrapper>
<add-default-resource>true</add-default-resource>
<system>false</system>
</portlet>
</liferay-portlet-app>
Also, in portel-ext.xml the code is:
<?xml version="1.0"?>
<!DOCTYPE resource-action-mapping PUBLIC "-//Liferay//DTD Resource Action Mapping 6.2.0//EN" "http://www.liferay.com/dtd/liferay-resource-action-mapping_6_2_0.dtd">
<resource-action-mapping>
<portlet-resource>
<portlet-name>2</portlet-name>
<permissions>
<supports>
<action-key>ADD_TO_PAGE</action-key>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>CONFIGURATION</action-key>
<action-key>VIEW</action-key>
</supports>
<site-member-defaults />
<guest-defaults />
<guest-unsupported>
<action-key>ADD_TO_PAGE</action-key>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>CONFIGURATION</action-key>
<action-key>VIEW</action-key>
</guest-unsupported>
</permissions>
</portlet-resource>
</resource-action-mapping>
I have also added the portlet under the tools category in Liferay-display.xml , but when I deploy the ext and click on add application, under the tools category I get Account settings instead of My account. The account settings portlet which appears does not have the contents of My Account.
Please help.
Thanks
I have created an ext with the steps provided. In liferay-portlet-ext.xml the code is :
<?xml version="1.0"?>
<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.2.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd">
<liferay-portlet-app>
<portlet>
<portlet-name>2</portlet-name>
<icon>/html/icons/my_account.png</icon>
<struts-path>my_account</struts-path>
<portlet-url-class>com.liferay.portal.struts.StrutsActionPortletURL</portlet-url-class>
<preferences-owned-by-group>true</preferences-owned-by-group>
<use-default-template>false</use-default-template>
<private-request-attributes>false</private-request-attributes>
<private-session-attributes>false</private-session-attributes>
<render-weight>50</render-weight>
<header-portlet-css>/html/portlet/users_admin/css/main.css</header-portlet-css>
<footer-portlet-javascript>/html/portlet/users_admin/js/main.js</footer-portlet-javascript>
<css-class-wrapper>portlet-users-admin</css-class-wrapper>
<add-default-resource>true</add-default-resource>
<system>false</system>
</portlet>
</liferay-portlet-app>
Also, in portel-ext.xml the code is:
<?xml version="1.0"?>
<!DOCTYPE resource-action-mapping PUBLIC "-//Liferay//DTD Resource Action Mapping 6.2.0//EN" "http://www.liferay.com/dtd/liferay-resource-action-mapping_6_2_0.dtd">
<resource-action-mapping>
<portlet-resource>
<portlet-name>2</portlet-name>
<permissions>
<supports>
<action-key>ADD_TO_PAGE</action-key>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>CONFIGURATION</action-key>
<action-key>VIEW</action-key>
</supports>
<site-member-defaults />
<guest-defaults />
<guest-unsupported>
<action-key>ADD_TO_PAGE</action-key>
<action-key>ACCESS_IN_CONTROL_PANEL</action-key>
<action-key>CONFIGURATION</action-key>
<action-key>VIEW</action-key>
</guest-unsupported>
</permissions>
</portlet-resource>
</resource-action-mapping>
I have also added the portlet under the tools category in Liferay-display.xml , but when I deploy the ext and click on add application, under the tools category I get Account settings instead of My account. The account settings portlet which appears does not have the contents of My Account.
Please help.
Thanks
Jayaram pokuri, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
New Member Postagens: 22 Data de Entrada: 03/07/13 Postagens Recentes
Hi Taruna,
View.jsp file in tomcat-7.0.42\webapps\ROOT\html\portlet\my_account is empty. There are two things you need to do along with that.
1. Write a hook for my_account/view.jsp file. In that, remove the <%@ include file="/html/portlet/my_account/init.jsp" %> and add the below line.
2. Write a hook for admin_user/edit_user.jsp. In that replace the "User selUser = PortalUtil.getSelectedUser(request);" line with
It works. I tried Let me know, if you are facing any issues.
Thanks,
Jayaram
View.jsp file in tomcat-7.0.42\webapps\ROOT\html\portlet\my_account is empty. There are two things you need to do along with that.
1. Write a hook for my_account/view.jsp file. In that, remove the <%@ include file="/html/portlet/my_account/init.jsp" %> and add the below line.
<%@ include file="/html/portlet/my_account/edit_user.jsp" %>
2. Write a hook for admin_user/edit_user.jsp. In that replace the "User selUser = PortalUtil.getSelectedUser(request);" line with
User selUser = themeDisplay.getUser();
It works. I tried Let me know, if you are facing any issues.
Thanks,
Jayaram
Taruna Notnani, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
New Member Postagens: 8 Data de Entrada: 04/06/14 Postagens Recentes
Hi ,
I have created an ext with the steps provided by you, but now when I try to deploy the ext it gives an exception which is as follows:
Please help
Regards
I have created an ext with the steps provided by you, but now when I try to deploy the ext it gives an exception which is as follows:
Building jar: C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-plugins-sdk-6.2\ext\my-account-test-ext\docroot\WEB-INF\ext-impl\ext-impl.jar
C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-plugins-sdk-6.2\ext\build-common-ext.xml:306: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_51\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:798)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:452)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:139)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_51\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
... 18 more
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
at java.lang.ProcessImpl.start(ProcessImpl.java:136)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 23 more
Java Result: -1
Deleting: C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-plugins-sdk-6.2\dist\my-account-test-ext-6.2.10.1.war
Building zip: C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-plugins-sdk-6.2\dist\my-account-test-ext-6.2.10.1.war
direct-deploy:
Copying 1 file to C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-portal-6.2-ee-sp3\tomcat-7.0.42\lib\ext
Copying 1 file to C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-portal-6.2-ee-sp3\tomcat-7.0.42\webapps\ROOT\WEB-INF\lib
Copying 1 file to C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-portal-6.2-ee-sp3\tomcat-7.0.42\webapps\ROOT\WEB-INF\lib
Copying 1 file to C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-portal-6.2-ee-sp3\tomcat-7.0.42\webapps\ROOT\WEB-INF\lib
Copying 1 file to C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-portal-6.2-ee-sp3\tomcat-7.0.42\webapps\ROOT\WEB-INF\lib
Copying 5 files to C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-portal-6.2-ee-sp3\tomcat-7.0.42\webapps\ROOT
C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-plugins-sdk-6.2\ext\build-common-ext.xml:256: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_51\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:798)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:452)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:139)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_51\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at java.lang.Runtime.exec(Runtime.java:617)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
... 31 more
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
at java.lang.ProcessImpl.start(ProcessImpl.java:136)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 36 more
Java Result: -1
BUILD FAILED
C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-plugins-sdk-6.2\ext\build-common-ext.xml:263: Warning: Could not find file C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-portal-6.2-ee-sp3\tomcat-7.0.42\webapps\ROOT\WEB-INF\web.xml.merged to copy.
Total time: 5 seconds.
</init></init>
Please help
Regards
Jayaram pokuri, modificado 9 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
New Member Postagens: 22 Data de Entrada: 03/07/13 Postagens Recentes
Hi Taruna,
Liferay creates lengthy file names in the ROOT directory, which would fail whiling compiling the code. Its recommended that you should shorten the path with short directory names like this : C:\LR6\LDS\.
but for a quick fix, set the fork="false" in the build-common-ext.xml in the below location. Hope this works.
Thanks,
Jayaram
C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio.
Liferay creates lengthy file names in the ROOT directory, which would fail whiling compiling the code. Its recommended that you should shorten the path with short directory names like this : C:\LR6\LDS\.
but for a quick fix, set the fork="false" in the build-common-ext.xml in the below location. Hope this works.
C:\Liferay 6.2 SP3 setup\liferay-developer-studio\liferay-developer-studio\liferay-plugins-sdk-6.2\ext\build-common-ext.xml
Thanks,
Jayaram
Valerie Lehmann, modificado 5 Anos atrás.
RE: How to bring out My account from dockbar to add portlet page
New Member Postagens: 11 Data de Entrada: 25/11/13 Postagens RecentesHi everyone,
Is there a way to do this without ext-plugin?