On Wed, Nov 07, 2007 at 07:20:01PM -0800, Jeremy Lee wrote:
> 
> Hi,
> 
> I have a Search Form along with a AjaxFallbackDefaultDataTable on a page
> that I am trying to create. How it is supposed to work is as follows:
> 
> 1. User accesses page (only search form is visible)
> 2. User enters search parameters and submits request
> 3. The page returns search results.  The page at this point should still
> show the search form, and also now the results through the
> AjaxFallbackDefaultDataTable.
> 
> The problem that I am having is as follows:
> 
> In the page constructor I add both the form and the
> AjaxFallbackDefaultDataTable and then set the table to not be visible. 
> However I am finding that the table makes the call to the data provider when
> it is initially instantiated.  I only want it to make the call to the data
> provider when the search request is made.
> 
> The following is the code that I am using in the constructor to add the
> table.
> 
> SortableDataProvider dp = new ReconcileReportProvider(new
> ReconcileReportManagerImpl());
> reportTable = new AjaxFallbackDefaultDataTable("searchResults", columns, dp,
> rows);
> reportTable.setVisible(false);
> add(reportTable);
> 
> I am not too sure if this is even the right way to go about it.  Any
> guidance would be appreciated.
> 
> Cheers.

Hi Jeremy,

You can try this: in your constructor, instead of the DataTable, create
an EmptyPanel with the same ID. In the onSubmit for your search form,
create the DataTable and use replace() to replace the EmptyPanel.

Hope this helps.

jk

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

Reply via email to