Forums de discussion

How to add the custom attributes to create account page?

thumbnail
Arun Kumar Ramachandran, modifié il y a 13 années.

How to add the custom attributes to create account page?

Regular Member Publications: 228 Date d'inscription: 28/06/10 Publications récentes
Hi,
I like to add my custom attributes to create account page. For that i add the below code
<liferay-ui:custom-attribute-list className="com.liferay.portal.model.User" classPK="<%= 0l %>" editable="<%= true %>" label="<%= true %>" />


to liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\html\portlet\login\create_account.jsp file. But it is not working. Can anyone help me ???

Thanks
Arun
Richard Heiner, modifié il y a 13 années.

RE: How to add the custom attributes to create account page?

New Member Publications: 10 Date d'inscription: 15/11/10 Publications récentes
Hi Arun,

I got the same problem! I'am working with Liferay 6.0.5

I used the instruction from this site:
http://www.liferay.com/community/wiki/-/wiki/Main/Custom+Attributes+and+JSP+Hooks

The key from my custom attribute is "Stadt" and i added the follow code in the create_account.jsp:
<div class="exp-ctrl-holder">
<liferay-ui:custom-attribute className="<%= User.class.getName() %>" classPK="<%= 0 %>" editable="<%= true %>" label="<%= true %>" name="Stadt" />
</div>


But it doesn´t work emoticon
Did you or anyone found a solution??

Thanks
thumbnail
Apoorva Prakash, modifié il y a 13 années.

RE: How to add the custom attributes to create account page?

Liferay Master Publications: 658 Date d'inscription: 15/06/10 Publications récentes
Hello Arurn,
I hope, this post may help you...
link here !!!

Thanks and Regards...
Richard Heiner, modifié il y a 13 années.

RE: How to add the custom attributes to create account page?

New Member Publications: 10 Date d'inscription: 15/11/10 Publications récentes
Hello Apoorva,

thank you for your fast answer.
I have insert your "Accessing programatically" code:

ThemeDisplay td = (ThemeDisplay) req.getAttribute(Web.Keys.THEME_DISPALY);
2User u=td.getUser();
3String s=u.getExpendoBrodge().getAttribute("AttributeName");


in the head of the create_account.jsp
and the "Showing in JSP" code in the fieldset, but it doesn´t work.
Maybe should i insert the Accessing programatically code in an other position?
thumbnail
Apoorva Prakash, modifié il y a 13 années.

RE: How to add the custom attributes to create account page?

Liferay Master Publications: 658 Date d'inscription: 15/06/10 Publications récentes
Robert Heiner:
Hello Apoorva,

thank you for your fast answer.
I have insert your "Accessing programatically" code:

ThemeDisplay td = (ThemeDisplay) req.getAttribute(Web.Keys.THEME_DISPALY);
2User u=td.getUser();
3String s=u.getExpendoBrodge().getAttribute("AttributeName");


in the head of the create_account.jsp
and the "Showing in JSP" code in the fieldset, but it doesn´t work.
Maybe should i insert the Accessing programatically code in an other position?


Hello Heiner,

The code I've mentioned for accessing programatically should be written in the Action class.

Try this way. Hope this will help...

Thanks and Regards...