You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2014/04/09 16:42:37 UTC

5.4 Endless Scroll Component

Hi Guys, has anybody happened to build an endless scroll component for 5.4?

If not I'd like to build one and I'd like some ideas on how to get started
with it.

The component would be used with the loop component, so I would probably
return 25 results by default and append an additional 25 once the scroll
bar reached a particular point. Should I wrap the loop in a zone and load
each new zone with the new set of results? I'm really not sure how to go
about this.

Thanks

Re: 5.4 Endless Scroll Component

Posted by George Christman <gc...@cardaddy.com>.
That's an interesting idea lance. It would be cool if we could detect js
before the page ever renders and serve up the appropriate UI. For the time
being I'd like to use this feature with mobile, but after reading some of
the side effects example the back button etc may prove very challenging.


On Thu, Apr 10, 2014 at 4:26 AM, Lance Java <la...@googlemail.com>wrote:

> Whatever the solution, I think it should gracefully degrade for crawlers /
> bots etc. Ie initially render page links then replace page links with
> infinite scroll if javascript is available.
>  On 9 Apr 2014 15:43, "George Christman" <gc...@cardaddy.com> wrote:
>
> > Hi Guys, has anybody happened to build an endless scroll component for
> 5.4?
> >
> > If not I'd like to build one and I'd like some ideas on how to get
> started
> > with it.
> >
> > The component would be used with the loop component, so I would probably
> > return 25 results by default and append an additional 25 once the scroll
> > bar reached a particular point. Should I wrap the loop in a zone and load
> > each new zone with the new set of results? I'm really not sure how to go
> > about this.
> >
> > Thanks
> >
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York

Re: 5.4 Endless Scroll Component

Posted by Lance Java <la...@googlemail.com>.
Whatever the solution, I think it should gracefully degrade for crawlers /
bots etc. Ie initially render page links then replace page links with
infinite scroll if javascript is available.
 On 9 Apr 2014 15:43, "George Christman" <gc...@cardaddy.com> wrote:

> Hi Guys, has anybody happened to build an endless scroll component for 5.4?
>
> If not I'd like to build one and I'd like some ideas on how to get started
> with it.
>
> The component would be used with the loop component, so I would probably
> return 25 results by default and append an additional 25 once the scroll
> bar reached a particular point. Should I wrap the loop in a zone and load
> each new zone with the new set of results? I'm really not sure how to go
> about this.
>
> Thanks
>

Re: 5.4 Endless Scroll Component

Posted by Lance Java <la...@googlemail.com>.
Yes, the back button will be broken. I think this is the case with all
Tapestry ajax interactions. There's a few javascript libraries that use
anchor URL's (#) and the javascript history api to support the back button.
I've never tried integrating any of these with tapestry. Perhaps this
deserves it's own forum thread?

On 13 Apr 2014 21:38, "George Christman" <gc...@cardaddy.com> wrote:
>
> How do you think it will work with the back button? I'm assuming as soon
as
> you navigate away from the page and return with the back button your
going to lose your results?

Re: 5.4 Endless Scroll Component

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Sun, 13 Apr 2014 17:38:27 -0300, George Christman  
<gc...@cardaddy.com> wrote:

> How do you think it will work with the back button? I'm assuming as soon  
> as you navigate away from the page and return with the back button your  
> going to lose your results?

As far as I know, back button usually doesn't work with endless scroll  
implementations anyway.

Nobody asked, but I really dislike endless scroll.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


Re: 5.4 Endless Scroll Component

Posted by "Nourredine K." <no...@gmail.com>.
True. Ajax requests are not stored in the browser's history.
But this can be worked around by binding an action (ajax request) to an url
hash.
This can be done by using a javascript module such as jquery-ajax[1] (see
the demo[2]).

Never tested. Seems too intrusive and painfull for existing code but can be
an alternative for new implementations or if the feature is required

[1] https://github.com/balupton/jquery-ajaxy
[2] http://balupton.github.io/jquery-ajaxy/demo/

Nourredine.


2014-04-13 22:38 GMT+02:00 George Christman <gc...@cardaddy.com>:

> How do you think it will work with the back button? I'm assuming as soon as
> you navigate away from the page and return with the back button your going
> to lose your results?
>
>
> On Fri, Apr 11, 2014 at 4:14 AM, Lance Java <lance.java@googlemail.com
> >wrote:
>
> > Perhaps Barry's solution could be applied to my pager component
> > http://tapestry-stitch.uklance.cloudbees.net/pagerdemo
> >
> > The pager is driven by GridDataSource but allows you to render a page of
> > data however you like (ie in an list).
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>

Re: 5.4 Endless Scroll Component

Posted by George Christman <gc...@cardaddy.com>.
How do you think it will work with the back button? I'm assuming as soon as
you navigate away from the page and return with the back button your going
to lose your results?


On Fri, Apr 11, 2014 at 4:14 AM, Lance Java <la...@googlemail.com>wrote:

> Perhaps Barry's solution could be applied to my pager component
> http://tapestry-stitch.uklance.cloudbees.net/pagerdemo
>
> The pager is driven by GridDataSource but allows you to render a page of
> data however you like (ie in an list).
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York

Re: 5.4 Endless Scroll Component

Posted by Lance Java <la...@googlemail.com>.
Perhaps Barry's solution could be applied to my pager component
http://tapestry-stitch.uklance.cloudbees.net/pagerdemo

The pager is driven by GridDataSource but allows you to render a page of
data however you like (ie in an list).

Re: 5.4 Endless Scroll Component

Posted by Barry Books <tr...@gmail.com>.
I wrote this one a few years ago. It's a mixin that you can attach to the
grid. It fetches more rows using the pagination links and adds them to the
page. This allows it to works the way Lance wants, it works with or without
javascript enabled. Most/all of the work is done by a jquery
 lib

https://github.com/trsvax/tapestry-bootstrap/blob/BootstrapBlog/src/main/java/com/trsvax/bootstrap/mixins/InfiniteScroll.java


On Thu, Apr 10, 2014 at 1:19 PM, George Christman
<gc...@cardaddy.com>wrote:

> On Thu, Apr 10, 2014 at 5:04 AM, françois facon <fr...@gmail.com>
> wrote:
>
> The last time I tried Tap-Jquery it wasn't ready, I'll have to give it a
> try again. I'm using beta-3, do you think it will still work with 3 too?
>
> did you test the branch related to 5.4 ?
> >
> > According to
> >
> >
> https://github.com/got5/tapestry5-jquery/blob/5.4/src/main/java/org/got5/tapestry5/jquery/components/PageScroll.java
> >
> > and
> >
> >
> https://github.com/got5/tapestry5-jquery/blob/5.4/src/main/resources/META-INF/modules/tjq/jscrollpane.js
> >
> > this component should work for 5.4-beta-2.
> >
> > François
> >
> >
> >
> > 2014-04-09 17:03 GMT+02:00 George Christman <gc...@cardaddy.com>:
> >
> > > Excellent, thanks Nourrdine, looks like we just need a 5.4
> implementation
> > > now :)
> > >
> > >
> > > On Wed, Apr 9, 2014 at 10:57 AM, Nourredine K. <nourredine.k@gmail.com
> > > >wrote:
> > >
> > > > Hi George,
> > > >
> > > > Taha's article should be a good start :
> > > >
> > > >
> > >
> >
> http://tawus.wordpress.com/2012/11/25/scrolling-pages-tapestry5-onscrollbeyond/
> > > >
> > > > Also, check the PageScroll component's implementation in the
> > > > tapestry5-jquery module :
> > > >
> > > >
> > >
> >
> https://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/components/PageScroll.java
> > > >
> > > > Both are tapestry 5.3 implementation
> > > >
> > > > Nourredine.
> > > >
> > > >
> > > > 2014-04-09 16:42 GMT+02:00 George Christman <gchristman@cardaddy.com
> >:
> > > >
> > > > > Hi Guys, has anybody happened to build an endless scroll component
> > for
> > > > 5.4?
> > > > >
> > > > > If not I'd like to build one and I'd like some ideas on how to get
> > > > started
> > > > > with it.
> > > > >
> > > > > The component would be used with the loop component, so I would
> > > probably
> > > > > return 25 results by default and append an additional 25 once the
> > > scroll
> > > > > bar reached a particular point. Should I wrap the loop in a zone
> and
> > > load
> > > > > each new zone with the new set of results? I'm really not sure how
> to
> > > go
> > > > > about this.
> > > > >
> > > > > Thanks
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > George Christman
> > > www.CarDaddy.com
> > > P.O. Box 735
> > > Johnstown, New York
> > >
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>

Re: 5.4 Endless Scroll Component

Posted by George Christman <gc...@cardaddy.com>.
On Thu, Apr 10, 2014 at 5:04 AM, françois facon <fr...@gmail.com> wrote:

The last time I tried Tap-Jquery it wasn't ready, I'll have to give it a
try again. I'm using beta-3, do you think it will still work with 3 too?

did you test the branch related to 5.4 ?
>
> According to
>
> https://github.com/got5/tapestry5-jquery/blob/5.4/src/main/java/org/got5/tapestry5/jquery/components/PageScroll.java
>
> and
>
> https://github.com/got5/tapestry5-jquery/blob/5.4/src/main/resources/META-INF/modules/tjq/jscrollpane.js
>
> this component should work for 5.4-beta-2.
>
> François
>
>
>
> 2014-04-09 17:03 GMT+02:00 George Christman <gc...@cardaddy.com>:
>
> > Excellent, thanks Nourrdine, looks like we just need a 5.4 implementation
> > now :)
> >
> >
> > On Wed, Apr 9, 2014 at 10:57 AM, Nourredine K. <nourredine.k@gmail.com
> > >wrote:
> >
> > > Hi George,
> > >
> > > Taha's article should be a good start :
> > >
> > >
> >
> http://tawus.wordpress.com/2012/11/25/scrolling-pages-tapestry5-onscrollbeyond/
> > >
> > > Also, check the PageScroll component's implementation in the
> > > tapestry5-jquery module :
> > >
> > >
> >
> https://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/components/PageScroll.java
> > >
> > > Both are tapestry 5.3 implementation
> > >
> > > Nourredine.
> > >
> > >
> > > 2014-04-09 16:42 GMT+02:00 George Christman <gc...@cardaddy.com>:
> > >
> > > > Hi Guys, has anybody happened to build an endless scroll component
> for
> > > 5.4?
> > > >
> > > > If not I'd like to build one and I'd like some ideas on how to get
> > > started
> > > > with it.
> > > >
> > > > The component would be used with the loop component, so I would
> > probably
> > > > return 25 results by default and append an additional 25 once the
> > scroll
> > > > bar reached a particular point. Should I wrap the loop in a zone and
> > load
> > > > each new zone with the new set of results? I'm really not sure how to
> > go
> > > > about this.
> > > >
> > > > Thanks
> > > >
> > >
> >
> >
> >
> > --
> > George Christman
> > www.CarDaddy.com
> > P.O. Box 735
> > Johnstown, New York
> >
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York

Re: 5.4 Endless Scroll Component

Posted by françois facon <fr...@gmail.com>.
did you test the branch related to 5.4 ?

According to
https://github.com/got5/tapestry5-jquery/blob/5.4/src/main/java/org/got5/tapestry5/jquery/components/PageScroll.java

and
https://github.com/got5/tapestry5-jquery/blob/5.4/src/main/resources/META-INF/modules/tjq/jscrollpane.js

this component should work for 5.4-beta-2.

François



2014-04-09 17:03 GMT+02:00 George Christman <gc...@cardaddy.com>:

> Excellent, thanks Nourrdine, looks like we just need a 5.4 implementation
> now :)
>
>
> On Wed, Apr 9, 2014 at 10:57 AM, Nourredine K. <nourredine.k@gmail.com
> >wrote:
>
> > Hi George,
> >
> > Taha's article should be a good start :
> >
> >
> http://tawus.wordpress.com/2012/11/25/scrolling-pages-tapestry5-onscrollbeyond/
> >
> > Also, check the PageScroll component's implementation in the
> > tapestry5-jquery module :
> >
> >
> https://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/components/PageScroll.java
> >
> > Both are tapestry 5.3 implementation
> >
> > Nourredine.
> >
> >
> > 2014-04-09 16:42 GMT+02:00 George Christman <gc...@cardaddy.com>:
> >
> > > Hi Guys, has anybody happened to build an endless scroll component for
> > 5.4?
> > >
> > > If not I'd like to build one and I'd like some ideas on how to get
> > started
> > > with it.
> > >
> > > The component would be used with the loop component, so I would
> probably
> > > return 25 results by default and append an additional 25 once the
> scroll
> > > bar reached a particular point. Should I wrap the loop in a zone and
> load
> > > each new zone with the new set of results? I'm really not sure how to
> go
> > > about this.
> > >
> > > Thanks
> > >
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>

Re: 5.4 Endless Scroll Component

Posted by George Christman <gc...@cardaddy.com>.
Excellent, thanks Nourrdine, looks like we just need a 5.4 implementation
now :)


On Wed, Apr 9, 2014 at 10:57 AM, Nourredine K. <no...@gmail.com>wrote:

> Hi George,
>
> Taha's article should be a good start :
>
> http://tawus.wordpress.com/2012/11/25/scrolling-pages-tapestry5-onscrollbeyond/
>
> Also, check the PageScroll component's implementation in the
> tapestry5-jquery module :
>
> https://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/components/PageScroll.java
>
> Both are tapestry 5.3 implementation
>
> Nourredine.
>
>
> 2014-04-09 16:42 GMT+02:00 George Christman <gc...@cardaddy.com>:
>
> > Hi Guys, has anybody happened to build an endless scroll component for
> 5.4?
> >
> > If not I'd like to build one and I'd like some ideas on how to get
> started
> > with it.
> >
> > The component would be used with the loop component, so I would probably
> > return 25 results by default and append an additional 25 once the scroll
> > bar reached a particular point. Should I wrap the loop in a zone and load
> > each new zone with the new set of results? I'm really not sure how to go
> > about this.
> >
> > Thanks
> >
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York

Re: 5.4 Endless Scroll Component

Posted by "Nourredine K." <no...@gmail.com>.
Hi George,

Taha's article should be a good start :
http://tawus.wordpress.com/2012/11/25/scrolling-pages-tapestry5-onscrollbeyond/

Also, check the PageScroll component's implementation in the
tapestry5-jquery module :
https://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/components/PageScroll.java

Both are tapestry 5.3 implementation

Nourredine.


2014-04-09 16:42 GMT+02:00 George Christman <gc...@cardaddy.com>:

> Hi Guys, has anybody happened to build an endless scroll component for 5.4?
>
> If not I'd like to build one and I'd like some ideas on how to get started
> with it.
>
> The component would be used with the loop component, so I would probably
> return 25 results by default and append an additional 25 once the scroll
> bar reached a particular point. Should I wrap the loop in a zone and load
> each new zone with the new set of results? I'm really not sure how to go
> about this.
>
> Thanks
>