Description
I am getting NullPointer exception trace printed to System.out when I edit TextArea, which text property is two-way data bounded.
The issue is fixed when I extend TextArea and override the setText mehtod to do nothing, if the text equals to current text value:
Fixed class:
public class TwoWayBindableTextArea extends TextArea {
public void setText(String text) {
if (text != null && text.equals(this.getText()))
super.setText(text);
}
}
Problematic bxml:
<Form styles="
{padding:5}"
xmlns="org.apache.pivot.wtk"
xmlns:view="com.dirigent.gui.component"
xmlns:bxml="http://pivot.apache.org/bxml" width="300" height="200">
<Form.Section>
<TextInput bxml:id="textInput" text="${textArea.text}"/>
<Border>
<FillPane minimumWidth="300" minimumHeight="100">
<!-<view:TwoWayBindableTextArea bxml:id="textArea" text="${textInput.text}"/>->
<TextArea bxml:id="textArea" text="${textInput.text}"/>
</FillPane>
</Border>
</Form.Section>
</Form>