ich habe eine Frage zum Thema Regeln und der automatischen Übernahme von Werten zwischen verschiedenen Feldern.
Ich habe ein Formular, welches eine Combobox und ein Textfeld enthält (Die Combobox sprachunabhänig, aber mit sprachabhängigen Labels und das Textfeld sprachabhängig). Die Combobox wird aus einer Datenquelle befüllt, in der sprachabhängige Werte für die Labels der Combobox enthalten sind. Nun möchte ich per Regel beim Auswählen eines Wertes der Combobox das sprachabhängige Label der Combobox in das Textfeld übernehmen, natürlich passend für die jeweilige Sprache.
<CMS_INPUT_COMBOBOX name="tt_linkCategory" singleLine="no" useLanguages="no">
<CMS_INCLUDE_OPTIONS type="database">
<LABELS>
<LABEL lang="*">#item.linkCategoryName</LABEL>
</LABELS>
<KEY>linkCategoryName_DE</KEY>
<TABLE>foo_startpage_db.dt_linkcategory</TABLE>
</CMS_INCLUDE_OPTIONS>
<LANGINFOS>
<LANGINFO lang="*" label="Link Category" description="Select Category of Link"/>
</LANGINFOS>
</CMS_INPUT_COMBOBOX>
<CMS_INPUT_TEXT name="tt_linkText" hFill="yes" singleLine="no" useLanguages="yes">
<LANGINFOS>
<LANGINFO lang="*" label="Link Text"/>
</LANGINFOS>
</CMS_INPUT_TEXT>
Das Kopieren funktioniert soweit auch, nur eben aufgrund des <KEY> Tags im Formular der Combobox nur mit dem Deutschen Wert. Entferne ich das "_DE" im KEY Tag wird das Label in der Combobox zwar noch korrekt ausgeführt, aber beim Kopieren über die Regel tritt der folgende Fehler auf.
Column 'linkCategoryName' does not exist in table 'dt_linkCategory'!
FSVersion=5.2.905.76007#4484;JDK=1.8.0_144 64bit Oracle Corporation;OS=Windows 10 10.0 amd64;Date=14.09.2017 08:47:51
java.lang.IllegalStateException: Column 'linkCategoryName' does not exist in table 'dt_linkCategory'!
at de.espirit.firstspirit.store.access.contentstore.ContentOptionFactory$ContentOption.getKeyValue(ContentOptionFactory.java:255)
at de.espirit.firstspirit.store.access.contentstore.ContentOptionFactory$ContentOption.getKey(ContentOptionFactory.java:193)
at de.espirit.firstspirit.access.editor.value.OptionImpl.equals(OptionImpl.java:46)
at de.espirit.common.gui.SortedComboBox$SortedComboBoxModel.getSelectedIndex(SortedComboBox.java:519)
at de.espirit.common.gui.SortedComboBox.getSelectedIndex(SortedComboBox.java:362)
at javax.swing.plaf.basic.BasicComboPopup$Handler.itemStateChanged(Unknown Source)
at javax.swing.JComboBox.fireItemStateChanged(Unknown Source)
at javax.swing.JComboBox.selectedItemChanged(Unknown Source)
at javax.swing.JComboBox.setSelectedItem(Unknown Source)
at de.espirit.common.gui.SortedComboBox.setSelectedItem(SortedComboBox.java:372)
at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at javax.swing.plaf.basic.BasicComboPopup$1.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$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at de.espirit.firstspirit.client.AWTDispatchingEventQueue.defaultDispatchEvent(AWTDispatchingEventQueue.java:161)
at de.espirit.firstspirit.client.AWTDispatchingEventQueue._dispatchEvent(AWTDispatchingEventQueue.java:138)
at de.espirit.firstspirit.client.AWTDispatchingEventQueue.dispatchEvent(AWTDispatchingEventQueue.java:131)
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)
Hat jemand von euch eine Lösung für das Problem? Wie kann ich per Regel das Label einer Combobox sprachabhängig in ein sprachabhängiges Textfeld übertragen?