You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Dan Olsen <da...@utah.gov> on 2008/03/26 21:51:16 UTC

Portlets default to closed

I am still trying to figure out how to make portlets default to closed. Is there anybody out there that can help me on this. I have looked at the spec but nothing there has helped. I've tried different things based on the spec but they have not worked. 
 
Maybe a good question I should ask is can Jetspeed have portlets default to closed?
 
- Dan

Re: Portlets default to closed

Posted by Andrew Strickland <st...@gmail.com>.
Oh shoot, I guess it's ActionResponse that has setWindowState.  I thought
that ActionResponse extended RenderResponse but it doesn't...they both
extend PortletResponse.

Well...then I'm not sure if you CAN do it programmatically _when_ you want
to do it, i.e. before or during first render.

On Wed, Mar 26, 2008 at 5:12 PM, Dan Olsen <da...@utah.gov> wrote:

> I have a RenderResponse object coming into the doView. The problem is that
> a RenderResponse object does not have a setWindowState function.
>
> >>> "Andrew Strickland" <st...@gmail.com> 3/26/2008 3:00 PM >>>
> That is the proper question to ask because the portlet spec doesn't say
> anything about portlet window state defaults.  So if anyone supports it,
> it's going to be portlet container specific (i.e. Jetspeed).  I couldn't
> find any answer to that question from looking at the online Jetspeed PSML
> documentation...but maybe it's just not documented?
>
> The only thing I can think of is to programmatically call
> response.setWindowState(WindowState.MINIMIZED) in the doView method of
> your
> portlet.  This way, the first time your portlet is displayed you will
> automatically render as minimized.  You'd need to define an attribute to
> remember whether you've already run doView and thus minimized once so that
> you don't minimize in subsequent doView calls.
>
> On Wed, Mar 26, 2008 at 4:51 PM, Dan Olsen <da...@utah.gov> wrote:
>
> > I am still trying to figure out how to make portlets default to closed.
> Is
> > there anybody out there that can help me on this. I have looked at the
> spec
> > but nothing there has helped. I've tried different things based on the
> spec
> > but they have not worked.
> >
> > Maybe a good question I should ask is can Jetspeed have portlets default
> > to closed?
> >
> > - Dan
> >
>

Re: Portlets default to closed

Posted by Dan Olsen <da...@utah.gov>.
I have a RenderResponse object coming into the doView. The problem is that a RenderResponse object does not have a setWindowState function.

>>> "Andrew Strickland" <st...@gmail.com> 3/26/2008 3:00 PM >>>
That is the proper question to ask because the portlet spec doesn't say
anything about portlet window state defaults.  So if anyone supports it,
it's going to be portlet container specific (i.e. Jetspeed).  I couldn't
find any answer to that question from looking at the online Jetspeed PSML
documentation...but maybe it's just not documented?

The only thing I can think of is to programmatically call
response.setWindowState(WindowState.MINIMIZED) in the doView method of your
portlet.  This way, the first time your portlet is displayed you will
automatically render as minimized.  You'd need to define an attribute to
remember whether you've already run doView and thus minimized once so that
you don't minimize in subsequent doView calls.

On Wed, Mar 26, 2008 at 4:51 PM, Dan Olsen <da...@utah.gov> wrote:

> I am still trying to figure out how to make portlets default to closed. Is
> there anybody out there that can help me on this. I have looked at the spec
> but nothing there has helped. I've tried different things based on the spec
> but they have not worked.
>
> Maybe a good question I should ask is can Jetspeed have portlets default
> to closed?
>
> - Dan
>

Re: Portlets default to closed

Posted by Andrew Strickland <st...@gmail.com>.
That is the proper question to ask because the portlet spec doesn't say
anything about portlet window state defaults.  So if anyone supports it,
it's going to be portlet container specific (i.e. Jetspeed).  I couldn't
find any answer to that question from looking at the online Jetspeed PSML
documentation...but maybe it's just not documented?

The only thing I can think of is to programmatically call
response.setWindowState(WindowState.MINIMIZED) in the doView method of your
portlet.  This way, the first time your portlet is displayed you will
automatically render as minimized.  You'd need to define an attribute to
remember whether you've already run doView and thus minimized once so that
you don't minimize in subsequent doView calls.

On Wed, Mar 26, 2008 at 4:51 PM, Dan Olsen <da...@utah.gov> wrote:

> I am still trying to figure out how to make portlets default to closed. Is
> there anybody out there that can help me on this. I have looked at the spec
> but nothing there has helped. I've tried different things based on the spec
> but they have not worked.
>
> Maybe a good question I should ask is can Jetspeed have portlets default
> to closed?
>
> - Dan
>