Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Manage my account url for vm file. Tanaji Londhe 24 de julio de 2012 2:45
RE: Manage my account url for vm file. Jignesh Vachhani 24 de julio de 2012 2:53
RE: Manage my account url for vm file. Tanaji Londhe 24 de julio de 2012 5:29
RE: Manage my account url for vm file. Jignesh Vachhani 24 de julio de 2012 5:43
RE: Manage my account url for vm file. Tanaji Londhe 24 de julio de 2012 6:00
RE: Manage my account url for vm file. Jignesh Vachhani 24 de julio de 2012 6:06
RE: Manage my account url for vm file. Tanaji Londhe 24 de julio de 2012 6:13
RE: Manage my account url for vm file. Jignesh Vachhani 24 de julio de 2012 6:14
RE: Manage my account url for vm file. Tanaji Londhe 24 de julio de 2012 22:53
RE: Manage my account url for vm file. Tejas Kanani 25 de julio de 2012 5:08
RE: Manage my account url for vm file. Tanaji Londhe 25 de julio de 2012 10:48
RE: Manage my account url for vm file. Jignesh Vachhani 25 de julio de 2012 22:41
RE: Manage my account url for vm file. Tanaji Londhe 28 de enero de 2013 2:19
RE: Manage my account url for vm file. Riley Pickerl 14 de junio de 2013 11:29
RE: Manage my account url for vm file. saritha reddy 11 de marzo de 2014 12:58
RE: Manage my account url for vm file. Dhrutika Vyas 25 de marzo de 2014 11:43
RE: Manage my account url for vm file. Enrique Valdes Lacasa 16 de abril de 2015 10:44
RE: Manage my account url for vm file. Soori Babu Meesala 17 de abril de 2015 3:05
RE: Manage my account url for vm file. Enrique Valdes Lacasa 17 de abril de 2015 13:40
Tanaji Londhe
Manage my account url for vm file.
24 de julio de 2012 2:45
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi,
How do I get url for Manage My Account. Which is pop-up click on the username link after successful login.

Thanks & regards,
Tanaji.
Jignesh Vachhani
RE: Manage my account url for vm file.
24 de julio de 2012 2:53
Respuesta

Jignesh Vachhani

Ranking: Liferay Master

Mensajes: 780

Fecha de incorporación: 10 de marzo de 2008

Mensajes recientes

you can follow same procedure mentioned in http://www.liferaysolution.com/2012/02/create-account-url-in-velocity-template.html

In suggested link we have created link for create account, so same way you can manage it for manage account link and set necessary parameter in URL itself.
Tanaji Londhe
RE: Manage my account url for vm file.
24 de julio de 2012 5:29
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

LiferayPortletURL.create(javax.servlet.http.HttpServletRequest request, String portletName, long plid, String lifecycle)
I use following code as per your suggestion
#set ($manage_my_account_url = $portletURLFactory.create($request, "2", $page.getPlid(), "ACTION_PHASE"))
$manage_my_account_url.setWindowState("MAXIMIZED")
$manage_my_account_url.setPortletMode("VIEW")
$manage_my_account_url.setParameter("saveLastPath", "0")
$manage_my_account_url.setParameter("struts_action", "/my_account/edit_user")

It generates following URL.
"http://localhost:8080/web/guest/welcome?p_auth=2kZjemVr&p_p_auth=DU7v1SSr&p_p_id=2&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_2_struts_action=%2Fmy_account%2Fedit_user"

It shows me one portlet on portal page and gives error message is "My Account is temporarily unavailable."

and it shows error on console

11:55:50,899 WARN [PortletRequestProcessor:166] This URL can only be invoked using POST: /web/guest/welcome?p_auth=2kZjemVr&p_p_auth=DU7v1SSr&p_p_id=2&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_2_struts_action=%2Fmy_account%2Fedit_user
11:55:50,908 ERROR [render_portlet_jsp:154] com.liferay.portal.security.auth.PrincipalException: /web/guest/welcome?p_auth=2kZjemVr&p_p_auth=DU7v1SSr&p_p_id=2&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_2_struts_action=%2Fmy_account%2Fedit_user
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:171)
at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:190)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:651)
at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:686)
at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:361)
at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:845)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:633)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:244)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

Please tell me how to resolve this issue.
Jignesh Vachhani
RE: Manage my account url for vm file.
24 de julio de 2012 5:43
Respuesta

Jignesh Vachhani

Ranking: Liferay Master

Mensajes: 780

Fecha de incorporación: 10 de marzo de 2008

Mensajes recientes

Very simple way to get my account URL is :

$theme_display.getURLMyAccount().toString()

So now only thing you may have to do it open this URL in popup.
Tanaji Londhe
RE: Manage my account url for vm file.
24 de julio de 2012 6:00
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi Jignesh,
I use this code as per ur suggestion
<a href="$theme_display.getURLMyAccount().toString()">$my_account_text</a>
but it shows me whole control panel with its all functionality. I dont want to show all control panel.
I just require to display user account information(My Account) which is shows in Manage My Account pop-up when user click on username link.

How to resovle this issue?
Jignesh Vachhani
RE: Manage my account url for vm file.
24 de julio de 2012 6:06
Respuesta

Jignesh Vachhani

Ranking: Liferay Master

Mensajes: 780

Fecha de incorporación: 10 de marzo de 2008

Mensajes recientes

Yeah but strange as both URL are referring same path

So definitely there would be something with popup
Tanaji Londhe
RE: Manage my account url for vm file.
24 de julio de 2012 6:13
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi Jignesh,
I am not getting what ur saying.....
or Is their any way to get only My Account info nothing else, When click on my link like "My Account"
Jignesh Vachhani
RE: Manage my account url for vm file.
24 de julio de 2012 6:14
Respuesta

Jignesh Vachhani

Ranking: Liferay Master

Mensajes: 780

Fecha de incorporación: 10 de marzo de 2008

Mensajes recientes

URL which is given in user name link in docbar and url which we are getting in theme, both are same.

You can check below section in docbar.js file to get more idea :

 1
 2var myAccount = A.one('#' + namespace + 'userAvatar .user-links');
 3
 4                if (myAccount) {
 5                    myAccount.delegate(
 6                        'click',
 7                        function(event) {
 8                            event.preventDefault();
 9
10                            var currentTarget = event.currentTarget;
11
12                            var controlPanelCategory = Lang.trim(currentTarget.attr('data-controlPanelCategory'));
13
14                            var uri = currentTarget.attr('href');
15                            var title = currentTarget.attr('title');
16
17                            if (controlPanelCategory) {
18                                uri = Liferay.Util.addParams('controlPanelCategory=' + controlPanelCategory, uri) || uri;
19                            }
20
21                            instance._openWindow(
22                                {
23                                    dialog: {
24                                        align: Util.Window.ALIGN_CENTER,
25                                        width: 960
26                                    },
27                                    title: title,
28                                    uri: uri
29                                }
30                            );
31                        },
32                        'a.use-dialog'
33                    );
Tanaji Londhe
RE: Manage my account url for vm file.
24 de julio de 2012 22:53
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi Jignesh,

Can you please tell me how to write this code in velocity

PortletURLImpl myAccountURL = new PortletURLImpl( request, PortletKeys.MY_ACCOUNT, controlPanelPlid,PortletRequest.RENDER_PHASE);
myAccountURL.setWindowState(WindowState.MAXIMIZED);
myAccountURL.setPortletMode(PortletMode.VIEW);
myAccountURL.setRefererPlid(plid);
myAccountURL.setParameter("struts_action", "/my_account/edit_user");
myAccountURL.setParameter("backURL", myAccountRedirect);
themeDisplay.setURLMyAccount(myAccountURL);

I think using this code I can solve my issue of a Manage My Account url related.
Because as you said above post from that i search dockbar.jsp page in that i found this following code
<aui:a cssClass="user-fullname use-dialog" data-controlPanelCategory="<%= PortletCategoryKeys.MY %>" href="<%= themeDisplay.getURLMyAccount().toString() %>" title="manage-my-account"><%= HtmlUtil.escape(user.getFullName()) %></aui:a>
Here they metion PortletCategoryKeys, due this I think i am not getting that pop-up window.
Tejas Kanani
RE: Manage my account url for vm file.
25 de julio de 2012 5:08
Respuesta

Tejas Kanani

Ranking: Liferay Master

Mensajes: 653

Fecha de incorporación: 6 de enero de 2009

Mensajes recientes

Hi Tanaji,

Just use below code in your template file. It will simply open only my account page without any other Control Panel options.

1#set ($myaccurl = $theme_display.getURLMyAccount().toString() + "&controlPanelCategory=my")
2<a class="user-fullname use-dialog" href="$myaccurl" >$my_account_text</a>


But its not opening in popup same as given in OOTB dockbar. So if you need it you just have to find a way to open it in popup.

Thanks & Regards,
Tejas
Tanaji Londhe
RE: Manage my account url for vm file.
25 de julio de 2012 10:48
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi Tejas,
Thanks you very much Tejas & Jignesh. Its working properly.
Jignesh Vachhani
RE: Manage my account url for vm file.
25 de julio de 2012 22:41
Respuesta

Jignesh Vachhani

Ranking: Liferay Master

Mensajes: 780

Fecha de incorporación: 10 de marzo de 2008

Mensajes recientes

That's great Tanaji
You can make this thread post status to answered now.emoticon
Tanaji Londhe
RE: Manage my account url for vm file.
28 de enero de 2013 2:19
Respuesta

Tanaji Londhe

Ranking: Regular Member

Mensajes: 196

Fecha de incorporación: 25 de abril de 2012

Mensajes recientes

Hi Tejas,
I have created url for My Account as per ur suggestion but it doesn't show the dockbar. How to add Back link.
Riley Pickerl
RE: Manage my account url for vm file.
14 de junio de 2013 11:29
Respuesta

Riley Pickerl

Ranking: Junior Member

Mensajes: 50

Fecha de incorporación: 10 de enero de 2013

Mensajes recientes

Tejas Kanani:
Hi Tanaji,
But its not opening in popup same as given in OOTB dockbar. So if you need it you just have to find a way to open it in popup.

Do you know how to open it the same way as the dockbar? I thought you had to include the class use-dialog but it doesnt seem to be working for me.

Any ideas?
saritha reddy
RE: Manage my account url for vm file.
11 de marzo de 2014 12:58
Respuesta

saritha reddy

Ranking: Junior Member

Mensajes: 95

Fecha de incorporación: 27 de enero de 2014

Mensajes recientes

Hi

I have followed the steps which you have provided.

But am getting not found error....

In My init.vm file i have did following
#if ($show_my_account)
#set ($my_account_text = $languageUtil.get($locale, "my-account"))
#set ($my_account_url = $theme_display.getURLMyAccount())

#end

then am trying with http://localhost:8080/web/guest/$my_account_url still same error.


Please help me with this issue.


Thanks in advance

Regards
Saritha
Dhrutika Vyas
RE: Manage my account url for vm file.
25 de marzo de 2014 11:43
Respuesta

Dhrutika Vyas

Ranking: Expert

Mensajes: 435

Fecha de incorporación: 9 de febrero de 2009

Mensajes recientes

Hi Sarita,

Try to print $my_account_url and $show_my_account variables in portal_normal.vm.

Also if you are implementing this as part of your theme, it will be in int_custom.vm in place of int.vm

Regards,
Dhrutika
Enrique Valdes Lacasa
RE: Manage my account url for vm file.
16 de abril de 2015 10:44
Respuesta

Enrique Valdes Lacasa

Ranking: Junior Member

Mensajes: 43

Fecha de incorporación: 29 de julio de 2014

Mensajes recientes

It is weird, the snippet from Tejas Kanani seemed to work for me at the beginning, opening My Account in a pop up. It seems that right now that is not the case, and the My Account link that I created doesn't display any pop up. The "use-dialog" class, as a user above mentioned, is what I thought that made opening this pop up possible...but it is not working.

If someone could shed more light on this that would be great.

Thank you all for the contributions!
Soori Babu Meesala
RE: Manage my account url for vm file.
17 de abril de 2015 3:05
Respuesta

Soori Babu Meesala

Ranking: Junior Member

Mensajes: 29

Fecha de incorporación: 10 de julio de 2014

Mensajes recientes

Hi follow this link that might be useful. Click Here

~Regards,
Soori Babu Meesala
Enrique Valdes Lacasa
RE: Manage my account url for vm file.
17 de abril de 2015 13:40
Respuesta

Enrique Valdes Lacasa

Ranking: Junior Member

Mensajes: 43

Fecha de incorporación: 29 de julio de 2014

Mensajes recientes

Thanks Soori Babu Meesala! I had forgotten to subscribe, so I didn´t know you answered. A co worker and I just found the solution on our side (we wish we had seen yours first)... and it is exactly as shown in the link you posted, so thanks a lot, it is what we were looking for.

We figured it out when we noticed that the Login portlet actually does the same functionality when logging in into Liferay, and it says: You are signed in as User YourUser. The name of the user is a link to pop up the user's profile. So we noticed that this link was different from the one in the dockbar, and they used the specific javascript function that we are talking about. Having a look at the login.jsp, it gave us exactly what we needed.

Summarizing with a solution for anyone interested in Liferay 6.2 for this, will be:

1## Liferay pop up link to display the account editing page of a user (Velocity)
2#set ($my_account_url = $theme_display.getURLMyAccount() + "&controlPanelCategory=my")
3<a href="javascript:Liferay.Util.openWindow({dialog: {destroyOnHide: true}, title: 'My Account', uri: '$my_account_url'});">