Foros de discusión

How to send content from portletActionClass to jsp pages

thumbnail
Jennis Vaishnav, modificado hace 7 años.

How to send content from portletActionClass to jsp pages

Junior Member Mensajes: 59 Fecha de incorporación: 1/02/17 Mensajes recientes
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, modificado hace 7 años.

RE: How to send content from portletActionClass to jsp pages

Regular Member Mensajes: 133 Fecha de incorporación: 25/06/15 Mensajes recientes
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.

Archivos adjuntos:

thumbnail
Jennis Vaishnav, modificado hace 7 años.

RE: How to send content from portletActionClass to jsp pages

Junior Member Mensajes: 59 Fecha de incorporación: 1/02/17 Mensajes recientes
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, modificado hace 7 años.

RE: How to send content from portletActionClass to jsp pages

Expert Mensajes: 313 Fecha de incorporación: 14/01/12 Mensajes recientes
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, modificado hace 7 años.

RE: How to send content from portletActionClass to jsp pages

Junior Member Mensajes: 59 Fecha de incorporación: 1/02/17 Mensajes recientes
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, modificado hace 7 años.

RE: How to send content from portletActionClass to jsp pages

Expert Mensajes: 313 Fecha de incorporación: 14/01/12 Mensajes recientes
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, modificado hace 7 años.

RE: How to send content from portletActionClass to jsp pages

Junior Member Mensajes: 59 Fecha de incorporación: 1/02/17 Mensajes recientes
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, modificado hace 7 años.

RE: How to send content from portletActionClass to jsp pages

Junior Member Mensajes: 59 Fecha de incorporación: 1/02/17 Mensajes recientes
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, modificado hace 7 años.

RE: How to send content from portletActionClass to jsp pages

Regular Member Mensajes: 133 Fecha de incorporación: 25/06/15 Mensajes recientes
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