# Error using propertyChange + expression with password field

**URL:** <https://forum.inductiveautomation.com/t/error-using-propertychange-expression-with-password-field/2991>\
**Category:** Ignition\
**Created:** [June 3, 2011, 6:19am UTC](https://forum.inductiveautomation.com/t/error-using-propertychange-expression-with-password-field/2991 "2011-06-03T06:19:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgz](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@cgz](https://forum.inductiveautomation.com/u/cgz)\
**Post date:** [June 3, 2011, 6:19am UTC](https://forum.inductiveautomation.com/t/error-using-propertychange-expression-with-password-field/2991/1 "2011-06-03T06:19:02Z")

</div>

I’m attempting to make a “record editing window”, where

1. a record is a single-row dataset as root container’s dynamic property,
2. each field is bound to the dataset using expressions such as “{Root Container.row}[0, ‘Password’]” for the “Text”-property,
3. each field has propertyChange handler updating the dataset every time the “Text” property changes.

This works fine for normal text input, but password field gives the error below.

Also, with calendar field (a simple date input), if using “Date”-property, the above arrangement  
causes a total Designer lock-up. Calendar works, if using “Text”-property.

THE ERROR:

java.lang.Exception: Error setting property to ‘secret password’ for binding on  
UserEdit.Root Container.txtPassword.text  
at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:260)  
at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateValue(AbstractPropertyAdapter.java:203)  
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:57)  
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.childInteractionUpdated(ExpressionPropertyAdapter.java:42)  
at com.inductiveautomation.factorypmi.application.binding.PropertyListenerDescriptor.propertyChange(PropertyListenerDescriptor.java:67)  
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)  
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:347)  
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)  
at java.awt.Component.firePropertyChange(Component.java:8132)  
at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.fireDynChange(AbstractVisionPanel.java:128)  
at com.inductiveautomation.factorypmi.application.binding.util.DynamicPropertyUtil.setPropertyValue(DynamicPropertyUtil.java:217)  
at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.setPropertyValue(AbstractVisionPanel.java:112)  
at com.inductiveautomation.factorypmi.application.script.PyComponentWrapper. **setattr** (PyComponentWrapper.java:68)  
at org.python.pycode.\_pyx15.f$0(event:propertyChange:4)  
at org.python.pycode.\_pyx15.call\_function(event:propertyChange)  
at org.python.core.PyTableCode.call(PyTableCode.java)  
at org.python.core.PyCode.call(PyCode.java)  
at org.python.core.Py.runCode(Py.java)  
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:391)  
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:139)  
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:247)  
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)  
at $Proxy0.propertyChange(Unknown Source)  
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)  
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)  
at java.awt.Component.firePropertyChange(Component.java:8132)  
at com.inductiveautomation.factorypmi.application.components.PMIPasswordField.access$000(PMIPasswordField.java:37)  
at com.inductiveautomation.factorypmi.application.components.PMIPasswordField$1.insertUpdate(PMIPasswordField.java:53)  
at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)  
at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:734)  
at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:693)  
at javax.swing.text.PlainDocument.insertString(PlainDocument.java:114)  
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:655)  
at javax.swing.text.JTextComponent.setText(JTextComponent.java:1693)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
at java.lang.reflect.Method.invoke(Method.java:597)  
at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:253)  
at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateValue(AbstractPropertyAdapter.java:203)  
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:57)  
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.startup(ExpressionPropertyAdapter.java:71)  
at com.inductiveautomation.factorypmi.application.FPMIWindow.startupAdapters(FPMIWindow.java:316)  
at com.inductiveautomation.factorypmi.designer.workspace.WindowWorkspace$DesigntimeWindowOpener.openWindow(WindowWorkspace.java:2414)  
at com.inductiveautomation.factorypmi.application.FPMIApp.openWindow(FPMIApp.java:860)  
at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities$5.run(NavUtilities.java:374)  
at com.inductiveautomation.factorypmi.application.script.builtin.WindowUtilities.doGUIAction(WindowUtilities.java:525)  
at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.openWindowImpl(NavUtilities.java:321)  
at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.openWindow(NavUtilities.java:317)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
at java.lang.reflect.Method.invoke(Method.java:597)  
at org.python.core.PyReflectedFunction. **call** (PyReflectedFunction.java)  
at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. **call** (ScriptManager.java:310)  
at org.python.core.PyObject. **call** (PyObject.java)  
at org.python.core.PyObject.invoke(PyObject.java)  
at org.python.pycode.\_pyx5.f$0(event:mouseClicked:8)  
at org.python.pycode.\_pyx5.call\_function(event:mouseClicked)  
at org.python.core.PyTableCode.call(PyTableCode.java)  
at org.python.core.PyCode.call(PyCode.java)  
at org.python.core.Py.runCode(Py.java)  
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:391)  
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:139)  
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:247)  
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)  
at $Proxy1.mouseClicked(Unknown Source)  
at com.inductiveautomation.factorypmi.application.components.util.EventDelegateDispatcher$MouseEventDispatcher.mouseClicked(EventDelegateDispatcher.java:97)  
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)  
at java.awt.Component.processMouseEvent(Component.java:6270)  
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)  
at java.awt.Component.processEvent(Component.java:6032)  
at java.awt.Container.processEvent(Container.java:2041)  
at java.awt.Component.dispatchEventImpl(Component.java:4630)  
at java.awt.Container.dispatchEventImpl(Container.java:2099)  
at java.awt.Component.dispatchEvent(Component.java:4460)  
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)  
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)  
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)  
at java.awt.Container.dispatchEventImpl(Container.java:2085)  
at java.awt.Window.dispatchEventImpl(Window.java:2478)  
at java.awt.Component.dispatchEvent(Component.java:4460)  
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)  
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)  
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)  
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)  
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)  
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)  
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)  
Caused by: java.lang.IllegalStateException: Attempt to mutate in notification  
at javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1323)  
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:644)  
at javax.swing.text.JTextComponent.setText(JTextComponent.java:1693)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)  
at java.lang.reflect.Method.invoke(Method.java:597)  
at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:253)  
… 88 more

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [June 17, 2011, 11:43pm UTC](https://forum.inductiveautomation.com/t/error-using-propertychange-expression-with-password-field/2991/2 "2011-06-17T23:43:36Z")

</div>

Thanks for the report, both of these problems have been resolved for 7.2.7.

The Password field no longer fires events from within it’s Document’s events, which is what caused your “IllegalStateException: Attempt to mutate in notification” error.

The dropdown calendar now correctly fires property changes with an oldValue, which should protect against the StackOverflowError that was freezing your designer.
