when is handleActionRequest be called?

Hello people,

can anyone tell me when will the handleActionRequest on the vaadin portlet be called?
I found an example from this link http://dev.vaadin.com/svn/doc/book-examples/trunk/src/com/vaadin/book/examples/portlet/PortletCustomModeExample.java

If we see, there are:

  1. handleActionRequest ???
  2. handleEventRequest ???
  3. handleRenderRequest - is called everytime the page is refreshed
  4. handleResourceRequest -is called once at the begining when the portlet is added to the page

can anyone please help me?

Normally a Vaadin-application and its portlet communicate over resource-requests all the time as those are not requiring the Portal-server to resend the whole page. The initially Render-request is not issued by Vaadin (as the application doesn’t exist at that point in time) but by the Portal itself. Action-requests are never issued from a Vaadin-app, but could happen if you integrate Vaadin with other frameworks - for example JSF. An event-request will be fired if you are using Interportlet-Communication as defined in the JSR286-standard.

Note that both action- and event-request also require the portal-server to resend the whole page, which makes these requests pretty AJAX-unfriendly. They should therefore be avoided.

A great explanation but adding a small precision: there are in fact two situations where current versions of Vaadin do send action requests and then handle those requests themselves. These cases are “hidden” from the end user but do cause page reloads. However, page reloads would in any case be necessary in those situations.

The two cases: setting a shared render parameter and sending a portlet event are only possible when processing certain types of portlet requests (action or event requests). If the current request is not one of these types, a Vaadin portlet will send itself an action request in the context of which both of these can be done. Most portlets do not run into these situations, though.