Johan Compagner wrote:
i still think that behaviors to control focus is a bit wrong
focus should have 1 entry point

I agree.

and i guess that is WebPage.focusComponent()

I agree on that one too.

or maybe Form (but you could have 2)

Exactly, so not a good idea. The page should determine which form gets focus.

By the way we have focus support in ajax mode... see AjaxRequestTarget


It would still be useful to have some strategies for selecting the component to focus lying around, so you can plug them in, e.g., first blank field, first error, etc. These strategies could then work on a form. If you have multiple forms on a page, you'll have to make up your own strategy to choose which form you focus, but you can still use the provided strategies once you've chosen that.


On Tue, Mar 11, 2008 at 12:41 PM, James Carman <[EMAIL PROTECTED]>

On 3/11/08, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
Another option would be (if there is enough interest) to add it to
 wicketstuff minis.

Yeah, I thought about that.  And, I may try to put that in there.
Perhaps there could be a few focus behaviors in there?  Perhaps even a
FocusBehaviors class with static helper methods:

public FocusBehaviors
 public static void focusOnLoad(FormComponent fc);
 public static void focusFirstError(Form form);

Something like that.

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to