Hi,
Does that mean that the DataProvider returns primary key objects which are
used in the LoadableDetachableModel to load the real object ?

I am not sure. But one thing I noticed, the load() method of the
LoadableDetachableModel is not being called when the back button is hit.

I am getting exception the populateItem method .of the columns in the data
table... see below.


    List<IColumn<Record>> columns = new ArrayList<IColumn<Record>>();

   columns.add(new AbstractColumn<Record>(
                new StringResourceModel("Record_number", this, null),
                "Record_number") {

            @Override
            public void populateItem(Item item, String id, IModel rowModel)
{
}};





On Mon, Mar 25, 2013 at 3:55 PM, Martin Grigorov <[email protected]>wrote:

> Hi,
>
> On Mon, Mar 25, 2013 at 5:50 PM, Jayakrishnan R <[email protected]> wrote:
>
> > Hi All,
> >
> > In my application I am using *DefaultDataTable *with
> > *SortableDataProvider *which
> > has *LoadableDetachableModel *as the model.
> >
>
> Does that mean that the DataProvider returns primary key objects which are
> used in the LoadableDetachableModel to load the real object ?
>
> Check why your DataProvider returns (the ids of) deleted objects when back
> button is used.
>
>
> >
> > I used it to display a set of records ( say RecordList page). When I add
> or
> > remove some records and load the page RecordList again, it displays the
> > changes. However, if I use the back button of the browser and go the
> > RecordList page which was rentered earlier ( before adding/ removing the
> > records ). The *DefaultDataTable *still has the old sets of records. This
> > is a big issue when records are deleted.
> >
> > For example, If I delete a record and press back button then the page
> fails
> > as the record it is trying to show does not exist in the database. Adding
> > does not create an issue because it simply does not get listed in the set
> > of records.
> >
> > In another page, I just have *PageableListView *with *
> > LoadableDetachableModel*. It works fine with out an issue.
> >
> > Can someone advice me on how to refresh the data table on browser back
> > button ?
> >
> > --
> > Thanks & Regards
> > JK
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>



-- 
Thanks & Regards
JK

Reply via email to