Search code examples
liferayportletexpando

liferay: How can i get data from table "expandovalue" in BD?


In my liferay i have a web form portlet for users to fill. When the form is filled the data is stored in the database in the table expandovalue

Now i'm trying to retrive that data and show it in a portlet, i have found a lot of documentation about expando but most of the documentation is for older versions of liferay and i'm not sure thats what i'm looking for. Because expando seems to work for custom fields and my scenario the data is stored in the default database table

How can i get data stored in database table "expandovalue" and show it in a portlet?


Solution

  • I think this should work for user model.

     ExpandoValue expandoValue = ExpandoValueLocalServiceUtil .getData(themeDisplay.getCompanyId(),User.class.getName(), ExpandoTableConstants.DEFAULT_TABLE_NAME ,"fieldName",user.getUserId(),StringPool.BLANK)