• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Portletmodes and portlet URLs

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Prashanth ,
Thanks you very much for the information specified.


Thanks&Regards,
mahammad gouse shaik
 
author
Posts: 469
20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic