Thanks,

seems to work as it's supposed to now. Just for the record, de-implementing the Serializable interface from entities/objects is a good hint whether the object was undergoing the serialization process (a spam of NotSerializableExceptions will follow).

Regards,

--
Marek Šabo


On 10/22/2010 04:21 AM, Jeremy Thomerson wrote:
By referencing the object within the LDM, you've made the compiler put a
reference to it in your LDM class, which means it will now be serialized.
Take the final off the user object and do:

final int id = object.getID() so that only the id is serialized.

Jeremy Thomerson
http://wickettraining.com
-- sent from my "smart" phone, so please excuse spelling, formatting, or
compiler errors

On Oct 21, 2010 7:26 PM, "Marek Šabo"<ms...@buk.cvut.cz>  wrote:

Hi,

I just want to ask if get the ldm concept right in my code:

SortableDataProvider for DataTable:

        @Override
        public IModel<User>  model(final User object) {    //user is a JPA
entity
            return new LoadableDetachableModel<User>(object) {

                private static final long serialVersionUID = 1L;

                @Override
                protected User load() {
                    LoggerFactory.getLogger(this.getClass()).debug("should be
loading {}", object);
                    return new UserJpaController().findUser(object.getId());
                }
            };
        }

The DataTable then uses PropertyColumns to get the values. Is this right?
Because I'm 40:60 sure it ain't.

Regards,


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

Reply via email to