Hi Patrick,
overwrite AjaxEditableLabel#updateLabelAjaxAttributes() and use a
precondition:
@Override
protected void
updateLabelAjaxAttributes(AjaxRequestAttributes attributes)
{
attributes.getAjaxCallListeners().add(new
AjaxCallListener() {
@Override
public CharSequence getPrecondition(Component
component)
{
// only when no selection
return "return window.getSelection() == '';";
}
});
}
Have fun
Sven
On 16.07.19 16:50, Patrick Schwarzer wrote:
Dear Sir or Madam,
we are using AjaxEditableMultiLineLabel in our Wicket Application.
Currently when an user selects text, the AjaxEditableMultiLineLabel
changes to edit mode and selects the whole text. The user selection is
lost.
We want to know, if it is possible to block the edit mode, when user
selects text in the AjaxEditableMultiLineLabel?
When it is possible, can you explain, how this can be realized?
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
** <http://www.tomtec.de/>