简体   繁体   中英

Liferay 6.0 get WebForm-portlet data from db with java controller

I have some webform portlet used, for example to ask users if the experience in the website was good. Now I need to get the web form values and create a table to show them. I know that data are stored in liferay's DB in the Exapando (tables, ros, column, values). The problem is that i can't find web form name. In Expandotable it is stored like 1_WAR_webformportlet_INSTANCE_... but I want the name that appear in browser ("MY FORM" for example).

Hope that someone can help me...

PS: I'm Using ExpandoTableLocalServiceUtil in JAVA.

The Expando API mimics tables and you can find various other Expando* API classes that you will need in order to extract the right data. It's not the most intuitive way to run reports on the data, as it's largely built to store extra values for existing entities.

That being said, once you have a proper id from the ExpandoTable of your choice, you can query the ExpandoColumn and ExpandoRow APIs, and in turn the ExpandoValue API (add LocalServiceUtil to all) to get the proper values.

Then, of course, you'll need to render these values in your HTML output.

Web Forms can also be exported as CSV, you could use that output, or you can look at that code, as it also reads all of the data for a form.

I can't go without: You mention Liferay 6.0 and tag Liferay 6.2. Both are horribly outdated - please run more current software on a public facing website.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM