/** */ @Override protected void onBeforeRender() { super.onBeforeRender(); } }
@Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); }
/** * @see org.apache.wicket.markup.html.form.FormComponent#updateModel() */ @Override public void updateModel() { if (modelMarkedAsChanged == true) { // Work-around: update model only if not marked as changed. Prevent overwriting the model by the user's input. modelMarkedAsChanged = false; } else { super.updateModel(); } }
@Override protected void onInitialize() { super.onInitialize(); setFilterCriteria(manager, getFilterCriteriaType(), getModel()); }
@Override protected void onDetach() { if (rootNode != null) rootNode.detach(); super.onDetach(); } }
@Override protected void onModelChanged() { super.onModelChanged(); if(nameModel!=null) nameModel.setObject(tempName); } }
@Override protected void onInitialize() { super.onInitialize();
@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(); }
/** * {@inheritDoc} */ @Override protected void onModelChanged() { super.onModelChanged(); getFormComponent().modelChanged(); }
/** */ @Override protected void onBeforeRender() { super.onBeforeRender(); } }
@Override protected void onInitialize() { super.onInitialize(); Charset detectedCharset = ContentDetector.detectCharset(getModelObject()); Charset charset = detectedCharset!=null?detectedCharset:Charset.defaultCharset(); String source = new String(getModelObject(), charset); add(input = new TextArea<String>("input", Model.of(source)) { @Override protected boolean shouldTrimInput() { return false; } }); setOutputMarkupId(true); }
@Override // ensure that this component is embedded in a <span> ... </span> protected void onComponentTag(ComponentTag pTag) { super.onComponentTag(pTag); pTag.setName("span"); // Remove non-conformant <span> attributes IValueMap attribMap = pTag.getAttributes(); Iterator<Map.Entry<String, Object>> attrIterator = attribMap.entrySet().iterator(); while (attrIterator.hasNext()) { Map.Entry<String, Object> entry = attrIterator.next(); String key = entry.getKey().toLowerCase(); if (!ALLOWED_SPAN_ATTRIBUTES.contains(key)) { attrIterator.remove(); } } }
@Override public void updateModel() { super.updateModel(); palette.getRecorderComponent().updateModel(); } }
/** * @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(); }
/** * {@inheritDoc} */ @Override protected void onModelChanged() { super.onModelChanged(); this.leftFormComponent.modelChanged(); this.rightFormComponent.modelChanged(); }
/** */ @Override protected void onBeforeRender() { super.onBeforeRender(); }
@Override protected void onInitialize() { super.onInitialize(); Date date = getModelObject(); Instant instant = date != null ? date.toInstant() : null; Date pickerDate = null; ZonedDateTime zonedDateTime = null; if (instant != null) { zonedDateTime = instant.atZone(clientZone); pickerDate = Date.from(zonedDateTime.toInstant()); } add(picker = new ODateField("datePanel", Model.of(pickerDate), clientZone)); addTimeComponents(zonedDateTime); add(AttributeModifier.append("class", "bootstrap-data-picker")); setOutputMarkupId(true); }
/** * @see org.apache.wicket.markup.html.form.FormComponentPanel#onComponentTag(org.apache.wicket.markup.ComponentTag) */ protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); // remove the name attribute added by the FormComponent if (tag.getAttributes().containsKey(NAME_ATTR)) { tag.getAttributes().remove(NAME_ATTR); } }
@Override public void updateModel() { super.updateModel(); palette.getRecorderComponent().updateModel(); } }
/** * @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(); }