You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Martin Koci <Ma...@aura.cz> on 2006/10/03 13:37:38 UTC

Auto-scroll feature

Have Trinidad auto-scroll as myfaces impl has? 

If rendered output is too long (for example long dataTable) and user
clicks a bottom button   the page scrolls to the top.

Myfaces have a auto-scroll feature (can be enabled with
org.apache.myfaces.AUTO_SCROLL in web.xml). This features saves
position of a window between requests and re-scroll it.

But it is based on command button rendererer and html form renderer from
myfaces. Unfortunately trinidad overrides those renderers so that
feature doesn't work.


Martin






Re: Re: Auto-scroll feature

Posted by Martin Marinschek <ma...@gmail.com>.
I wouldn't set the onsubmit attribute directly - rather use some
javascript-event-magic to attach the behaviour to all forms of a page.

regards,

Martin

On 10/4/06, Adam Winer <aw...@gmail.com> wrote:
> Could this be encapsulated in a Tomahawk tag that sets
> the "onsubmit" attribute of the parent component?
>
> -- Adam
>
>
>
> On 10/3/06, Martin Marinschek <ma...@gmail.com> wrote:
> > Hi,
> >
> > basically, what we'd need to do, is add an onsubmit-handler, that
> > dynamically adds a new input-node to the form with the current
> > scrolling position. We could do that without customizing the submit
> > routine, as we do currently.
> >
> > regards,
> >
> > Martin
> >
> > On 10/3/06, Adam Winer <aw...@gmail.com> wrote:
> > > I'd rather not port it to Trinidad, if that means copying code over.
> > > I'd be interested in finding a way to make the autoscroll
> > > feature one that doesn't require using the MyFaces commandButton
> > > and form.
> > >
> > > -- Adam
> > >
> > >
> > > On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> > > >
> > > > Yes, PPR can solve that problem too, but many users of trinidad have
> > > > legacy pages with h:dataTable etc.
> > > > They can rely on myfaces auto-scroll feature and they won't rewrite all
> > > > pages to trinidad.
> > > >
> > > > I think myfaces auto-scroll feature should be ported to trinidad:
> > > >
> > > > - using trinidad disables auto-scroll; this can be annoying surprise for
> > > > myfaces impl users
> > > >
> > > > - accordance with current myfaces code there are only three or four
> > > > points which must be ported, so port is simple
> > > >
> > > > - porting this feature to trinidad will allow using it with Sun RI.
> > > >
> > > >
> > > > Martin
> > > >
> > > >
> > > > Adam Winer píše v Út 03. 10. 2006 v 07:45 -0700:
> > > > > Martin,
> > > > >
> > > > > Trinidad doesn't have an auto-scroll feature;  however,
> > > > > it has PPR, which preserves scrolling position without
> > > > > any bouncing up-and-down.
> > > > >
> > > > > -- Adam
> > > > >
> > > > >
> > > > > On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> > > > > > Have Trinidad auto-scroll as myfaces impl has?
> > > > > >
> > > > > > If rendered output is too long (for example long dataTable) and user
> > > > > > clicks a bottom button   the page scrolls to the top.
> > > > > >
> > > > > > Myfaces have a auto-scroll feature (can be enabled with
> > > > > > org.apache.myfaces.AUTO_SCROLL in web.xml). This features saves
> > > > > > position of a window between requests and re-scroll it.
> > > > > >
> > > > > > But it is based on command button rendererer and html form renderer
> > > > from
> > > > > > myfaces. Unfortunately trinidad overrides those renderers so that
> > > > > > feature doesn't work.
> > > > > >
> > > > > >
> > > > > > Martin
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Re: Auto-scroll feature

Posted by Adam Winer <aw...@gmail.com>.
Could this be encapsulated in a Tomahawk tag that sets
the "onsubmit" attribute of the parent component?

-- Adam



On 10/3/06, Martin Marinschek <ma...@gmail.com> wrote:
> Hi,
>
> basically, what we'd need to do, is add an onsubmit-handler, that
> dynamically adds a new input-node to the form with the current
> scrolling position. We could do that without customizing the submit
> routine, as we do currently.
>
> regards,
>
> Martin
>
> On 10/3/06, Adam Winer <aw...@gmail.com> wrote:
> > I'd rather not port it to Trinidad, if that means copying code over.
> > I'd be interested in finding a way to make the autoscroll
> > feature one that doesn't require using the MyFaces commandButton
> > and form.
> >
> > -- Adam
> >
> >
> > On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> > >
> > > Yes, PPR can solve that problem too, but many users of trinidad have
> > > legacy pages with h:dataTable etc.
> > > They can rely on myfaces auto-scroll feature and they won't rewrite all
> > > pages to trinidad.
> > >
> > > I think myfaces auto-scroll feature should be ported to trinidad:
> > >
> > > - using trinidad disables auto-scroll; this can be annoying surprise for
> > > myfaces impl users
> > >
> > > - accordance with current myfaces code there are only three or four
> > > points which must be ported, so port is simple
> > >
> > > - porting this feature to trinidad will allow using it with Sun RI.
> > >
> > >
> > > Martin
> > >
> > >
> > > Adam Winer píše v Út 03. 10. 2006 v 07:45 -0700:
> > > > Martin,
> > > >
> > > > Trinidad doesn't have an auto-scroll feature;  however,
> > > > it has PPR, which preserves scrolling position without
> > > > any bouncing up-and-down.
> > > >
> > > > -- Adam
> > > >
> > > >
> > > > On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> > > > > Have Trinidad auto-scroll as myfaces impl has?
> > > > >
> > > > > If rendered output is too long (for example long dataTable) and user
> > > > > clicks a bottom button   the page scrolls to the top.
> > > > >
> > > > > Myfaces have a auto-scroll feature (can be enabled with
> > > > > org.apache.myfaces.AUTO_SCROLL in web.xml). This features saves
> > > > > position of a window between requests and re-scroll it.
> > > > >
> > > > > But it is based on command button rendererer and html form renderer
> > > from
> > > > > myfaces. Unfortunately trinidad overrides those renderers so that
> > > > > feature doesn't work.
> > > > >
> > > > >
> > > > > Martin
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>

Re: Auto-scroll feature

Posted by Martin Marinschek <ma...@gmail.com>.
Hi,

basically, what we'd need to do, is add an onsubmit-handler, that
dynamically adds a new input-node to the form with the current
scrolling position. We could do that without customizing the submit
routine, as we do currently.

regards,

Martin

On 10/3/06, Adam Winer <aw...@gmail.com> wrote:
> I'd rather not port it to Trinidad, if that means copying code over.
> I'd be interested in finding a way to make the autoscroll
> feature one that doesn't require using the MyFaces commandButton
> and form.
>
> -- Adam
>
>
> On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> >
> > Yes, PPR can solve that problem too, but many users of trinidad have
> > legacy pages with h:dataTable etc.
> > They can rely on myfaces auto-scroll feature and they won't rewrite all
> > pages to trinidad.
> >
> > I think myfaces auto-scroll feature should be ported to trinidad:
> >
> > - using trinidad disables auto-scroll; this can be annoying surprise for
> > myfaces impl users
> >
> > - accordance with current myfaces code there are only three or four
> > points which must be ported, so port is simple
> >
> > - porting this feature to trinidad will allow using it with Sun RI.
> >
> >
> > Martin
> >
> >
> > Adam Winer píše v Út 03. 10. 2006 v 07:45 -0700:
> > > Martin,
> > >
> > > Trinidad doesn't have an auto-scroll feature;  however,
> > > it has PPR, which preserves scrolling position without
> > > any bouncing up-and-down.
> > >
> > > -- Adam
> > >
> > >
> > > On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> > > > Have Trinidad auto-scroll as myfaces impl has?
> > > >
> > > > If rendered output is too long (for example long dataTable) and user
> > > > clicks a bottom button   the page scrolls to the top.
> > > >
> > > > Myfaces have a auto-scroll feature (can be enabled with
> > > > org.apache.myfaces.AUTO_SCROLL in web.xml). This features saves
> > > > position of a window between requests and re-scroll it.
> > > >
> > > > But it is based on command button rendererer and html form renderer
> > from
> > > > myfaces. Unfortunately trinidad overrides those renderers so that
> > > > feature doesn't work.
> > > >
> > > >
> > > > Martin
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Auto-scroll feature

Posted by Adam Winer <aw...@gmail.com>.
I'd rather not port it to Trinidad, if that means copying code over.
I'd be interested in finding a way to make the autoscroll
feature one that doesn't require using the MyFaces commandButton
and form.

-- Adam


On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
>
> Yes, PPR can solve that problem too, but many users of trinidad have
> legacy pages with h:dataTable etc.
> They can rely on myfaces auto-scroll feature and they won't rewrite all
> pages to trinidad.
>
> I think myfaces auto-scroll feature should be ported to trinidad:
>
> - using trinidad disables auto-scroll; this can be annoying surprise for
> myfaces impl users
>
> - accordance with current myfaces code there are only three or four
> points which must be ported, so port is simple
>
> - porting this feature to trinidad will allow using it with Sun RI.
>
>
> Martin
>
>
> Adam Winer píše v Út 03. 10. 2006 v 07:45 -0700:
> > Martin,
> >
> > Trinidad doesn't have an auto-scroll feature;  however,
> > it has PPR, which preserves scrolling position without
> > any bouncing up-and-down.
> >
> > -- Adam
> >
> >
> > On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> > > Have Trinidad auto-scroll as myfaces impl has?
> > >
> > > If rendered output is too long (for example long dataTable) and user
> > > clicks a bottom button   the page scrolls to the top.
> > >
> > > Myfaces have a auto-scroll feature (can be enabled with
> > > org.apache.myfaces.AUTO_SCROLL in web.xml). This features saves
> > > position of a window between requests and re-scroll it.
> > >
> > > But it is based on command button rendererer and html form renderer
> from
> > > myfaces. Unfortunately trinidad overrides those renderers so that
> > > feature doesn't work.
> > >
> > >
> > > Martin
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
>

Re: Auto-scroll feature

Posted by Martin Koci <Ma...@aura.cz>.
Yes, PPR can solve that problem too, but many users of trinidad have
legacy pages with h:dataTable etc. 
They can rely on myfaces auto-scroll feature and they won't rewrite all
pages to trinidad. 

I think myfaces auto-scroll feature should be ported to trinidad:

- using trinidad disables auto-scroll; this can be annoying surprise for
myfaces impl users

- accordance with current myfaces code there are only three or four
points which must be ported, so port is simple

- porting this feature to trinidad will allow using it with Sun RI.


Martin


Adam Winer píše v Út 03. 10. 2006 v 07:45 -0700:
> Martin,
> 
> Trinidad doesn't have an auto-scroll feature;  however,
> it has PPR, which preserves scrolling position without
> any bouncing up-and-down.
> 
> -- Adam
> 
> 
> On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> > Have Trinidad auto-scroll as myfaces impl has?
> >
> > If rendered output is too long (for example long dataTable) and user
> > clicks a bottom button   the page scrolls to the top.
> >
> > Myfaces have a auto-scroll feature (can be enabled with
> > org.apache.myfaces.AUTO_SCROLL in web.xml). This features saves
> > position of a window between requests and re-scroll it.
> >
> > But it is based on command button rendererer and html form renderer from
> > myfaces. Unfortunately trinidad overrides those renderers so that
> > feature doesn't work.
> >
> >
> > Martin
> >
> >
> >
> >
> >
> >
> 


Re: Auto-scroll feature

Posted by Adam Winer <aw...@gmail.com>.
Martin,

Trinidad doesn't have an auto-scroll feature;  however,
it has PPR, which preserves scrolling position without
any bouncing up-and-down.

-- Adam


On 10/3/06, Martin Koci <Ma...@aura.cz> wrote:
> Have Trinidad auto-scroll as myfaces impl has?
>
> If rendered output is too long (for example long dataTable) and user
> clicks a bottom button   the page scrolls to the top.
>
> Myfaces have a auto-scroll feature (can be enabled with
> org.apache.myfaces.AUTO_SCROLL in web.xml). This features saves
> position of a window between requests and re-scroll it.
>
> But it is based on command button rendererer and html form renderer from
> myfaces. Unfortunately trinidad overrides those renderers so that
> feature doesn't work.
>
>
> Martin
>
>
>
>
>
>