Foros de discusión

Add side Menu to User Registration using hook

saritha reddy, modificado hace 9 años.

Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
Hi EveryOne

I need to Add menu to Right side panel of user registration using hook for my customized user registration page .
Actually am able to add fields to the existing user registration page. but am not understanding how to add menu to right panel

Is it possible to add menu to that right panel ?
If it is possible please tell me how can i achieve it.



Thanks

Regards
Saritha
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
Please some one help me i want to know actually which jsp page is for that side panel of
user registartion of contorl panel -> users and organisations -> all users -> add -> user -> promt to userRegistration page there one the right hand side there will be one panel with userInfomation with the options of details, organistaion and personal site

Exactly that panel jsp page i wnat to know. if anyone know about about it please let me know.

I have tried to find out buti was not successfull.


Thank you


Regards
Saritha
thumbnail
Manali Lalaji, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Expert Mensajes: 362 Fecha de incorporación: 9/03/10 Mensajes recientes
Hi Saritha,

Do you want to add extra section to existing ones like Organization,Personal Site?

These form sections can be configured through properties at the portal-ext.properties file.
The following are 3 properties determine which sections are available when creating a new user account:

users.form.update.main=details,password,organizations,sites,user-groups,roles,personal-site,categorization
users.form.update.identification=addresses,phone-numbers,additional-email-addresses,websites,instant-messenger,social-network,sms,open-id
users.form.update.miscellaneous=announcements,display-settings,comments,custom-fields

HTH!
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
Thank you Manali Lalaji for the rpl.

Yes exactly i want to add one extra my own menu along with organisation and personal site.

Is it possible to add menu there using hook
If it is possible how can achieve that.


Regards
Saritha
thumbnail
Manali Lalaji, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Expert Mensajes: 362 Fecha de incorporación: 9/03/10 Mensajes recientes
Hi Saritha,

You can do that via hook by overriding portal.properties.

Add this in liferay-portlet.xml of hook
<hook>
<portal-properties>portal.properties<portal-properties>
<hook>

Add extra property e.g. - ABC at the end.
users.form.my.account.main=details,password,organizations,sites,user-groups,roles,categorization,ABC

HTH
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
Hi Manali

I have did followed your steps. but i cant see that ABC menu ......


Could you pls assist me .


Regards
Saritha
thumbnail
Manali Lalaji, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Expert Mensajes: 362 Fecha de incorporación: 9/03/10 Mensajes recientes
Hi Saritha

It was property mistake from my end.. I aplologize for that...

If you want to add new section , while adding Users, override portal.properties as I mentioned above and in that, add below property in the file

users.form.add.main= abc

This shall be appended to the existing ones like - details, organizations,personal-site

HTH!
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
Am really thankful to you Manali you saved my day.
Now it is showing the added menu.

And one more question is if i want to add some function like whenever we click on that Added menu the main page should get changed like organization and personal site.
And to that changed page if i want to add some custom fields, What must i do.

If you know how to do that please let me know.


Regards
Saritha
thumbnail
Pankaj Kathiriya, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Liferay Master Mensajes: 722 Fecha de incorporación: 5/08/10 Mensajes recientes
Create jsp with name same as your menu item and add that into hook. You can add custom field related liferay ui tags in that jsp.
thumbnail
Manali Lalaji, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Expert Mensajes: 362 Fecha de incorporación: 9/03/10 Mensajes recientes
Hi Saritha,

If you want to add jsp for the new menu item, you can add that in path

/WEB-INF/custom_jsps/html/portlet/users_admin/user/abc.jsp

Add that entry in liferay-hook.xml ---> <custom-jsp-dir>/WEB-INF/custom_jsps</custom-jsp-dir>

You can create custom field and access custom field in that jsp using <liferay-ui:custom-attribute> tag.

HTH!
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
Thank you Manali

Manali I have followed your steps and succefull also.
Actually my requirement is Adding few more my custom fields to userRegistration and adding those custom fields to user table using hook.

So till now am able to capture fields and now i want to insert them into user table.
How to do that . could you pls refer me any document how to achieve that.


Regards
Saritha
thumbnail
Manali Lalaji, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Expert Mensajes: 362 Fecha de incorporación: 9/03/10 Mensajes recientes
Hi Saritha,

Good to know you are able to make progress, but if you are searching for custom fields in _User table, they dont exist there.
They exist in Expando Table

Refer to links:

https://www.liferay.com/community/forums/-/message_boards/message/25893375
https://www.liferay.com/community/forums/-/message_boards/message/960946
https://www.liferay.com/community/wiki/-/wiki/Main/developing+with+Expando
http://java-liferay.blogspot.com/2012/03/custom-liferay-user-registration.html

HTH!
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
Hi Manali

I have followed your links and some other forums also but am able to insert data into exapando table only when am creating fields through controlpanel.
When am creating fields with hook it is not getting inserted into expando table.

Could you pls assist me to do this or do you have any application of this kind to provide me.
Actually I have created Menu on the side panel like learner and to that menu in main page I have added a field like schoolname input box and trying to insert that schoolname which I have enterd but it is not getting inserted in to expando table.


Pls help me with this issue.


Thanks

Regards
Saritha
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
HI Mayur

Thank you for the rpl .
user registartion of contorl panel -> users and organisations -> all users -> add -> user -> promt to userRegistration page there one the right hand side there will be one panel with userInfomation with the options of details, organistaion and personal site

I have created a menu there and am able to add custom fileds to that page also, i did all that using hook.

But now i want to save that data in the user table.
There is the problem i dont know how to insert my custom data into user table.

In the above link you have mentioned there is code
user.getExpandoBridge().addAttribute("yourCustomFieldKey");

where should i mention that line and how to map to my field.

could you pls let me know in detail how add my custom field data into expando table.

Here is my jsp page .
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ page import="com.liferay.portal.model.User"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
SchoolName: <input type="text" name="schoolname"><br>
<liferay-ui:custom-attribute
className="<%= User.class.getName() %>"
classPK="<%= 0 %>"
editable="<%= true %>"
label="<%= true %>"
name="schoolname"
/>
Subjects: <input type="text" name="subjects"><br>
<liferay-ui:custom-attribute
className="<%= User.class.getName() %>"
classPK="<%= 0 %>"
editable="<%= true %>"
label="<%= true %>"
name="subjects"
/>
</body>
</html>



Regards
Saritha
thumbnail
Mayur Patel, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Expert Mensajes: 358 Fecha de incorporación: 17/11/10 Mensajes recientes
Hi Saritha,

You also need to submit form inside jsp and in action method you can save custom field value in User table.

Refer below link for more details,
http://www.liferaysavvy.com/2014/02/working-with-liferay-custom-fields.html

Thanks.
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
Hi Mayur

Thank for the reply.

1.Actually in the link you have send we need toaccss action class from jsp so we can pass the captured values into action then we can insert into expando table
2.But am using hook so am unable to access action class by following that link.
3. if you want to access action class from jsp using hook there are 2 ways from knowledge(correct me if am wrong)
a. by mentioning the action in your portal.properties like
login.events.pre=com.falcorp.dbe.TestAction
b. By using ext plugin.

Now my problem is i dont know which property i have to use for my requirement.
I read how to create ext plugin but i dont know how to apply to my hook .

Actually I am attaching my screenshot of what did and from that screen i have a menu like learner1 in the right side panel, and to that particular menu i have cretaed page with few fields, exactly those fields i want to insert into expando table when ever click save .
For that only i was trying to access action class from my own custom hook jsp.

Please some one help me what i have to do for my requirement and how?.

Actually am struggling with this issue almost from a weekemoticon .


Thank you in advance.



Regards
Saritha
sharat Kumar, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

New Member Mensajes: 16 Fecha de incorporación: 24/02/14 Mensajes recientes
Hi saritha,
did u find any solution for above problem?
plz share....
Tushar Patel, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

New Member Mensajes: 12 Fecha de incorporación: 26/08/14 Mensajes recientes
Did you find any any solution i have same problem. I think ext require for it.
saritha reddy, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

Junior Member Mensajes: 95 Fecha de incorporación: 27/01/14 Mensajes recientes
No I did Not find solution,i stopped using hook or ext.
I did developed a new portlet for my requirement.
sharat Kumar, modificado hace 9 años.

RE: Add side Menu to User Registration using hook

New Member Mensajes: 16 Fecha de incorporación: 24/02/14 Mensajes recientes
Hi saritha,
can u explain in detai how did u reslove above problem.