Foren

How to send content from portletActionClass to jsp pages

thumbnail
Jennis Vaishnav, geändert vor 7 Jahren.

How to send content from portletActionClass to jsp pages

Junior Member Beiträge: 59 Beitrittsdatum: 01.02.17 Neueste Beiträge
I'm actually fetching data from database in action class and want that content to be displayed in jsp page in table form. Please help me with this.

-Thank you
thumbnail
Nirav Prajapati, geändert vor 7 Jahren.

RE: How to send content from portletActionClass to jsp pages

Regular Member Beiträge: 133 Beitrittsdatum: 25.06.15 Neueste Beiträge
Hello Jennis,

If you want to show database data in jsp page in tabular form then not need to get data in action class.
You have to make list of your entity name of service.xml and then use liferay search-container to show data in table form.
thumbnail
Jennis Vaishnav, geändert vor 7 Jahren.

RE: How to send content from portletActionClass to jsp pages

Junior Member Beiträge: 59 Beitrittsdatum: 01.02.17 Neueste Beiträge
Well, i'm not aware from service.xml and service builder. Can you please explain and elaborate or share any useful link. It would be great if you share an example.
thumbnail
Anil T, geändert vor 7 Jahren.

RE: How to send content from portletActionClass to jsp pages

Expert Beiträge: 313 Beitrittsdatum: 14.01.12 Neueste Beiträge
He was fetching data from his custom table so he has created the entry in service.xml file. You are fetching data from the database and you has it in action class. I don't think you need to follow the above process. You can refer the default classes for core liferay how they are using for action classes. For example go through the class "EditArticleAction" and see how you can manage in your action class.
thumbnail
Jennis Vaishnav, geändert vor 7 Jahren.

RE: How to send content from portletActionClass to jsp pages

Junior Member Beiträge: 59 Beitrittsdatum: 01.02.17 Neueste Beiträge
I have certain records stored in database, stored using aui:form and now i want to make a functionality that by one click all the records are fetched from database and displayed in any .jsp . And after this i want to have update and delete button for that particular row. This what i want to achieve with pagination too implemented.
thumbnail
Anil T, geändert vor 7 Jahren.

RE: How to send content from portletActionClass to jsp pages

Expert Beiträge: 313 Beitrittsdatum: 14.01.12 Neueste Beiträge
Hi Jennis,

You are very clear with your requirement but your missing some details to get the help from this community.

First of all are you storing your data in core liferay database tables or some custom database tables?

If you store your data in core liferay tables then you can get the Liferay API built for those tables to fetch data. Please check.
thumbnail
Jennis Vaishnav, geändert vor 7 Jahren.

RE: How to send content from portletActionClass to jsp pages

Junior Member Beiträge: 59 Beitrittsdatum: 01.02.17 Neueste Beiträge
Anil T:
Hi Jennis,

You are very clear with your requirement but your missing some details to get the help from this community.

First of all are you storing your data in core liferay database tables or some custom database tables?

If you store your data in core liferay tables then you can get the Liferay API built for those tables to fetch data. Please check.


Hi Anil,
I have created form using aui:form, and the data are than sent to portlet action class, and they are stored in mySql database by making use of preparedStatement in portlet action class.
thumbnail
Jennis Vaishnav, geändert vor 7 Jahren.

RE: How to send content from portletActionClass to jsp pages

Junior Member Beiträge: 59 Beitrittsdatum: 01.02.17 Neueste Beiträge
Anil T:
"EditArticleAction"

Hi Anil,
Can you please explain or share link for the above quoted term. I tried googling it but didnt worked. What is the purpose for it,?
thumbnail
Nirav Prajapati, geändert vor 7 Jahren.

RE: How to send content from portletActionClass to jsp pages

Regular Member Beiträge: 133 Beitrittsdatum: 25.06.15 Neueste Beiträge
If any requirement regarding database then you can go with Liferay Service Builder.
It is very easy then all other steps for interacting with database

Following are the Links where you can get detail about Liferay Service Builder.
http://proliferay.com/an-introduction-to-liferay-service-builder/

http://www.liferaysavvy.com/2014/01/liferay-service-builder-underlying.html