[
https://issues.apache.org/jira/browse/WICKET-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johan Compagner updated WICKET-1228:
------------------------------------
Affects Version/s: 1.3.0-rc2
Fix Version/s: 1.3.0-rc3
Assignee: Johan Compagner
First çan you just call select() on all the FormComponents? I dont think so. So
that should be first checked in javascript (if there is a select)
second i dont like the focusInputComponent method name. That doesn't say
anything that it also selects
I prefer then 1 extra methods:
selectComponent() (besided focusComponent) yes then you do need 2 calls but its
much more clear then.
I also don't know if we really want to add this method. Because where does it
end then? You can easily have youre own kind of thing:
xxx(AjaxRequestTarget target)
{
target.focusComponent(mycomponent);
target.appendJavascript(SelectComponent.generateScript(mycomponent));
}
or
xxx(AjaxRequestTarget target)
{
FocusAndSelectComponent.forComponent(mycomponent, target);
}
and then in there you do the above thing.
> for input components, provide focus + select input value in ajax
> ----------------------------------------------------------------
>
> Key: WICKET-1228
> URL: https://issues.apache.org/jira/browse/WICKET-1228
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.3.0-rc2
> Reporter: Peter Ertl
> Assignee: Johan Compagner
> Fix For: 1.3.0-rc3
>
> Attachments: FocusAndSelectInputComponent.patch
>
>
> It's quite common that you need to set focus on a input component (text
> field, text area) and select the current input value.
> therefore it would be nice if you could add my patch
> AjaxRequestTarget#focusInputComponent(Component)
> it will call
> #component.focus()
> plus
>
> #component.select()
> in javascript.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.