Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Daniel Nordhoff-Vergien
Accessing custom attributes from java
April 22, 2013 7:37 AM
Answer

Daniel Nordhoff-Vergien

Rank: New Member

Posts: 7

Join Date: March 17, 2013

Recent Posts

Hi,

I have added some custom attributes to my organizations, which I want to read inside the portlet. I get the ExpandoBridge from my organization object and I can access text custom fields. But what to cast the group of X , e.g. group of integer, custom fields to? They are not collections, so what then?

Regards

Daniel
Sandeep Nair
RE: Accessing custom attributes from java
April 22, 2013 8:03 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

Hi,

It should be array of int (int [])

I would refer ExpandoValueLocalServiceUtil to see what are the return types available.

Regards,
Sandeep
Daniel Nordhoff-Vergien
RE: Accessing custom attributes from java
April 22, 2013 11:40 AM
Answer

Daniel Nordhoff-Vergien

Rank: New Member

Posts: 7

Join Date: March 17, 2013

Recent Posts

Thanks for the hint. But can you give me an example how the custom field values of e.g. an organization object are connected to the ExpandoValueLocalServiceUtil methods?

Regards

Daniel
Sandeep Nair
RE: Accessing custom attributes from java
April 22, 2013 11:59 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

Hi,

If you see ExpandoBridgeImpl class(actual implementation class), you should see in all the implemented methods(take for example getAttribute), the actual call is made to to the methods of ExpandoValueLocalServiceUtil(or ExpandoValueServiceUtil in case permission has to be checked) class.

Regards,
Sandeep Nair