Saving dynamic radioButtonGroup selection


I’m trying to save the selected item of radioButtonGroup (alternatively the selection from lookupField) but am at a loss so far as to how to achieve this.

Basically two radioButtonGroup and one lookupField load their data-aware content using the dataLoadCoordinator. Feeding the sources and creating the associations between the entities in the respective screens is working as intended.

There are three entities:

  • Questions
  • Answers
  • Information

Basic workflow as following:

1.Enter the answers first which are a composition to questions many-to-one
2. Enter the questions which are composition to answers one-to-many
3. Set which question may have which answers (one or more answers)
4. Go to information screen and select a question and its corresponding answer

Now in this information screen from step 4, then a user selects any item from the first radioButtonGroup and then from the second radioButtonGroup (or lookupField) the selection should be commited to the DB after the editor window is closed (again any other way like an extra button or saving immediately once a value changes is perfectly fine).

Inspiration I took from this demo project which is except for the Groovy (don’t know or know how to migrate) part and being on 6.x platform pretty much what I need as well.

I’ve attached my test (11.8 MB)

I must admit I am by now at a complete loss as to how to do this even after checking all sources several times I can think of.

Really appreciate any and all help!

Here the relevant parts taken from the demo project.

Editor screen in which the selection is done and should be commited to the database (information-edit.xml).

        <collection id="informationsDc"
            <loader id="informationsDl">
                    <![CDATA[select e from test_Information e]]>
        <collection id="questionsGroup1Dc" class="" view="questions-view">
            <loader id="questionsGroup1Dl">
                    <![CDATA[select e from test_Questions e]]>
        <collection id="answersGroup1Dc" class="" view="answers-view">
            <loader id="answersGroup1Dl">
                    <![CDATA[select e from test_Answers e where e.mapAnswerToQuestion = :container_questionsGroup1Dc]]>
        <instance id="informationDc" class="" view="information-view">
            <loader id="informationDl"/>
            <collection id="questionsesDc" property="mapInfoToQuestion"/>
            <collection id="answeresDc" property="mapInfoToAnswer"/>
    <dialogMode height="600"
        <dataLoadCoordinator auto="true"/>
    <layout spacing="true" margin="true">
        <vbox spacing="true" margin="true">
            <hbox id="editActions" spacing="true">
                <button action="windowCommitAndClose"/>
                <button action="windowClose"/>
            <form id="informationForm" dataContainer="informationDc">
                <column width="350px">
                    <textField id="pismsIDField" property="pismsID"/>
                    <textField id="pismsNameField" property="pismsName"/>
            <groupBox spacing="true" caption="Question group 1" collapsable="true"
                <radioButtonGroup id="questionGroup1" optionsContainer="questionsGroup1Dc"
                                  dataContainer="informationsDc" property="selectedQuestion"/>
                <radioButtonGroup id="answerGroup1" optionsContainer="answersGroup1Dc"
                                  dataContainer="informationsDc" property="selectedAnswer"/>
                <lookupField id="prodLnField" optionsContainer="answersGroup1Dc"
                             dataContainer="informationsDc" property="selectedAnswer"/>

Any pointers? Why is the state of the radio button not comitted? I tried mutliple approaches and setting different attributes but the knot is not untangling.