You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jean-Christophe Kermagoret <jc...@babelobjects.com> on 2004/03/02 12:25:06 UTC

[portal] Minimizing coplets events

Hello,
I'd like to send minimize events from one portlet to another.

This way, I have a kind of menu that is able to show the right portlet 
just by showing or hiding it.

Is it possible ? How ?

Thanks
-- 

Jean-Christophe Kermagoret
jck@BabelObjects.Com




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [portal] hidding coplet ( was Minimizing coplets events)

Posted by Alex Romayev <ro...@yahoo.com>.
Hi Laurent,

Yes, it does make sense, however if I make it a bit
more complex, it's becoming difficult to manage.

Let's say my "News Story" page has the following
coplets:

- News Story
- Related News Stories (if any)
- Related Photos (if any)
- List of other sites talking about the topic (if any)
- Auctions on eBay selling items related to this story
;-)...

I think you know what I'm getting at :)

Technically each portlet is capable of rendering
itself give the story-id.  The only thing out of its
contol is the window.

-Alex

--- Laurent Trillaud <lt...@jouve.fr> wrote:
> Alex
> For me it's straight forward, unless I miss
> something. You haven't even need
> of visibility feature, just page switching.
> Your portal has 3 pages:
> 1. a page with 1 coplet with the list of all the
> stories
> 2. a page with 1 coplet with the story selected
> 3. a page with 2 coplets with the story selected and
> the related story.
> When you process the list of all stories, you can
> build a link with events
> depends of the story.
> For a story without related, generate:
> - an event to switch to page 2
> - an event to put the story id in coplet 1
> For a story with related, generate: 
> - an event to switch to page 3
> - an event to put the story id in coplet 1
> - an event to put the related story id in coplet 2
> The pipeline associated to the display of stories,
> just get the story id
> from his coplet attributes.
> Does make sense for you?
> Laurent
> 
> > Hi Laurent,
> > 
> > There are two scenarios I can think of:
> > - I have a page with a "list of news stories"
> portlet
> > and when I click on the story, another portlet
> shows
> > up with the story itself on the same page.  I
> think
> > you approach will work here.
> > - I have "news story" portlet and "related news"
> > portlet on the same page.  If there are any
> related
> > news, then show the portlet, if not, the header
> should
> > not be displayed.  I think this is the one the
> portal
> > might not be able to handle.  The only thing I can
> > think of is running a "cleanup" stylesheet, which
> > removes empty headers, but that's a bit of a hack
> :-)
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [portal] hidding coplet ( was Minimizing coplets events)

Posted by Laurent Trillaud <lt...@jouve.fr>.
Alex
For me it's straight forward, unless I miss something. You haven't even need
of visibility feature, just page switching.
Your portal has 3 pages:
1. a page with 1 coplet with the list of all the stories
2. a page with 1 coplet with the story selected
3. a page with 2 coplets with the story selected and the related story.
When you process the list of all stories, you can build a link with events
depends of the story.
For a story without related, generate:
- an event to switch to page 2
- an event to put the story id in coplet 1
For a story with related, generate: 
- an event to switch to page 3
- an event to put the story id in coplet 1
- an event to put the related story id in coplet 2
The pipeline associated to the display of stories, just get the story id
from his coplet attributes.
Does make sense for you?
Laurent

> Hi Laurent,
> 
> There are two scenarios I can think of:
> - I have a page with a "list of news stories" portlet
> and when I click on the story, another portlet shows
> up with the story itself on the same page.  I think
> you approach will work here.
> - I have "news story" portlet and "related news"
> portlet on the same page.  If there are any related
> news, then show the portlet, if not, the header should
> not be displayed.  I think this is the one the portal
> might not be able to handle.  The only thing I can
> think of is running a "cleanup" stylesheet, which
> removes empty headers, but that's a bit of a hack :-)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [portal] hidding coplet ( was Minimizing coplets events)

Posted by Alex Romayev <ro...@yahoo.com>.
Hi Laurent,

There are two scenarios I can think of:
- I have a page with a "list of news stories" portlet
and when I click on the story, another portlet shows
up with the story itself on the same page.  I think
you approach will work here.
- I have "news story" portlet and "related news"
portlet on the same page.  If there are any related
news, then show the portlet, if not, the header should
not be displayed.  I think this is the one the portal
might not be able to handle.  The only thing I can
think of is running a "cleanup" stylesheet, which
removes empty headers, but that's a bit of a hack :-)

Thanks,
-Alex

--- Laurent Trillaud <lt...@jouve.fr> wrote:
> Alex
> It appears to me difficult. The portal generater
> have 2 stages:
> 1. it resolve all events, and set coplets data /
> attributes
> 2. render thee coplet based on its datas
> Later in the pipeline you have the cinclude to fill
> coplets.
> Here, is too late to change the aspect of a coplet.
> The best way is to now before if a coplet will have
> data or not, may be
> based on parameters, and set the visibility aspect
> with a cl:link.
> Laurent
> 
> > Hi Laurent,
> > 
> > I think I like the second option better.  One
> thing
> > I'm not sure about: how do I know if my coplet has
> > returned any content when I render the window? 
> IIUTC,
> > when portal renders the coplet window, the actual
> > coplet content is not included yet (this is done
> later
> > with cinlcude transformer).  Is this correct?
> > 
> > Thanks,
> > -Alex
> > 
> > --- Laurent Trillaud <lt...@jouve.fr> wrote:
> > > Alex
> > > I see 2 solutions: the first one is easy to do
> but
> > > it's just an hack. The
> > > second is, in my opinion, a better way but I
> haven't
> > > tested it.
> > > I suppose that you can check if a coplet as data
> by
> > > any input module
> > > 1. The easy way
> > > The goal is to modify the
> > > skins/.../styles/window.xsl. Put the code inside
> a
> > > DIV with the style 'visibility' set ` show or
> hide
> > > depend of a parameters in
> > > the XSL got from the layout/portal.xml with the
> tag
> > > <parameter name=""
> > > value=""/>
> > > 2. The better way
> > > The goal is to create another aspect for a
> coplet
> > > called for exemple
> > > 'coplet-visibility'. You must declare it in the
> > > cocoon.xconf (use the
> > > coplet-full-screen as sample) and declare this
> new
> > > aspect in the the
> > > renderer window).
> > > Then you will be able to hide or show a coplet
> with
> > > the same way that you
> > > minimize or maximize a coplet.
> > > Good Luck ;-)
> > > Laurent
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [portal] hidding coplet ( was Minimizing coplets events)

Posted by Laurent Trillaud <lt...@jouve.fr>.
Alex
It appears to me difficult. The portal generater have 2 stages:
1. it resolve all events, and set coplets data / attributes
2. render thee coplet based on its datas
Later in the pipeline you have the cinclude to fill coplets.
Here, is too late to change the aspect of a coplet.
The best way is to now before if a coplet will have data or not, may be
based on parameters, and set the visibility aspect with a cl:link.
Laurent

> Hi Laurent,
> 
> I think I like the second option better.  One thing
> I'm not sure about: how do I know if my coplet has
> returned any content when I render the window?  IIUTC,
> when portal renders the coplet window, the actual
> coplet content is not included yet (this is done later
> with cinlcude transformer).  Is this correct?
> 
> Thanks,
> -Alex
> 
> --- Laurent Trillaud <lt...@jouve.fr> wrote:
> > Alex
> > I see 2 solutions: the first one is easy to do but
> > it's just an hack. The
> > second is, in my opinion, a better way but I haven't
> > tested it.
> > I suppose that you can check if a coplet as data by
> > any input module
> > 1. The easy way
> > The goal is to modify the
> > skins/.../styles/window.xsl. Put the code inside a
> > DIV with the style 'visibility' set ` show or hide
> > depend of a parameters in
> > the XSL got from the layout/portal.xml with the tag
> > <parameter name=""
> > value=""/>
> > 2. The better way
> > The goal is to create another aspect for a coplet
> > called for exemple
> > 'coplet-visibility'. You must declare it in the
> > cocoon.xconf (use the
> > coplet-full-screen as sample) and declare this new
> > aspect in the the
> > renderer window).
> > Then you will be able to hide or show a coplet with
> > the same way that you
> > minimize or maximize a coplet.
> > Good Luck ;-)
> > Laurent


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [portal] Minimizing coplets events

Posted by Alex Romayev <ro...@yahoo.com>.
Hi Laurent,

I think I like the second option better.  One thing
I'm not sure about: how do I know if my coplet has
returned any content when I render the window?  IIUTC,
when portal renders the coplet window, the actual
coplet content is not included yet (this is done later
with cinlcude transformer).  Is this correct?

Thanks,
-Alex

--- Laurent Trillaud <lt...@jouve.fr> wrote:
> Alex
> I see 2 solutions: the first one is easy to do but
> it's just an hack. The
> second is, in my opinion, a better way but I haven't
> tested it.
> I suppose that you can check if a coplet as data by
> any input module
> 1. The easy way
> The goal is to modify the
> skins/.../styles/window.xsl. Put the code inside a
> DIV with the style 'visibility' set � show or hide
> depend of a parameters in
> the XSL got from the layout/portal.xml with the tag
> <parameter name=""
> value=""/>
> 2. The better way
> The goal is to create another aspect for a coplet
> called for exemple
> 'coplet-visibility'. You must declare it in the
> cocoon.xconf (use the
> coplet-full-screen as sample) and declare this new
> aspect in the the
> renderer window).
> Then you will be able to hide or show a coplet with
> the same way that you
> minimize or maximize a coplet.
> Good Luck ;-)
> Laurent
> 
> 
> > -----Message d'origine-----
> > De�: Alex Romayev [mailto:romayev@yahoo.com]
> > Envoy�: mercredi 3 mars 2004 13:35
> > ��: users@cocoon.apache.org
> > Objet�: RE: [portal] Minimizing coplets events
> > 
> > Hi Laurent,
> > 
> > Can you elaborate on the last piece.  I'd like to
> be
> > able to show a coplet when it has data and hide
> when
> > nothing is returned.  I'm not sure how I would
> control
> > this with a renderer.
> > 
> > Thanks,
> > -Alex
> > 
> > --- Laurent Trillaud <lt...@jouve.fr> wrote:
> > > Jean-Christophe
> > > Minimize a coplet with the default renderer,
> isn't
> > > to show or hide a coplet
> > > but to minimize or restore. The title bar is
> still
> > > visible!
> > > If you want to do this you need to send an event
> to
> > > the coplet and change de
> > > aspectDatas/size. Use aspectDatas/fullScreen to
> > > mazimize it.
> > > Now if you really want to hide a coplet you need
> to
> > > change the renderer or
> > > create a new one, and then use the same event
> > > mechanism.
> > > Laurent Trillaud
> > >
> > > > Hello,
> > > > I'd like to send minimize events from one
> portlet
> > > to another.
> > > > This way, I have a kind of menu that is able
> to
> > > show the right portlet
> > > > just by showing or hiding it.
> > > > Is it possible ? How ?
> > > >
> > > > Thanks
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail:
> > > users-help@cocoon.apache.org
> > >
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [portal] Minimizing coplets events

Posted by Laurent Trillaud <lt...@jouve.fr>.
Alex
I see 2 solutions: the first one is easy to do but it's just an hack. The
second is, in my opinion, a better way but I haven't tested it.
I suppose that you can check if a coplet as data by any input module
1. The easy way
The goal is to modify the skins/.../styles/window.xsl. Put the code inside a
DIV with the style 'visibility' set à show or hide depend of a parameters in
the XSL got from the layout/portal.xml with the tag <parameter name=""
value=""/>
2. The better way
The goal is to create another aspect for a coplet called for exemple
'coplet-visibility'. You must declare it in the cocoon.xconf (use the
coplet-full-screen as sample) and declare this new aspect in the the
renderer window).
Then you will be able to hide or show a coplet with the same way that you
minimize or maximize a coplet.
Good Luck ;-)
Laurent


> -----Message d'origine-----
> De : Alex Romayev [mailto:romayev@yahoo.com]
> Envoyé : mercredi 3 mars 2004 13:35
> À : users@cocoon.apache.org
> Objet : RE: [portal] Minimizing coplets events
> 
> Hi Laurent,
> 
> Can you elaborate on the last piece.  I'd like to be
> able to show a coplet when it has data and hide when
> nothing is returned.  I'm not sure how I would control
> this with a renderer.
> 
> Thanks,
> -Alex
> 
> --- Laurent Trillaud <lt...@jouve.fr> wrote:
> > Jean-Christophe
> > Minimize a coplet with the default renderer, isn't
> > to show or hide a coplet
> > but to minimize or restore. The title bar is still
> > visible!
> > If you want to do this you need to send an event to
> > the coplet and change de
> > aspectDatas/size. Use aspectDatas/fullScreen to
> > mazimize it.
> > Now if you really want to hide a coplet you need to
> > change the renderer or
> > create a new one, and then use the same event
> > mechanism.
> > Laurent Trillaud
> >
> > > Hello,
> > > I'd like to send minimize events from one portlet
> > to another.
> > > This way, I have a kind of menu that is able to
> > show the right portlet
> > > just by showing or hiding it.
> > > Is it possible ? How ?
> > >
> > > Thanks
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> > users-help@cocoon.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [portal] Minimizing coplets events

Posted by Alex Romayev <ro...@yahoo.com>.
Hi Laurent,

Can you elaborate on the last piece.  I'd like to be
able to show a coplet when it has data and hide when
nothing is returned.  I'm not sure how I would control
this with a renderer.

Thanks,
-Alex

--- Laurent Trillaud <lt...@jouve.fr> wrote:
> Jean-Christophe
> Minimize a coplet with the default renderer, isn't
> to show or hide a coplet
> but to minimize or restore. The title bar is still
> visible!
> If you want to do this you need to send an event to
> the coplet and change de
> aspectDatas/size. Use aspectDatas/fullScreen to
> mazimize it.
> Now if you really want to hide a coplet you need to
> change the renderer or
> create a new one, and then use the same event
> mechanism.
> Laurent Trillaud
> 
> > Hello,
> > I'd like to send minimize events from one portlet
> to another.
> > This way, I have a kind of menu that is able to
> show the right portlet
> > just by showing or hiding it.
> > Is it possible ? How ?
> > 
> > Thanks
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [portal] Minimizing coplets events

Posted by Laurent Trillaud <lt...@jouve.fr>.
Jean-Christophe
Minimize a coplet with the default renderer, isn't to show or hide a coplet
but to minimize or restore. The title bar is still visible!
If you want to do this you need to send an event to the coplet and change de
aspectDatas/size. Use aspectDatas/fullScreen to mazimize it.
Now if you really want to hide a coplet you need to change the renderer or
create a new one, and then use the same event mechanism.
Laurent Trillaud

> Hello,
> I'd like to send minimize events from one portlet to another.
> This way, I have a kind of menu that is able to show the right portlet
> just by showing or hiding it.
> Is it possible ? How ?
> 
> Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org