@Override protected void onDetach() { if (rootNode != null) rootNode.detach(); super.onDetach(); } }
@Override protected void onDetach() { // we need to manually detach the choices model since it is not attached // to a component // an alternative might be to attach it to one of the subcomponents choicesModel.detach(); choiceRenderer.detach(); super.onDetach(); }
/** * @see org.apache.wicket.Component#onDetach() */ protected void onDetach() { // cleanup any opened filestreams Collection uploads = (Collection)getConvertedInput(); if (uploads != null) { Iterator it = uploads.iterator(); while (it.hasNext()) { final FileUpload upload = (FileUpload)it.next(); upload.closeStreams(); } } // cleanup any caches inputArrayCache = null; // clean up the model because we don't want FileUpload objects in session Object modelObject = getModelObject(); if (modelObject != null && (modelObject instanceof Collection)) { ((Collection)modelObject).clear(); } super.onDetach(); }
/** * @see org.apache.wicket.Component#onDetach() */ @Override protected void onDetach() { // cleanup any opened filestreams Collection<FileUpload> uploads = getConvertedInput(); if (uploads != null) { Iterator<FileUpload> it = uploads.iterator(); while (it.hasNext()) { final FileUpload upload = it.next(); upload.closeStreams(); } } // cleanup any caches inputArrayCache = null; // clean up the model because we don't want FileUpload objects in session Collection<FileUpload> modelObject = getModelObject(); if (modelObject != null) { modelObject.clear(); } super.onDetach(); }
@Override protected void onDetach() { if (forceCloseStreamsOnDetach()) { // cleanup any opened filestreams Collection<FileUpload> uploads = getConvertedInput(); if (uploads != null) { for (FileUpload upload : uploads) { upload.closeStreams(); } } // cleanup any caches inputArrayCache = null; // clean up the model because we don't want FileUpload objects in session Collection<FileUpload> modelObject = getModelObject(); if (modelObject != null) { modelObject.clear(); } } super.onDetach(); }
@Override protected void onDetach() { if (forceCloseStreamsOnDetach()) { // cleanup any opened filestreams Collection<FileUpload> uploads = getConvertedInput(); if (uploads != null) { for (FileUpload upload : uploads) { upload.closeStreams(); } } // cleanup any caches inputArrayCache = null; // clean up the model because we don't want FileUpload objects in session Collection<FileUpload> modelObject = getModelObject(); if (modelObject != null) { modelObject.clear(); } } super.onDetach(); }