> > Is it possible to stop the rendering of a portlet when an error
> occurs in
> > the buildNormalContext method? For example, if the portlet uses
> a URL and
> > the URL can't be reached, the portlet doesn't need to be displayed. Any
> > ideas?
>
> Short answer: you can't. Basically, as soon as a portlet is rendered
> the data is sent to server and for all practical purposes can't be
> undone.

Ah..


> So, what you want is to do the resource fetching _before_ any of the
> portlet is rendered. One way to do this is to create an Action that
> does the fetching, and upon a submit from your portlet, go to this
> Action.

In my current setup I extend the JspPortletAction, and pass all necessary
attributes to the JSP by setting them in the HttpServletRequest. My Portlet
definition uses 'JSP' as a parent. So, when the portlet is displayed for the
first time, the buildNormalContext of the extended JspPortletAction function
is called. As I now understand it, by this time it is too late? (What data
has been sent?) Any data that is fetched in this function can't stop the
rendering?

How can an Action that fetches the data stop the rendering of a Portlet, as
you describe?

Thanks for the tips,

Roel




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to