Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Dominique Ebert
Changing User Asset view
5 de febrero de 2013 6:23
Respuesta

Dominique Ebert

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 1 de febrero de 2013

Mensajes recientes

Hello everybody!
After my last problem got solved so quickly, I thought I might try to get a solution in this forums for this problem aswell:
I added a User approval Workflow using Kaleo to the liferay registration and everything works pretty fine. During the registration I'm storing additional information apart from the standard information LR asks for in the registration.
Now I want to extend the review view of the user (asset?) in order to display the additional information. In the standard version of the review theres only stuff like the name, surname, email address etc. and I want to extend that view by additional information. How can I achieve that?

Thanks in advance, best regards

Dominique
Dominique Ebert
RE: Changing User Asset view
6 de febrero de 2013 0:34
Respuesta

Dominique Ebert

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 1 de febrero de 2013

Mensajes recientes

Nobody has an idea on this? =)
Oliver Bayer
RE: Changing User Asset view
6 de febrero de 2013 1:19
Respuesta

Oliver Bayer

Ranking: Liferay Master

Mensajes: 875

Fecha de incorporación: 18 de febrero de 2009

Mensajes recientes

Hi Dominique,

I've never modified sth. around the workflow process so I can only speek theoretically and give you a few hints emoticon.

My guess would be that you're storing the additional info during registration with custom attributes (expando) for the type user, right? If so the next step would be to identify the jsp displaying the data for the review task. Maybe it's located somewhere in one of the "html \ portlet \ workflow_*" folders. Next you should create a hook and override the jsp. You can access custom attributes by using "userObj.getExpandoBridge().getAttribute("my-additional-attribute")". If I remember rigth there is also a taglib for displaying custom attributes.

It's not much of a solution but I hope you can at least use it to find one emoticon.

Greets Oli
Dominique Ebert
RE: Changing User Asset view
6 de febrero de 2013 1:22
Respuesta

Dominique Ebert

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 1 de febrero de 2013

Mensajes recientes

Hi Oli,

Thanks for putting me into a direction, I was kinda helpless, I will try the approach you suggested and post my progress here, maybe I can reveal something for other people with a similiar problem.
Dominique Ebert
RE: Changing User Asset view
6 de febrero de 2013 2:35
Respuesta

Dominique Ebert

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 1 de febrero de 2013

Mensajes recientes

Hey Oli!
So I figured out which *.jsp displays the information that I want to extend. But unfortunately the *.jsp just shows a rendered assert, which is kinda what I expected it to do. Conlcuding this I see three options in order to extend the shown information:

1. Extend the Liferay-defined User Assert. But I have no clue wether this is possible nor how this can be achieved.
2. Check for the classname in the *.jsp and if it is " com.liferay.portal.model.User" then render another assert (self-written assert) instead and show it.
3. Check for the classname in the *.jsp and if it's the *.model.User then show additional fields in the *.jsp

What solution would you recommend? Do you see any other approaches to this?

EDIT:

I just came up with another Issue. Writing my own assert an render it instead of the user assert might disturb the workflow process I guess. So this could bring more trouble into this.

Regards and thanks in advance
Oliver Bayer
RE: Changing User Asset view
7 de febrero de 2013 1:16
Respuesta

Oliver Bayer

Ranking: Liferay Master

Mensajes: 875

Fecha de incorporación: 18 de febrero de 2009

Mensajes recientes

Hi Dominique,

thanks for the info.

With "assert" you meen "asset" right emoticon?
I would stick to #3 of the mentioned possibilities. It seems to be -at least for me- the easiest solution without having to change or create java classes. Modifying a jsp can be done with a hook so this approach is hot (un)deployable which I think it's a great benefit. As you're only changing the display of the information and don't change anything in the backend/ service layer... it shouldn't break anything of the workflow process.

Oli
Dominique Ebert
RE: Changing User Asset view
7 de febrero de 2013 3:31
Respuesta

Dominique Ebert

Ranking: New Member

Mensajes: 15

Fecha de incorporación: 1 de febrero de 2013

Mensajes recientes

Hey Oli!
Yes that's exactly what I meant.
And for everbody who might come up with the same issue, the jsp which you need to hook in order to modify the asset preview in the "my workflow tasks" portlet is the:
"edit_workflow_tasks.jsp" in /html/portlet/workflow_tasks

And thanks for your help / suggestions