Hi all,
i have to insert 2 RadioBlock in a Repeatable item in a config.jelly. I 
have only 1 variable in the main class that is a list of the "external" 
repeatable, inside it i have 2 radio block with a text box.
The variable of Radioblocks (choise) and the var of the 2 texboxes (field1 
and field2) are in the class of the "external list" in a 
@DataBoundConstructor.
I i don't repeat all the form it storage all data correctly but if the 
"external" repeatable is duplicated i have problem of storage, not with the 
textbox (they're correct) but whit the choise did with the RadioBlocks. How 
can I bind correctly these RadioBlocks?
Thanks for the replies, regards.



JAVA CODE:

@DataBoundConstructor
public myClass(String choise, String field1, String field2){
.....
}


AND

public principalClass newInstance (StaplerRequest req, JSONOBJECT formData) 
throws FormException{
       List<MyClass> listOfTask = req.bindParametersToList(MyClass.class, 
"MyProject.MyClass.");
       ......
       return new principalClass(listOfTask);
}


CONFIG.JELLY

<f:repeatable var="t" items="${instance.task}" add="Add another task" 
minimum="1">
.....
                       <f:radioBlock name="myProject.myClass.choise" 
title="First Option" checked="${t.choise=='option1'}" value="option1">
    <f:nested>
      <f:entry title="Input1" field="field1">
      <input class="setting-input" name="myProject.myClass.field1." 
type="text" value="${t.field1}"/>
          </f:entry>
          </f:nested>
          </f:radioBlock>
    <f:radioBlock name="myProject.myClass.choise" title="Second Option" 
checked="${t.choise=='option2'}" value="option2">
     <f:nested>
       <f:entry title="Input2" field="field2">
       <input class="setting-input" name="myProject.myClass.field2." 
type="text" value="${t.field2}"/>
           </f:entry>
           </f:nested>
           </f:radioBlock>
....
</f:repeatable>

Reply via email to