• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Portletmodes and portlet URLs

 
mahammad gouse
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i am using portlets. i am in an initial state to learn portlets.
i have a query what are the portlet types.
i have an idea of VIEW,EDIT and HELP.
what is a VIEW exactly and when EDIT is used.
how these work.
and
what are Portlet URLs:
1) Action URL
2) Render URL

lastly
what are the window states like MINIMIZE MAXIMIZE and NORMAL
are these buttons which we observe in the windows.

how and when these are used.


any help would be greatly appreciated
Thanks&Regards,
mahammad gouse shaik
 
Reddy Prashanth
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

By default all portal containers support these 3 modes (view/edit/help).

In view mode, you can show any content to the users. Using edit more , you can give users a chance to save their preferences or admins can configure the portlet. Using help mode, you can present the user some help content on how to access your portlet.

Let's take an example of simple bookmark portlet. In the VIEW mode, it shows the existing bookmark urls . And users can add/remove their bookmark by clicking on the EDIT mode. The help mode shows how to use the portlet.
What to put in VIEW or EDIT modes depends on your requirements. Please refer to some exisitng portlets to get clear idea.

Unlike servlets, portlets supports two types of urls (Action url and Render url). Unlike servlets portlets has two mehtods (processAction and render).

For Action URL, the portlet container will call the processAction(..) which performs the backedn logic and then calls the render(..) which renders the content.
For Render URL, the portlet container will call the render(..) method directly and renders the content.

Generally, in the EDIT mode, we'll display a form with action url as the form submit action , so when the users edit some thing and save, the processAction will be executed. In processAction, we'll put our logic like persisting the data and setting required model data for our view. Finally the render method will be called which displays the content.

Please refer to the portlet specification (JSR168 ) for more information.
 
mahammad gouse
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prashanth ,
Thanks you very much for the information specified.


Thanks&Regards,
mahammad gouse shaik
 
Ashish Sarin
author
Ranch Hand
Posts: 444
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find some additional information in this article:
http://www.developer.com/java/web/article.php/3891786/Portlets-vs-Servlets-Request-Processing-with-Web-Components.htm

regards
ashish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic