Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Radio Button and DataBinding


Level 5

I have a group of two radio buttons in a form. I bind it with an xml schema but when I try to use the value of the radio button selected (1 for the first and 2 for the second) my variable logger print me null.

How can I bind radio buttons to know the selected one ?

Thank You 🙂
0 Replies


Level 10
Try writing the data out of the form to ensure it is getting to the server. Then we can determine if there is something wrong with your XPath statement.


Level 5
I don't understand what you mean by writing the data out of the form neither how to do that but if it could help, in my form, I have several fields (drop down list, textfield and check box ) binding with my xml schema and I have no problems with them.

If you explain me what you mean I could try your solution. Thanks again 😄


Level 10
You can add a button to the form and add this code on th eclick event:

This will allow you to save your data file locally so we can see that the RadioButtonList values are getting set in the xml data file.


Level 10
Then that explains why you cannot write it out on the server. The binding between the radiobuttonlist and your element in your schema is incorrect. Are you binding to individual radiobuttons or to the RadioButtonList?

Once you ensure that the data is appearing in the xml then you will be able to use it on the server side.


Level 5
I try to bind it with a radiobutton but it binds it always with my RadioButton group. I will try to bind it correctly with my schema because of your trick you gave me.

What kind of type must be the element in my schema to bind the radio button correctly ? Int, Boolean , String ?


Level 5
I'm mistake myself. The RadioButton value appears in the xml data and is correct ( value 1 or 2)


Level 5
OK, finally I have no values for all my fields in one form in the process.

I have a process with an Initform. The form is binding with an xml schema.

The user fill it and I map the fields with a setValue in a string variable and in the second form with the same schema. As so far no problems, it works.

Next the second form is approved or denied and I map the fields with a setValue and there is a problem. I tried to map into string variables, xml variables, boolean variables and I've got nothing. I don't understand. This is the same schema and it works nice the first time.

Thank you.


Level 5

I have a mapping problem. In my process I have two forms with the same xml schema binding to this forms.

The first form is prefill with his informations (name, division, email etc ...), his superior informations and he can choose and fill a new superior.

Once the form is fill and send, the new superior received the form with the completed informations.

I use a setValue to extract the name of the superior and to associate it with an Assign Task and map the data of the first form into the second form and it works.

After the second form is approved, I need to exctract some other informations but whatever I can do, all the values are null. However when I extract data from the form with the function; the data xml is fill with the correct information.

In my first setValues I map the field login of my form with this xpath :

location expression

/process_data/@nplusun /process_data/FormInit/object/data/xdp/datasets/data/FormulaireA/Nouveau/login

and the data

/process_data/FormEtape2/object/data/xdp/datasets/data /process_data/FormInit/object/data/xdp/datasets/data

It works.

In my second setValues I do :


/process_data/@name /process_data/FormEtape2/object/data/xdp/datasets/data/FormulaireA/Ancien/NomPrenom

I try with serializable, with an xml variable assiocated to the same schema than my form.

I never had a problem of mapping, I don't understand what appends 😞

Thank You for helping me