You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by taygolf <ta...@gmail.com> on 2008/10/09 22:43:09 UTC

Ajax update DefaultDataTable using textfield

Hey guys,

I am trying to update a DefaultDataTable using a textfield and ajax. I have
done it to a ListChoice before but for some reason I can not get it to work
with a DefaultDataTable.

Basically what I want to do is have a textfield on my page. when the user
types a letter in the textfield I want to take that letter and update the
query that I send to my dataprovider. The dataprovider will then update the
DefaultDataTable.

I have place the DefaultDataTable in a WebMarkupContainer and I am updating
the query and then calling then setting the DefaultDataTable to the new
provider and the adding the WebMarkupContainer to the target of the
AjaxFormComponentUpdatingBehavior but it does not seem to want to work. All
of this is in a panel which might be causing some issues I am not sure.

Am I looking at this the right way ir is there somewhere else I need to
look.

All I really want is a DefaultDataTable with a searchbox at the top to
narrow down what is being shown in the Table.

Thanks

T
-- 
View this message in context: http://www.nabble.com/Ajax-update-DefaultDataTable-using-textfield-tp19906974p19906974.html
Sent from the Wicket - User 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: Ajax update DefaultDataTable using textfield

Posted by taygolf <ta...@gmail.com>.
I guess I just needed some time away from the computer to figure this one
out. After looking at it this morning I found my error. In the
AjaxFormComponentUpdatingBehavior I was setting the table equal to a new
DefaultDataTable when I should have been using table.replaceWith(new
DataTable).

Thanks

T

Timo Rantalaiho wrote:
> 
> On Thu, 09 Oct 2008, taygolf wrote:
>> Basically what I want to do is have a textfield on my page. when the user
>> types a letter in the textfield I want to take that letter and update the
>> query that I send to my dataprovider. The dataprovider will then update
>> the
>> DefaultDataTable.
>> 
>> I have place the DefaultDataTable in a WebMarkupContainer and I am
>> updating
>> the query and then calling then setting the DefaultDataTable to the new
>> provider and the adding the WebMarkupContainer to the target of the
>> AjaxFormComponentUpdatingBehavior but it does not seem to want to work.
>> All
>> of this is in a panel which might be causing some issues I am not sure.
> 
> It should be fine, we've done something like this using
> DataView (for easier customising). 
> 
> To help you it would be important to have the problem in a
> runnable quickstart (or at least see the code).
> 
> Best wishes,
> Timo
> 
> -- 
> Timo Rantalaiho           
> Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Ajax-update-DefaultDataTable-using-textfield-tp19906974p19920718.html
Sent from the Wicket - User 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: Ajax update DefaultDataTable using textfield

Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Thu, 09 Oct 2008, taygolf wrote:
> Basically what I want to do is have a textfield on my page. when the user
> types a letter in the textfield I want to take that letter and update the
> query that I send to my dataprovider. The dataprovider will then update the
> DefaultDataTable.
> 
> I have place the DefaultDataTable in a WebMarkupContainer and I am updating
> the query and then calling then setting the DefaultDataTable to the new
> provider and the adding the WebMarkupContainer to the target of the
> AjaxFormComponentUpdatingBehavior but it does not seem to want to work. All
> of this is in a panel which might be causing some issues I am not sure.

It should be fine, we've done something like this using
DataView (for easier customising). 

To help you it would be important to have the problem in a
runnable quickstart (or at least see the code).

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

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