Drop-down box in a form

User 9aa4619393

17-02-2012 09:21:50

Hi,


is it possible to add a drop-down box to a form?


I would like to define a list of values (for example a status of NEW/ONGOING/CLOSED) and be able to switch the value.


I have tried defining a new Standard Field, of type Text field called it Status. Then I have checked the option "Discrete set of values" and set "NEW" as the default value. Now I was expecting to see an option to enter the discrete set of values but I can't find it.


Could you please help?
Many thanks


Anna

ChemAxon 2bdd02d1e5

21-02-2012 06:47:38

Hi Anna,


your approach seem good to me. Now if you double click(means editing the entry) on given text field drop-down-box menu is available. For the first tim you will see only default value. All discrete vaues are shown in the column if they are pressent there.


Filip







User 9aa4619393

28-02-2012 10:38:24

Hi Filip


thanks for your answer.


I now have a single line text-field . In browse mode, when I double-click the field I get a drop-down box with the default value "NEW", which I added when I created the text field, and an empty line. If I choose the empty-line to add another value (ONGOING) I get an error message (see at the bottom).


Thanks


Anna


java.lang.AssertionError: Field 9FD4B01913181E09BBD905B60173C3F8 not found in this entity
 at com.im.df.impl.db.DBEntityDataProviderImpl.retrieveDistinctValuesForField(DBEntityDataProviderImpl.java:784)
 at com.im.ijc.widgets.table.editors.DistinctValuesTCEditor.updateAvailableValues(DistinctValuesTCEditor.java:114)
 at com.im.ijc.widgets.table.editors.DistinctValuesTCEditor.access$100(DistinctValuesTCEditor.java:37)
 at com.im.ijc.widgets.table.editors.DistinctValuesTCEditor$1.rowsUpdated(DistinctValuesTCEditor.java:92)
 at com.im.df.impl.db.DBEntityDataProviderImpl.fireEvent(DBEntityDataProviderImpl.java:750)
 at com.im.df.impl.db.DBEntityDataProviderImpl.fireUpdateEvents(DBEntityDataProviderImpl.java:644)
 at com.im.df.impl.db.DBEntityDataProviderImpl.updateImpl(DBEntityDataProviderImpl.java:605)
 at com.im.df.impl.db.DBEntityDataProviderImpl.update(DBEntityDataProviderImpl.java:484)
 at com.im.df.impl.db.DBEntityDataProviderImpl.update(DBEntityDataProviderImpl.java:492)
 at com.im.ijc.widgets.table.VertexStateDataCache.storeValue(VertexStateDataCache.java:225)
 at com.im.ijc.widgets.table.VertexTableModel.setValueAt(VertexTableModel.java:186)
 at com.im.ijc.widgets.table.VertexTableModel.setValueAt(VertexTableModel.java:175)
 at javax.swing.JTable.setValueAt(Unknown Source)
 at javax.swing.JTable.editingStopped(Unknown Source)
 at javax.swing.AbstractCellEditor.fireEditingStopped(Unknown Source)
 at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(Unknown Source)
 at javax.swing.DefaultCellEditor$3.stopCellEditing(Unknown Source)
 at javax.swing.DefaultCellEditor.stopCellEditing(Unknown Source)
 at com.im.ijc.widgets.table.editors.DistinctValuesTCEditor.stopCellEditing(DistinctValuesTCEditor.java:123)
 at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown Source)
 at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
 at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
 at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
 at java.awt.Component.processMouseEvent(Unknown Source)
 at javax.swing.JComponent.processMouseEvent(Unknown Source)
 at java.awt.Component.processEvent(Unknown Source)
 at java.awt.Container.processEvent(Unknown Source)
 at java.awt.Component.dispatchEventImpl(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
 at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
 at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Window.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
 at java.awt.EventQueue.access$000(Unknown Source)
 at java.awt.EventQueue$1.run(Unknown Source)
 at java.awt.EventQueue$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
 at java.awt.EventQueue$2.run(Unknown Source)
[catch] at java.awt.EventQueue$2.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
 at java.awt.EventQueue.dispatchEvent(Unknown Source)
 at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.run(Unknown Source)


 


 

ChemAxon 2bdd02d1e5

28-02-2012 12:30:49

Hi Anna, 


I've not get this error. Can you please specify which version of IJC and which database are you using?


Thanks a lot for the report.


Filip Zimandl







ChemAxon 2bdd02d1e5

29-08-2012 13:12:11

It is fixed in IJC 5.10.