Hi,
I added the panel in the onInitialize method to keep the way you did and
because I don't know the rest of the code. But, for the specific part of
code we exchanged, the panel could be added in the constructor (or best, in
an init() method called by the constructor to be clean). There is also n
Update - I forgot to mention that my LDM is a class nested in the panel
class.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p4649603.html
Sent from the Users forum mailing list archive at Nabble.com
Update - Access the page with MyPanel.this.getPage() seems to work fine.
More testing is required but looks like I have a solution.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p4649602.html
Sent from the Users
r variable on the LDM by
using MyPanel.this.getPage() instead. This should work and then I can be
sure that I'm not serializing the panel with the LDM.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p4649601.htm
Hello again,
I tested in a quickstart and it works. (I just noticed you did not called
super.onInitialize())
The code I used:
class MyPOJO
{
public Boolean isSelected()
{
return true;
}
}
public class HomePage extends WebPage
{
private static final long serialVersionUID
POJO. This might work but its
getting somewhat ugly. There must be a better way.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p4649597.html
Sent from the Users forum mail
very
large and I don't want them serialized to the session.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p4649596.html
Sent from the Users forum mailing list archive at
t and it would be
there when the page is initially rendered but not on subsequent requests.
This would be exactly what I'm looking for but I don't want to
inadvertently
serialize the panel. Or does it matter?
--
View this message in context:
http://apache-wicket.1842946.n4.nabb
// it doesn't appear to be available at the point when load
is called.
return [GET MY PAGE HERE SOMEHOW].getMyPOJO();
}
}
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p46
ould be exactly what I'm looking for but I don't want to
> inadvertently
> serialize the panel. Or does it matter?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-t
uests.
This would be exactly what I'm looking for but I don't want to inadvertently
serialize the panel. Or does it matter?
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp4649586p4649591.html
Sent from the User
the page I could get the pojo from
there but
// it doesn't appear to be available at the point when load
is called.
return [GET MY PAGE HERE SOMEHOW].getMyPOJO();
}
}
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.co
nk it complicates something
>> that should be quite simple.
>>
>> Maybe its just me but I'm finding loadableDetachableModel to be quite
>> challenging for my purposes, which are not typically just loading database
>> entities. Serializing a key piece of information i
ct, entity
manager, etc).
If anyone can show me where I'm going wrong I'd appreciate the help
thanks
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-LoadableDetachableModel-tp46495
is needed to operate on the
key information to get the model back (i.e a business object, entity
manager, etc).
If anyone can show me where I'm going wrong I'd appreciate the help
thanks
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Access-to-Page-from-Load
15 matches
Mail list logo