Thanks
Yes, I can use both methos onInitialize + onRead and onDetach + onSave
Perhaps I should ask if onInitialize and onDetach are used when component is
serialized /deserialized on wicket 6
My plan is to do avoid this
MyPanel(String id){
super(id)
((MyApplicattion)getApplication()).getDao().getData();
}
and turn into this
MyPanel(String id){
super(id)
}
private transient Dao dao;
void onCreateOrRead(){
dao = ((MyApplicattion)getApplication()).getDao();
}
void onCreateOrRead(){
dao = null; // Not necessary
}
> > > Oscar Besga Arcauz < < <
-----Cedric Gatay <[email protected]> escribió: -----
Para: [email protected]
De: Cedric Gatay <[email protected]>
Fecha: 25/11/2012 13:36
Asunto: Re: After/before creation or serialization
Hi,
I don't know if there is a special Wicket thing, but you can use the
standard Java way like this :
private void writeObject(ObjectOutputStream out) throws IOException {
//provide your own logic
}
private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException {
//provide your own logic
}
Regards,
__
Cedric Gatay
http://www.bloggure.info | http://cedric.gatay.fr |
@Cedric_Gatay<http://twitter.com/Cedric_Gatay>
On Sun, Nov 25, 2012 at 1:28 PM, Oscar Besga Arcauz <[email protected]>wrote:
>
>
> Hi wickers !
>
> Is there a method on Wicket components that is called before
> creation/load(f.e. from disk, deserialization) and another method called
> before destroy/save(to disk, serialization)
>
> Would it be methods onInitialize() and onDetach() of
> org.apache.wicket.Component ?
>
> Thanks !
>
>
> > > > Oscar Besga Arcauz < < <
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]