James,

Unfortunately, that's all you can do for now.  If I come up with a better
approach I will let you know.

Regards,
-Scott

> -----Original Message-----
> From: James Liao [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 08, 2005 9:20 PM
> To: Jetspeed Users List
> Subject: Re: How to change portlet windowState in Velocity template?
> 
> It works! Thanks, Scott!
> Another question:
> What I want is to control portlet window state. So I did like this:
> 
> 1. Put WindowState constant into velocity context in portlet class:
> // WindowState constants
> context.put(AcacResources.WINDOWSTATE_MINIMIZED, WindowState.MINIMIZED);
> context.put(AcacResources.WINDOWSTATE_MAXIMIZED, WindowState.MAXIMIZED);
> context.put(AcacResources.WINDOWSTATE_NORMAL, WindowState.NORMAL);
> 
> 2. Call it like this(according to you suggestion):
> #set($ActionUrl = $$renderResponse.createActionURL())
> $!ActionUrl.setWindowState($maximizedState)
> <a href="$ActionUrl">Max Me</a>
> 
> Is there any better solution? Since the parameter of setWindowState()
> is not string but an object, do I have to put it into context before I
> can use it. Is that possible to use a java class in vm files directly?
> 
> - James Liao
> 
> On 8/8/05, Scott T Weaver <[EMAIL PROTECTED]> wrote:
> > Hi James,
> >
> > Try this:
> >
> > #set($editUrl = $response.createRenderURL())
> > $!editUrl.setPortletMode("EDIT")
> >
> > <a href="$editUrl">Edit Me</a>
> >
> > Hth,
> > -Scott
> >
> > > -----Original Message-----
> > > From: James Liao [mailto:[EMAIL PROTECTED]
> > > Sent: Sunday, August 07, 2005 8:57 PM
> > > To: Jetspeed Users List
> > > Subject: How to change portlet windowState in Velocity template?
> > >
> > > Hi all,
> > > I need your help. As I know, I can write something like this(intercept
> > > from PickANumber.jsp):
> > > <portlet:renderURL var="helpMe" portletMode='help'/>
> > > <portlet:renderURL var="editMe" portletMode='Edit'/>
> > > <portlet:renderURL var="maxMe" windowState='Maximized'/>
> > > <portlet:renderURL var="minMe" windowState='Minimized'/>
> > > to generate some urls which can change the portlet instance's mode or
> > > portlet instance's window state. How to do the same thing in  Velocity
> > > template(*.vm files)?
> > >
> > > Another question:
> > > Can I change a portlet's mode or portlet window state in portlet's
> > > doView() or doAction methods directly?
> > >
> > > Any help would be appreciated!
> > >
> > > - James Liao
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to