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 MikeCrosby <mc...@yahoo.com> on 2007/03/22 16:34:35 UTC

Returning browser to portlet location on page

I have multiple portlets on a single page.  Users have to scroll down to
access some of these portlets.

When an action is triggered within one of the portlets that are further down
on the page, is there a way to force the browser to scroll down to where the
portlet is located when the page returns/refreshes?
-- 
View this message in context: http://www.nabble.com/Returning-browser-to-portlet-location-on-page-tf3448355.html#a9617353
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Returning browser to portlet location on page

Posted by MikeCrosby <mc...@yahoo.com>.
It seems as though someone may have worked on this previously:

http://www.mail-archive.com/jetspeed-dev@portals.apache.org/msg05579.html

It looks like the thread ends without any instructions on how to add the
functionality.  I've been playing with it for a better part of today without
much luck.  If anyone has implemented this before in a scaleable manner,
some instructions would be very helpful.

For now, this is a "nice to have" feature but not quite a necessity yet on
my end.  However, I may try to play with this in whatever free time I have.


Aaron Evans-2 wrote:
> 
> Mike, you may want to put this in JIRA as an enhancement request and
> if you end up implementing it perhaps you could donate your code?
> 
> I think this would be a very useful feature to have...
> 
> On 3/22/07, MikeCrosby <mc...@yahoo.com> wrote:
>>
>> Thanks for the advice, Scott.  I'll see if I can some up with something
>> along
>> those lines. Yes, I'm using J2.0, and I figured I would need to do
>> something
>> which a named anchor.  I just wasn't sure how to handle it on the
>> Jetspeed
>> side.
>>
>>
>> Weaver, Scott-2 wrote:
>> >
>> > Hi Mike,
>> >
>> > The way I would go about achieving this is by using named anchors in
>> > your decorators.  It would go something like this:
>> >
>> > Add code to you portlet decorator(s) that defines a named anchor that
>> > matches the fragment id:
>> >
>> >
>> >
>> > That's the easier part, the harder part is that you will probably need
>> > create you own version of
>> > org.apache.jetspeed.container.url.impl.JetspeedPortletURL and
>> > org.apache.jetspeed.container.url.impl.PortletURLFactoryImpl to
>> generate
>> > the URL with the hash on the end.  This actually shouldn't be too bad
>> > since you have access to the PortletWindow whose id should match that
>> of
>> > your fragment so you can just tack that on the end of the URL, preceded
>> > by a "#".
>> >
>> > I say the second part is harder than the first, but in the grand scheme
>> > of things, it should not be to difficult depending on your level of
>> > knowledge with Jetspeed 2's API (this is assuming you are using J2 and
>> > not J1).
>> >
>> > Disclaimer:
>> > Also, this is all off the top of my head and there is no guarantee it
>> > will work as promised, but it should ;)
>> >
>> > Hth,
>> > -scott
>> >
>> >> -----Original Message-----
>> >> From: MikeCrosby [mailto:mcrosby75@yahoo.com]
>> >> Sent: Thursday, March 22, 2007 11:35 AM
>> >> To: jetspeed-user@portals.apache.org
>> >> Subject: Returning browser to portlet location on page
>> >>
>> >>
>> >> I have multiple portlets on a single page.  Users have to scroll down
>> > to
>> >> access some of these portlets.
>> >>
>> >> When an action is triggered within one of the portlets that are
>> > further
>> >> down
>> >> on the page, is there a way to force the browser to scroll down to
>> > where
>> >> the
>> >> portlet is located when the page returns/refreshes?
>> >> --
>> >> View this message in context:
>> > http://www.nabble.com/Returning-browser-to-
>> >> portlet-location-on-page-tf3448355.html#a9617353
>> >> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> >> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Returning-browser-to-portlet-location-on-page-tf3448355.html#a9618432
>> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Returning-browser-to-portlet-location-on-page-tf3448355.html#a9622414
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Returning browser to portlet location on page

Posted by Aaron Evans <aa...@gmail.com>.
Mike, you may want to put this in JIRA as an enhancement request and
if you end up implementing it perhaps you could donate your code?

I think this would be a very useful feature to have...

On 3/22/07, MikeCrosby <mc...@yahoo.com> wrote:
>
> Thanks for the advice, Scott.  I'll see if I can some up with something along
> those lines. Yes, I'm using J2.0, and I figured I would need to do something
> which a named anchor.  I just wasn't sure how to handle it on the Jetspeed
> side.
>
>
> Weaver, Scott-2 wrote:
> >
> > Hi Mike,
> >
> > The way I would go about achieving this is by using named anchors in
> > your decorators.  It would go something like this:
> >
> > Add code to you portlet decorator(s) that defines a named anchor that
> > matches the fragment id:
> >
> >
> >
> > That's the easier part, the harder part is that you will probably need
> > create you own version of
> > org.apache.jetspeed.container.url.impl.JetspeedPortletURL and
> > org.apache.jetspeed.container.url.impl.PortletURLFactoryImpl to generate
> > the URL with the hash on the end.  This actually shouldn't be too bad
> > since you have access to the PortletWindow whose id should match that of
> > your fragment so you can just tack that on the end of the URL, preceded
> > by a "#".
> >
> > I say the second part is harder than the first, but in the grand scheme
> > of things, it should not be to difficult depending on your level of
> > knowledge with Jetspeed 2's API (this is assuming you are using J2 and
> > not J1).
> >
> > Disclaimer:
> > Also, this is all off the top of my head and there is no guarantee it
> > will work as promised, but it should ;)
> >
> > Hth,
> > -scott
> >
> >> -----Original Message-----
> >> From: MikeCrosby [mailto:mcrosby75@yahoo.com]
> >> Sent: Thursday, March 22, 2007 11:35 AM
> >> To: jetspeed-user@portals.apache.org
> >> Subject: Returning browser to portlet location on page
> >>
> >>
> >> I have multiple portlets on a single page.  Users have to scroll down
> > to
> >> access some of these portlets.
> >>
> >> When an action is triggered within one of the portlets that are
> > further
> >> down
> >> on the page, is there a way to force the browser to scroll down to
> > where
> >> the
> >> portlet is located when the page returns/refreshes?
> >> --
> >> View this message in context:
> > http://www.nabble.com/Returning-browser-to-
> >> portlet-location-on-page-tf3448355.html#a9617353
> >> Sent from the Jetspeed - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> >> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Returning-browser-to-portlet-location-on-page-tf3448355.html#a9618432
> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


RE: Returning browser to portlet location on page

Posted by MikeCrosby <mc...@yahoo.com>.
Thanks for the advice, Scott.  I'll see if I can some up with something along
those lines. Yes, I'm using J2.0, and I figured I would need to do something
which a named anchor.  I just wasn't sure how to handle it on the Jetspeed
side.


Weaver, Scott-2 wrote:
> 
> Hi Mike,
> 
> The way I would go about achieving this is by using named anchors in
> your decorators.  It would go something like this:
> 
> Add code to you portlet decorator(s) that defines a named anchor that
> matches the fragment id:
> 
>   
> 
> That's the easier part, the harder part is that you will probably need
> create you own version of
> org.apache.jetspeed.container.url.impl.JetspeedPortletURL and
> org.apache.jetspeed.container.url.impl.PortletURLFactoryImpl to generate
> the URL with the hash on the end.  This actually shouldn't be too bad
> since you have access to the PortletWindow whose id should match that of
> your fragment so you can just tack that on the end of the URL, preceded
> by a "#". 
> 
> I say the second part is harder than the first, but in the grand scheme
> of things, it should not be to difficult depending on your level of
> knowledge with Jetspeed 2's API (this is assuming you are using J2 and
> not J1).
> 
> Disclaimer:
> Also, this is all off the top of my head and there is no guarantee it
> will work as promised, but it should ;)
> 
> Hth,
> -scott
> 
>> -----Original Message-----
>> From: MikeCrosby [mailto:mcrosby75@yahoo.com]
>> Sent: Thursday, March 22, 2007 11:35 AM
>> To: jetspeed-user@portals.apache.org
>> Subject: Returning browser to portlet location on page
>> 
>> 
>> I have multiple portlets on a single page.  Users have to scroll down
> to
>> access some of these portlets.
>> 
>> When an action is triggered within one of the portlets that are
> further
>> down
>> on the page, is there a way to force the browser to scroll down to
> where
>> the
>> portlet is located when the page returns/refreshes?
>> --
>> View this message in context:
> http://www.nabble.com/Returning-browser-to-
>> portlet-location-on-page-tf3448355.html#a9617353
>> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Returning-browser-to-portlet-location-on-page-tf3448355.html#a9618432
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


RE: Returning browser to portlet location on page

Posted by "Weaver, Scott" <we...@ugs.com>.
Hi Mike,

The way I would go about achieving this is by using named anchors in
your decorators.  It would go something like this:

Add code to you portlet decorator(s) that defines a named anchor that
matches the fragment id:

<a name="${f.id}"></a>

That's the easier part, the harder part is that you will probably need
create you own version of
org.apache.jetspeed.container.url.impl.JetspeedPortletURL and
org.apache.jetspeed.container.url.impl.PortletURLFactoryImpl to generate
the URL with the hash on the end.  This actually shouldn't be too bad
since you have access to the PortletWindow whose id should match that of
your fragment so you can just tack that on the end of the URL, preceded
by a "#". 

I say the second part is harder than the first, but in the grand scheme
of things, it should not be to difficult depending on your level of
knowledge with Jetspeed 2's API (this is assuming you are using J2 and
not J1).

Disclaimer:
Also, this is all off the top of my head and there is no guarantee it
will work as promised, but it should ;)

Hth,
-scott

> -----Original Message-----
> From: MikeCrosby [mailto:mcrosby75@yahoo.com]
> Sent: Thursday, March 22, 2007 11:35 AM
> To: jetspeed-user@portals.apache.org
> Subject: Returning browser to portlet location on page
> 
> 
> I have multiple portlets on a single page.  Users have to scroll down
to
> access some of these portlets.
> 
> When an action is triggered within one of the portlets that are
further
> down
> on the page, is there a way to force the browser to scroll down to
where
> the
> portlet is located when the page returns/refreshes?
> --
> View this message in context:
http://www.nabble.com/Returning-browser-to-
> portlet-location-on-page-tf3448355.html#a9617353
> Sent from the Jetspeed - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org