Foren
JSP Forwarding
Tom Cat, geändert vor 12 Jahren.
JSP Forwarding
Junior Member Beiträge: 34 Beitrittsdatum: 14.07.11 Neueste Beiträge
Hello,
I have two questions regarding jsp forwarding / linking. I hope you can tell me
how to handle those problems.
1.) There is a method DoView which is executed when my default page is shown. (view.jsp) Why is this method only shown
at the default page and not at the other pages?
2.) Also Liferay provides another method called DoEdit which should do exact same thing like the DoView just with the edit.jsp.
But how can i call the DoEdit method?
Best regards
Tom Cat
I have two questions regarding jsp forwarding / linking. I hope you can tell me
how to handle those problems.
1.) There is a method DoView which is executed when my default page is shown. (view.jsp) Why is this method only shown
at the default page and not at the other pages?
2.) Also Liferay provides another method called DoEdit which should do exact same thing like the DoView just with the edit.jsp.
But how can i call the DoEdit method?
Best regards
Tom Cat
Ravi Kumar Gupta, geändert vor 12 Jahren.
RE: JSP Forwarding
Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
Check the portlet modes and portlet lifecycle; you will come to know more.
1. When you load a portlet on a page it is first rendered; thats view mode and the method is doView(). You can write your logic over there to show JSPs of your choice.
2. There are edit and help mode also available.
3. Some special modes are provided by liferay like About, Config, Edit defaults, Edit Guests, Preview, Print.
Hope this helps
-Ravi
1. When you load a portlet on a page it is first rendered; thats view mode and the method is doView(). You can write your logic over there to show JSPs of your choice.
2. There are edit and help mode also available.
3. Some special modes are provided by liferay like About, Config, Edit defaults, Edit Guests, Preview, Print.
Hope this helps
-Ravi
Tom Cat, geändert vor 12 Jahren.
RE: JSP Forwarding
Junior Member Beiträge: 34 Beitrittsdatum: 14.07.11 Neueste Beiträge
Thanks for answering me, but my problem is that i want to generate the content of my jsp with a java class.
And i have four jsps (view, edit, add, delete).
Tom Cat
And i have four jsps (view, edit, add, delete).
Tom Cat
Ravi Kumar Gupta, geändert vor 12 Jahren.
RE: JSP Forwarding
Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste BeiträgeTom Cat:
Thanks for answering me, but my problem is that i want to generate the content of my jsp with a java class.
And i have four jsps (view, edit, add, delete).
You want to use like it's done in servlets?
-Ravi
Tom Cat, geändert vor 12 Jahren.
RE: JSP Forwarding
Junior Member Beiträge: 34 Beitrittsdatum: 14.07.11 Neueste Beiträge
yes
Olaf Kock, geändert vor 12 Jahren.
RE: JSP Forwarding
Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
just render the html you need in doView, based on the current state of the portlet.
Don't confuse the edit mode (e.g. edit.jsp in standard portlets) with editing your business data. The edit mode is typically used for configuring a portlet. As a rule of thumb whatever you change in the edit mode is typically persisted in PortletPreferences, not in your business specific data. Edit mode is typically only accessed as some kind of administrative action, not by the regular portal user.
Don't confuse the edit mode (e.g. edit.jsp in standard portlets) with editing your business data. The edit mode is typically used for configuring a portlet. As a rule of thumb whatever you change in the edit mode is typically persisted in PortletPreferences, not in your business specific data. Edit mode is typically only accessed as some kind of administrative action, not by the regular portal user.
Sagar A Vyas, geändert vor 12 Jahren.
RE: JSP Forwarding
Liferay Master Beiträge: 679 Beitrittsdatum: 17.04.09 Neueste BeiträgeTom Cat:
Thanks for answering me, but my problem is that i want to generate the content of my jsp with a java class.
And i have four jsps (view, edit, add, delete).
Tom Cat
You mean you have four jsps and need to render base on some event ?