InPlaceEdit

Overview

The InPlaceEdit is a control to show text and edit it when focus it. Initially the text is just displayed. But if the control gets the focus it switched in to edit mode. Then the text can be edited. Depending on the type this can be just simple typing or values can be chosen via a DropdownBox. The text is assigned to the InPlaceEdit via the content aggregation. So the properties of the text are directly maintained on the content control. The content control can be a TextField, a ComboBox, a DropdownBox or a Link. In case of the Link the InPlaceEdit do not switch directly to the edit mode if its focused to allow the link-click. The edit mode is triggered by the edit button or the F2 key.
If some text is changed an revert button appears. Using this button or the Esc key reverts the text change to the original one. Using function clearOldText the original text can be cleared, so the changed text is now the current text. So applications can decide when reverting the text should be possible or not.
If the content control has a valueState property this can be directly maintained on the content control. The valueState property of the InPlaceEdit control is just mapped to the one of the content control in this case. If the content control has no setValueState property, the valueState is maintained directly on the InPlaceEdit.
The tooltip property is also just mapped to the one of the content control.
If the content control has a change event the one of the InPlaceEdit is just mapped to it.

Examples

inPlaceEdit with TextField

The first example shows a simple InPlaceEdit to modify simple text.



inPlaceEdit with ComboBox

This example shows a ComboBox as content. On the change event there is a handler to set the valueState.
Hint: In applications be sure to set the valueState back after some time (especially for success) to prevent confusing output.



inPlaceEdit with Link

This example shows a Link as content. To enable the link click functionality it must manually switched into edit mode
On the Link only the Text property is changed by the InPlaceEdit. On the change event the application can change the href property according to the text.



API Documentation

See API documentation