You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Manri Offermann <ta...@eastbeam.co.jp> on 2007/03/19 04:48:15 UTC

T4.1 focus=true for Forms, Change Request

Hi,

I think it is a great idea to have focus on a form element, when the 
page loads. But in some cases (or in our case), where the request is 
dynamic (AJAX request) and I am updating an area, my form gets focused, 
where I would rather not have focus on my form. At the moment I added:

<binding name="focus" 
value="!getPage().getRequestCycle().getResponseBuilder().isDynamic()"/>

I have updated all my forms, because in general, when I have an area 
updated with Ajax, I don't want the focus to be changed.

Can this be made default?

Best regards,

Manri Offermann

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


Re: T4.1 focus=true for Forms, Change Request

Posted by Jesse Kuhnert <jk...@gmail.com>.
Oops...Shame on me. I was going to point out that this functionality
currently existed already using the EventListener annotation and just
needed to be carried over to the other async areas...but then I
noticed that I hadn't even documented this feature for
EventListener..oops

If someone creates a jira issue I'll make sure this extra parameter
goes everywhere.

This is a tricky prospect to actually set as a global behavior. I'm
not sure at all if this would fit the majority usage or minority
though. Adding the parameter to disable focus period (unless
validaiton error happens) is a no brainer, but I'd probably want to
hear more from everyone else about the global defaults change. (for
ajax requests)

On 3/18/07, Manri Offermann <ta...@eastbeam.co.jp> wrote:
> Hi,
>
> I think it is a great idea to have focus on a form element, when the
> page loads. But in some cases (or in our case), where the request is
> dynamic (AJAX request) and I am updating an area, my form gets focused,
> where I would rather not have focus on my form. At the moment I added:
>
> <binding name="focus"
> value="!getPage().getRequestCycle().getResponseBuilder().isDynamic()"/>
>
> I have updated all my forms, because in general, when I have an area
> updated with Ajax, I don't want the focus to be changed.
>
> Can this be made default?
>
> Best regards,
>
> Manri Offermann
>
> ---------------------------------------------------------------------
> 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

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