You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joseph Hannon <ja...@gmail.com> on 2007/07/13 17:40:54 UTC

ResponseBuilder UpdateComponent causing scroll to top of page?

I just moved from Tap 4.0.2 to 4.1.2 and replaced any Tacos stuff I was 
using with the included Dojo stuff, ie: UpdateComponent() which I will 
refer to as 'UC' .  UC appears to be doing a great job on the page, but 
the page is now scrolling to home position on each update.  Using Tacos 
updateComponents() prior, the page stayed at the current scroll 
position, which is what I would like this upgrade to continue doing.

I wrote a piece to place javascript on the page 'remembering' the scroll 
position and then setting it again just after UC is called.  It will 
jump scroll each time the UC is called, which is not going to look very 
good.  If that is the way to go, I will implement a smooth scroll, but I 
would prefer not seeing the page scroll at all.

I am wondering if I am using UC correctly, if the page is getting 
submitted instead of a AJAX call, or I have some other bug.  Don't think 
this is the case.

Any ideas?

Thanks,
Joseph


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


Re: ResponseBuilder UpdateComponent causing scroll to top of page?

Posted by Joseph Hannon <ja...@gmail.com>.
Jesse,

Tapestry's ResponseBuilder.updateComponent() .  I could have camel cased 
it, sorry.  Good to know on Ajax and I appreciate it!

Thanks,
Joseph

Jesse Kuhnert wrote:
> I have no idea what UpdateComponent() is.   Is this a new tacos object or
> something I'm not aware of?
> 
> By default most ajax requests should not be causing any focus events/other
> things that may scroll the page around - but if you have a use case /
> example where this happens I'm sure we can fix it.
> 
> On 7/13/07, Joseph Hannon <ja...@gmail.com> wrote:
>>
>> Ok, I think I misunderstood the purpose of UpdateComponent(), which I
>> will refer to as 'UC'.  What I wanted is when my listener gets called by
>> DirectLink, UC would update only the component it specifies, not
>> re-render the entire page.  Apparently, UC adds the component specified
>> to the list of components to get updated.  Not what I need.  Not sure
>> what it is used for then.  I went back to using updateComponents in
>> DirectLink and that does only update the components specified which is
>> what I need.
>>
>> Is UC capable/intended of/to replacing updateComponents in DirectLink?
>>
>> Thanks,
>> Joseph
>>
>> Joseph Hannon wrote:
>> > I just moved from Tap 4.0.2 to 4.1.2 and replaced any Tacos stuff I was
>> > using with the included Dojo stuff, ie: UpdateComponent() which I will
>> > refer to as 'UC' .  UC appears to be doing a great job on the page, but
>> > the page is now scrolling to home position on each update.  Using Tacos
>> > updateComponents() prior, the page stayed at the current scroll
>> > position, which is what I would like this upgrade to continue doing.
>> >
>> > I wrote a piece to place javascript on the page 'remembering' the 
>> scroll
>> > position and then setting it again just after UC is called.  It will
>> > jump scroll each time the UC is called, which is not going to look very
>> > good.  If that is the way to go, I will implement a smooth scroll, 
>> but I
>> > would prefer not seeing the page scroll at all.
>> >
>> > I am wondering if I am using UC correctly, if the page is getting
>> > submitted instead of a AJAX call, or I have some other bug.  Don't 
>> think
>> > this is the case.
>> >
>> > Any ideas?
>> >
>> > Thanks,
>> > Joseph
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 


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


Re: ResponseBuilder UpdateComponent causing scroll to top of page?

Posted by Jesse Kuhnert <jk...@gmail.com>.
I have no idea what UpdateComponent() is.   Is this a new tacos object or
something I'm not aware of?

By default most ajax requests should not be causing any focus events/other
things that may scroll the page around - but if you have a use case /
example where this happens I'm sure we can fix it.

On 7/13/07, Joseph Hannon <ja...@gmail.com> wrote:
>
> Ok, I think I misunderstood the purpose of UpdateComponent(), which I
> will refer to as 'UC'.  What I wanted is when my listener gets called by
> DirectLink, UC would update only the component it specifies, not
> re-render the entire page.  Apparently, UC adds the component specified
> to the list of components to get updated.  Not what I need.  Not sure
> what it is used for then.  I went back to using updateComponents in
> DirectLink and that does only update the components specified which is
> what I need.
>
> Is UC capable/intended of/to replacing updateComponents in DirectLink?
>
> Thanks,
> Joseph
>
> Joseph Hannon wrote:
> > I just moved from Tap 4.0.2 to 4.1.2 and replaced any Tacos stuff I was
> > using with the included Dojo stuff, ie: UpdateComponent() which I will
> > refer to as 'UC' .  UC appears to be doing a great job on the page, but
> > the page is now scrolling to home position on each update.  Using Tacos
> > updateComponents() prior, the page stayed at the current scroll
> > position, which is what I would like this upgrade to continue doing.
> >
> > I wrote a piece to place javascript on the page 'remembering' the scroll
> > position and then setting it again just after UC is called.  It will
> > jump scroll each time the UC is called, which is not going to look very
> > good.  If that is the way to go, I will implement a smooth scroll, but I
> > would prefer not seeing the page scroll at all.
> >
> > I am wondering if I am using UC correctly, if the page is getting
> > submitted instead of a AJAX call, or I have some other bug.  Don't think
> > this is the case.
> >
> > Any ideas?
> >
> > Thanks,
> > Joseph
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: ResponseBuilder UpdateComponent causing scroll to top of page?

Posted by Joseph Hannon <ja...@gmail.com>.
Ok, I think I misunderstood the purpose of UpdateComponent(), which I 
will refer to as 'UC'.  What I wanted is when my listener gets called by 
DirectLink, UC would update only the component it specifies, not 
re-render the entire page.  Apparently, UC adds the component specified 
to the list of components to get updated.  Not what I need.  Not sure 
what it is used for then.  I went back to using updateComponents in 
DirectLink and that does only update the components specified which is 
what I need.

Is UC capable/intended of/to replacing updateComponents in DirectLink?

Thanks,
Joseph

Joseph Hannon wrote:
> I just moved from Tap 4.0.2 to 4.1.2 and replaced any Tacos stuff I was 
> using with the included Dojo stuff, ie: UpdateComponent() which I will 
> refer to as 'UC' .  UC appears to be doing a great job on the page, but 
> the page is now scrolling to home position on each update.  Using Tacos 
> updateComponents() prior, the page stayed at the current scroll 
> position, which is what I would like this upgrade to continue doing.
> 
> I wrote a piece to place javascript on the page 'remembering' the scroll 
> position and then setting it again just after UC is called.  It will 
> jump scroll each time the UC is called, which is not going to look very 
> good.  If that is the way to go, I will implement a smooth scroll, but I 
> would prefer not seeing the page scroll at all.
> 
> I am wondering if I am using UC correctly, if the page is getting 
> submitted instead of a AJAX call, or I have some other bug.  Don't think 
> this is the case.
> 
> Any ideas?
> 
> Thanks,
> Joseph
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 


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