pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Whitcomb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIVOT-888) Nullpointer Exception while editing TextArea with text property two-way bounded
Date Tue, 15 Jan 2013 17:34:12 GMT

    [ https://issues.apache.org/jira/browse/PIVOT-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13554034#comment-13554034
] 

Roger Whitcomb commented on PIVOT-888:
--------------------------------------

Hi Karel,
This trace doesn't look like it corresponds to the 2.0.x source code, so which version are
you using?  Can you build from source and try it with either the current "trunk" or "branches/2.0.x"
code?  If not, let me know and I'll try to track it down another way.  Thanks.
                
> Nullpointer Exception while editing TextArea with text property two-way bounded
> -------------------------------------------------------------------------------
>
>                 Key: PIVOT-888
>                 URL: https://issues.apache.org/jira/browse/PIVOT-888
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk
>    Affects Versions: 2.0.2
>            Reporter: Karel Hübl
>            Assignee: Roger Whitcomb
>            Priority: Trivial
>             Fix For: 2.0.3
>
>
> 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())) {
> 			return;
> 		}
> 		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>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message