Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Albert Devarajan
Using service builder in Ext
February 5, 2013 12:49 AM
Answer

Albert Devarajan

Rank: New Member

Posts: 21

Join Date: December 12, 2012

Recent Posts

I want to add one field to the default user table . How can I do it ??I am using Liferay 6.1 + Eclipse IDE +Mysql.
Kowbathullah Gnaniyar
RE: Using service builder in Ext
February 5, 2013 1:23 AM
Answer

Kowbathullah Gnaniyar

Rank: Liferay Master

Posts: 603

Join Date: December 19, 2007

Recent Posts

Hi,

Without touching Liferay user services, we can achieve this through Custom Attribute . Liferay provides Custom field feature . It will extend the user service through Expando bridge . Please refer this document :

Adding Custom field for User



- Gnaniyar Zubair
Albert Devarajan
RE: Using service builder in Ext
February 5, 2013 4:12 AM
Answer

Albert Devarajan

Rank: New Member

Posts: 21

Join Date: December 12, 2012

Recent Posts

@Gnaniyar: I tried this already but its displaying as text area ..how can i change to text input field??
Also how can i retrieve custom field data in another portlet
Hitoshi Ozawa
RE: Using service builder in Ext
February 5, 2013 4:21 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

There many articles on expando. Try googling them.

Sample:
http://www.liferay.com/community/wiki/-/wiki/Main/Developing+with+Expando
Kowbathullah Gnaniyar
RE: Using service builder in Ext
February 5, 2013 4:24 AM
Answer

Kowbathullah Gnaniyar

Rank: Liferay Master

Posts: 603

Join Date: December 19, 2007

Recent Posts

Hi,

You have to select , there is one TEXT FIELD instead of TEXT While creating custom field.

You can received the custom field like this in any portlet :

user.getExpandoBridge().getAttribute("customFieldName");


HTH

- Gnaniyar Zubair
Albert Devarajan
RE: Using service builder in Ext
February 13, 2013 12:14 AM
Answer

Albert Devarajan

Rank: New Member

Posts: 21

Join Date: December 12, 2012

Recent Posts

How to get the custom field value added to an organization?
Kowbathullah Gnaniyar
RE: Using service builder in Ext
February 13, 2013 12:20 AM
Answer

Kowbathullah Gnaniyar

Rank: Liferay Master

Posts: 603

Join Date: December 19, 2007

Recent Posts

Each entity has expando bridge method.

<Entity>.getExpandoBridge().getAttribute("CUSTOM-FIELD");

<Entity>.getExpandoBridge().setAttribute("CUSTOM_FIELD","VALUE");
Albert Devarajan
RE: Using service builder in Ext
February 13, 2013 12:28 AM
Answer

Albert Devarajan

Rank: New Member

Posts: 21

Join Date: December 12, 2012

Recent Posts

organization.getExpandoBridge().getAttribute("CUSTOM-FIELD");

When i tried like this i am getting a error???organization cannot be resolved
Kowbathullah Gnaniyar
RE: Using service builder in Ext
February 13, 2013 12:43 AM
Answer

Kowbathullah Gnaniyar

Rank: Liferay Master

Posts: 603

Join Date: December 19, 2007

Recent Posts

do you have organization object..?