hi igor, yes it does. here is the code:

/**
 * a {...@link LoadableDetachableModel} will be returned.
 *
* @see org.apache.wicket.markup.repeater.data.IDataProvider#model (java.lang.Object)
 */
public IModel<Profile> model(final Profile object) {

        return new LoadableDetachableModel<Profile>() {

                private static final long serialVersionUID = 1L;

                @Override
                protected Profile load() {
                        return object;
                }
        };
}

--
ulf schneider
+49 163 2505164
[email protected]

datenlabor gmbh
sitz: paderborn, hrb 8819
geschäftsführer: ulf schneider
www.datenlabor.net
ibm business partner





Am 15.10.2009 um 06:18 schrieb Igor Vaynberg:

does your dataprovider return an ldm from its model(object) method?

-igor

On Wed, Oct 14, 2009 at 1:49 AM, ulf schneider <[email protected]> wrote:
hello,
i've got a problem with the behavior of a LoadableDetachableModel in one of
my pages.

following scenario:
user opens a page (let's call it READING) with the LoadableDetachableModel for reading (the user can not enter any content). the loading of the model
data and the display in the page is ok.

from the READING page the user can open another page (called EDITING) which uses again a LoadableDetachableModel to display the contents for editing.
the loading of the model data and the display in the page is ok.
the EDITING page contains a reference to the READING page.

after submitting the EDITING page i call setResponsePage with the reference to the READING page, so that the user can see the results of his editing in
the READING page.
again the loading of the model data and the display in the page is ok - the
user can see the modified data in the READING page.


now the problem:
when i do the same but start from a DataView: open READING page, go on to
EDITING page, submit EDITING page and display READING page by calling
setResponsePage to the READING reference, the modifications of the editing process are not displayed. instead an old model without the modifications is
displayed.
i can see, that the model in the READING page is properly detached and loaded and i can see that the model contains the right data, but the data is
not displayed in the page.
do you have any idea?

best regards, ulf.

--
ulf schneider
+49 163 2505164
[email protected]

datenlabor gmbh
sitz: paderborn, hrb 8819
geschäftsführer: ulf schneider
www.datenlabor.net
ibm business partner







Reply via email to