myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson" <andrew.rw.robin...@gmail.com>
Subject Re: t:datascroller + ajax
Date Tue, 31 Jul 2007 18:26:42 GMT
I don't have the code anymore and do not have easy access to it at the
moment, because we have moved off of JSF for the near future. I cannot
remember exactly what I did, but here is a shot:

Override the renderer. Specifically these methods:

protected HtmlCommandLink getLink(FacesContext facesContext,
HtmlDataScroller scroller, String text, int pageIndex)

protected HtmlCommandLink getLink(FacesContext facesContext,
HtmlDataScroller scroller, String facetName)

In those methods, add an ajax support component for the onclick event
and that returns false (forget the attribute, but one causes this).

Then I think I had to extend the component to catch the queuing of
action events by the support object. I changed it to a data scroller
component at that point.

I can't remember more than that at the moment though. The richfaces
one is probably easier to use for this use (it wasn't open source when
I did the tomahawk datascroller customization).

You can also use <a4j:form ajaxSubmit="true" /> to force every request
to be an ajax request.

-Andrew

On 7/31/07, kewldude <paubengero@yahoo.com> wrote:
>
>
> Hi Andrew,
>
> Do you have any sample codes that I can build and play around with? I'm
> really intent on using the t:datascroller instead of the richfaces scroller.
>
>
>
> Andrew Robinson-5 wrote:
> >
> > I used the t:dataScroller. I just extended it and overrode the command
> > that is used and added a child component (a4j:support) to handle the
> > AJAX part of the request.
> >
> > On 7/30/07, Paul Iov <paul@voller-ernst.de> wrote:
> >> The richfaces scroller is the only (known to me) complete implementation
> >> which works fine with ajax. The mentioned problems are common to all
> >> scroller implementations since they are caused by DataModel and not by
> >> scroller itself.
> >>
> >> regards,
> >> paul
> >>
> >> kewldude schrieb:
> >> > Yeah other than the richfaces scroller. Went through their forum and
> >> read
> >> > some problems regarding richfaces scroller. I'm interested in using the
> >> > t:datascroller with ajax.
> >> >
> >> >
> >> > Adrian Mitev-2 wrote:
> >> >
> >> >> RichFaces project got ajax scroller.
> >> >>
> >> >> 2007/7/30, kewldude <paubengero@yahoo.com>:
> >> >>
> >> >>> Was there a successful implementation of using the tomahawk
> >> datascroller
> >> >>> +
> >> >>> ajax? Something like clicking the page number of the scroller and
> >> only
> >> >>> the
> >> >>> data table changed and not the whole page is reloaded...
> >> >>> I'm trying to search the forum and it seems there are difficulties
in
> >> >>> doing
> >> >>> so. Can someone provide more clues or suggestions? Thanks.
> >> >>> --
> >> >>> View this message in context:
> >> >>>
> >> http://www.nabble.com/t%3Adatascroller-%2B-ajax-tf4167887.html#a11857824
> >> >>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >> >>>
> >> >>>
> >> >>>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/t%3Adatascroller-%2B-ajax-tf4167887.html#a11918711
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Mime
View raw message