Or should I replace the dataview itself (this would be very inefficient)?

In the data provider, in the constructor I call out into the DAO and
retrieve results that are collected in a transient list. Iterations occurs
over this list (the dataset is small so holding the list in memory isn't a
problem).

Therefore, without updating the dataProvider reference with a new provider
instance (whereby the search string gets passed into the constructor), the
search never occurs. Even when I instantiate a new provider, the search
occurs but I still see the old results in the dataview.

The complete process is:

1. Create WMC -> set output markup ID to true
2. Create feedback panel and add it to WMC
3. Create dataview passing in empty search criterion and add it to WMC
4. Create form and in the button's onSubmit() method, instantiate a new data
provider and add WMC to AJAX target. Add form to underlying panel.

Hope this helps.

cbchhaya wrote:
> 
> Hi,
> 
> That's right. How do I replace the dataProvider? It doesn't have an ID so
> I can't use replaceWith... Any suggestions?
> 
> Thanks!
> 
> 
> Newgro wrote:
>> 
>> I don't see the complete process, but if i'm not completely wrong you is 
>> creating the DataProvider instance twice. Once in constructor and once 
>> in the AjaxButton.onSubmit method. But you is not assign this new 
>> instance to the dataview. Hit me if i'm wrong.
>> 
>> Cheers
>> Per
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Refreshing-DataView-with-new-dataset-tp21650528p21653387.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to