You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sri357 <s....@gmail.com> on 2011/07/12 14:53:15 UTC

how to set focus in a listview coponent

Hi,

I have a table with a list view displaying one textbox in one column,and
next column is again a listview displaying textboxes depending on its
size.The problem i am facing here is,whenever i enter some text in the
second textbox,im implementing a ajax onblurr event to format text and
refreshing the container holding the second listview to make the changes
visible.After refreshing container i am unable to view cursor in the page. I
want to set focus either in the first textbox or textbox next to the one
where i entered data in the second list view.Can anyone help me out with
this.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3662151.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: how to set focus in a listview coponent

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Jul 13, 2011 at 1:16 PM, sri357 <s....@gmail.com> wrote:
> Thank you very much,i could now sucessfully set focus,but dont we have any
> direct componet.setFocus() type of methods to set focus.
No.
But it is quite easy to create a Behavior that does it.
component.add(new FocusBehavior());
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3664668.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: how to set focus in a listview coponent

Posted by sri357 <s....@gmail.com>.
Thank you very much,i could now sucessfully set focus,but dont we have any
direct componet.setFocus() type of methods to set focus.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3664668.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: how to set focus in a listview coponent

Posted by Martin Grigorov <mg...@apache.org>.
JavaScript: Wicket.$('firstTextFieldId').focus();

On Tue, Jul 12, 2011 at 6:08 PM, sri357 <s....@gmail.com> wrote:
> I am able to set focus using target.focusComponet() on an event,but how to
> set focus in a textfield without using any event.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3662730.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: how to set focus in a listview coponent

Posted by sri357 <s....@gmail.com>.
I am able to set focus using target.focusComponet() on an event,but how to
set focus in a textfield without using any event.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3662730.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: how to set focus in a listview coponent

Posted by Martin Grigorov <mg...@apache.org>.
org.apache.wicket.ajax.AjaxRequestTarget.focusComponent(firstTextField)

On Tue, Jul 12, 2011 at 2:53 PM, sri357 <s....@gmail.com> wrote:
> Hi,
>
> I have a table with a list view displaying one textbox in one column,and
> next column is again a listview displaying textboxes depending on its
> size.The problem i am facing here is,whenever i enter some text in the
> second textbox,im implementing a ajax onblurr event to format text and
> refreshing the container holding the second listview to make the changes
> visible.After refreshing container i am unable to view cursor in the page. I
> want to set focus either in the first textbox or textbox next to the one
> where i entered data in the second list view.Can anyone help me out with
> this.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-set-focus-in-a-listview-coponent-tp3662151p3662151.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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