Hi Sven,
thanks for your fast reply.
This is how I fixed it now:
@Override
protected ExpandableTextField<String> newEditor(MarkupContainer parent, String
componentId, IModel<String> model)
{
// use ExpandableTextField instead of TextArea, to not trim text RPT-4917
MyTextArea<String> textField = new MyTextArea<>(componentId, model);
textField.setOutputMarkupId(true);
textField.setVisible(false);
// simple trick to not copy code in AjaxEditableMultiLineLabel::newEditor
FormComponent formComponent = super.newEditor(parent, componentId, model);
for (Behavior behavior : formComponent.getBehaviors())
{
behavior.unbind(formComponent);
textField.add(behavior);
}
return textField;
}
public class MyTextArea <T> extends TextArea<T>
{
private static final long serialVersionUID = 671612061991554000L;
public MyTextArea (String id, IModel<T> model)
{
super(id, model);
}
@Override
protected boolean shouldTrimInput()
{
return false;
}
}
Sorry, I have no access to jira.
Could someone else add the jira task please?
Kind regards
PATRICK SCHWARZER
SOFTWARE ENGINEER
o +49 89 32175 655
TOMTEC Imaging Systems GmbH
Edisonstrasse 6, 85716 Unterschleissheim, Germany, Managing Director:
Matthijs Groot Wassink, Dr. Thomas Piehler, HRB 235646 Amtsgericht Muenchen
[cid:[email protected]]<http://www.tomtec.de/>
Von: Patrick Schwarzer
Gesendet: Mittwoch, 7. August 2019 10:34
An: '[email protected]' <[email protected]>
Betreff: AjaxEditableMultiLineLabel and shouldTrimInput
Dear Sir or Madam,
is there a way to not trim text inserted in an AjaxEditableMultiLineLabel
editor?
Currently newEditor creates a new TeaxtArea and it seems not possible to
control return type of protected method shouldTrimInput of that TextArea.
Is there any possibility to do so without reimplement newEditor of
AjaxEditableMultiLineLabel?
We currently using Wicket 7.12.0.
Kind regards
PATRICK SCHWARZER
SOFTWARE ENGINEER
o +49 89 32175 655
TOMTEC Imaging Systems GmbH
Edisonstrasse 6, 85716 Unterschleissheim, Germany, Managing Director:
Matthijs Groot Wassink, Dr. Thomas Piehler, HRB 235646 Amtsgericht Muenchen
[cid:[email protected]]<http://www.tomtec.de/>