Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Representation and null values #2

Open
pablocampillo opened this issue Dec 13, 2016 · 0 comments
Open

Visual Representation and null values #2

pablocampillo opened this issue Dec 13, 2016 · 0 comments

Comments

@pablocampillo
Copy link

Using Visual Representation for fields of entities that can be null doesn't work properly when the fields are references to entities. Initially they do, but once a value is set it cannot be unset (unlink) and a exception is thrown:

[java] java.lang.NullPointerException
[java] at ingenias.editor.editiondialog.GeneralEditionPanel.setValue(GeneralEditionPanel.java:1249)
[java] at ingenias.editor.editiondialog.GeneralEditionPanel.access$200(GeneralEditionPanel.java:93)
[java] at ingenias.editor.editiondialog.GeneralEditionPanel$4.actionPerformed(GeneralEditionPanel.java:582)
[java] at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
[java] at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
[java] at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
[java] at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
[java] at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
[java] at java.awt.Component.processMouseEvent(Component.java:6533)
[java] at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
[java] at java.awt.Component.processEvent(Component.java:6298)
[java] at java.awt.Container.processEvent(Container.java:2236)
[java] at java.awt.Component.dispatchEventImpl(Component.java:4889)
[java] at java.awt.Container.dispatchEventImpl(Container.java:2294)
[java] at java.awt.Component.dispatchEvent(Component.java:4711)
[java] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
[java] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
[java] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
[java] at java.awt.Container.dispatchEventImpl(Container.java:2280)
[java] at java.awt.Window.dispatchEventImpl(Window.java:2746)
[java] at java.awt.Component.dispatchEvent(Component.java:4711)
[java] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
[java] at java.awt.EventQueue.access$500(EventQueue.java:97)
[java] at java.awt.EventQueue$3.run(EventQueue.java:709)
[java] at java.awt.EventQueue$3.run(EventQueue.java:703)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
[java] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
[java] at java.awt.EventQueue$4.run(EventQueue.java:731)
[java] at java.awt.EventQueue$4.run(EventQueue.java:729)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

For example:

<panel Background="white" HorizontalAlignment="CENTER" layout="FlowLayout(FlowLayout.CENTER,0,0)" >
<label id="HumanTarget"/>
</panel>

Nothing is shown while HumanTarget field is null. But once you set a value for the field, you can't unlink and the above exception is thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant