test_class.file: web-framework/src/test/java/org/unidal/web/jsp/function/FormFunctionTest.java
test_class.identifier: FormFunctionTest
test_case.body: @Test
     public void testRadios() {
        String result = FormFunction.showRadios("obj", getObjects(), "2", "value", "name");
        String expected = "<input type=\"radio\" name=\"obj\" value=\"1\" id=\"obj-1\"><label for=\"obj-1\">First</label>\r\n" + //
              "<input type=\"radio\" name=\"obj\" value=\"2\" id=\"obj-2\" checked><label for=\"obj-2\">Second</label>\r\n" + //
              "<input type=\"radio\" name=\"obj\" value=\"3\" id=\"obj-3\"><label for=\"obj-3\">Third</label>\r\n";
  
        Assert.assertEquals(expected, result);
     }
test_case.class_method_signature: FormFunctionTest.testRadios()
test_case.full_signature: @Test public void testRadios()
test_case.identifier: testRadios
test_case.invocations: showRadios getObjects assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRadios()
focal_class.file: web-framework/src/main/java/org/unidal/web/jsp/function/FormFunction.java
focal_class.identifier: FormFunction
focal_class.class_method_signature: FormFunction.getPropertyValue(Object instance, String property)
focal_class.full_signature: private static Object getPropertyValue(Object instance, String property)
focal_class.identifier: getPropertyValue
focal_class.modifiers: private static
focal_class.parameters: (Object instance, String property)
focal_class.return: Object
focal_class.signature: Object getPropertyValue(Object instance, String property)
focal_class.class_method_signature: FormFunction.getSelectedOrChecked(Object selected, Object value, boolean selectedOrChecked)
focal_class.full_signature: private static String getSelectedOrChecked(Object selected, Object value, boolean selectedOrChecked)
focal_class.identifier: getSelectedOrChecked
focal_class.modifiers: private static
focal_class.parameters: (Object selected, Object value, boolean selectedOrChecked)
focal_class.return: String
focal_class.signature: String getSelectedOrChecked(Object selected, Object value, boolean selectedOrChecked)
focal_class.class_method_signature: FormFunction.showCheckbox(String inputName, Object item, Object selected, String valueName, String textName)
focal_class.full_signature: @FunctionMeta(description = "Show checkbox from an object's properties in a form", example = "${w:showCheckbox('groupBy', groupBy, payload.groupBy, 'name', 'description')}") public static String showCheckbox(String inputName, Object item, Object selected, String valueName, String textName)
focal_class.identifier: showCheckbox
focal_class.modifiers: @FunctionMeta(description = "Show checkbox from an object's properties in a form", example = "${w:showCheckbox('groupBy', groupBy, payload.groupBy, 'name', 'description')}") public static
focal_class.parameters: (String inputName, Object item, Object selected, String valueName, String textName)
focal_class.return: String
focal_class.signature: String showCheckbox(String inputName, Object item, Object selected, String valueName, String textName)
focal_class.class_method_signature: FormFunction.showCheckboxes(String inputName, Object items, Object selected, String valueName, String textName)
focal_class.full_signature: @FunctionMeta(description = "Show multiple checkboxes from a list or array object's properties in a form", example = "${w:showCheckboxes('groupBy', groupBys, payload.groupBy, 'name', 'description')}") public static String showCheckboxes(String inputName, Object items, Object selected, String valueName, String textName)
focal_class.identifier: showCheckboxes
focal_class.modifiers: @FunctionMeta(description = "Show multiple checkboxes from a list or array object's properties in a form", example = "${w:showCheckboxes('groupBy', groupBys, payload.groupBy, 'name', 'description')}") public static
focal_class.parameters: (String inputName, Object items, Object selected, String valueName, String textName)
focal_class.return: String
focal_class.signature: String showCheckboxes(String inputName, Object items, Object selected, String valueName, String textName)
focal_class.class_method_signature: FormFunction.showOption(Object item, Object selected, String valueName, String textName)
focal_class.full_signature: @FunctionMeta(description = "Show select option from an object's properties in a form", example = "${w:showOption(groupBy, payload.groupBy, 'name', 'description')}") public static String showOption(Object item, Object selected, String valueName, String textName)
focal_class.identifier: showOption
focal_class.modifiers: @FunctionMeta(description = "Show select option from an object's properties in a form", example = "${w:showOption(groupBy, payload.groupBy, 'name', 'description')}") public static
focal_class.parameters: (Object item, Object selected, String valueName, String textName)
focal_class.return: String
focal_class.signature: String showOption(Object item, Object selected, String valueName, String textName)
focal_class.class_method_signature: FormFunction.showOptions(Object items, Object selected, String valueName, String textName)
focal_class.full_signature: @FunctionMeta(description = "Show multiple select options from a list or array object's properties in a form", example = "${w:showOptions(groupBys, payload.groupBy, 'name', 'description')}") public static String showOptions(Object items, Object selected, String valueName, String textName)
focal_class.identifier: showOptions
focal_class.modifiers: @FunctionMeta(description = "Show multiple select options from a list or array object's properties in a form", example = "${w:showOptions(groupBys, payload.groupBy, 'name', 'description')}") public static
focal_class.parameters: (Object items, Object selected, String valueName, String textName)
focal_class.return: String
focal_class.signature: String showOptions(Object items, Object selected, String valueName, String textName)
focal_class.class_method_signature: FormFunction.showRadio(String inputName, Object item, Object selected, String valueName, String textName)
focal_class.full_signature: @FunctionMeta(description = "Show radio from an object's properties in a form", example = "${w:showRadio('groupBy', groupBy, payload.groupBy, 'name', 'description')}") public static String showRadio(String inputName, Object item, Object selected, String valueName, String textName)
focal_class.identifier: showRadio
focal_class.modifiers: @FunctionMeta(description = "Show radio from an object's properties in a form", example = "${w:showRadio('groupBy', groupBy, payload.groupBy, 'name', 'description')}") public static
focal_class.parameters: (String inputName, Object item, Object selected, String valueName, String textName)
focal_class.return: String
focal_class.signature: String showRadio(String inputName, Object item, Object selected, String valueName, String textName)
focal_class.class_method_signature: FormFunction.showRadios(String inputName, Object items, Object selected, String valueName, String textName)
focal_class.full_signature: @FunctionMeta(description = "Show multiple radios from a list or array object's properties in a form", example = "${w:showRadios('groupBy', groupBys, payload.groupBy, 'name', 'description')}") public static String showRadios(String inputName, Object items, Object selected, String valueName, String textName)
focal_class.identifier: showRadios
focal_class.modifiers: @FunctionMeta(description = "Show multiple radios from a list or array object's properties in a form", example = "${w:showRadios('groupBy', groupBys, payload.groupBy, 'name', 'description')}") public static
focal_class.parameters: (String inputName, Object items, Object selected, String valueName, String textName)
focal_class.return: String
focal_class.signature: String showRadios(String inputName, Object items, Object selected, String valueName, String textName)
focal_class.class_method_signature: FormFunction.showResult(Object items, Object selected, String valueName, String textName)
focal_class.full_signature: @FunctionMeta(description = "Show selected result of checkbox, radio or option from an object's properties in a form", example = "${w:showResult(groupBys, payload.groupBy, 'name', 'description')}") public static Object showResult(Object items, Object selected, String valueName, String textName)
focal_class.identifier: showResult
focal_class.modifiers: @FunctionMeta(description = "Show selected result of checkbox, radio or option from an object's properties in a form", example = "${w:showResult(groupBys, payload.groupBy, 'name', 'description')}") public static
focal_class.parameters: (Object items, Object selected, String valueName, String textName)
focal_class.return: Object
focal_class.signature: Object showResult(Object items, Object selected, String valueName, String textName)
focal_method.body: @FunctionMeta(description = "Show multiple radios from a list or array object's properties in a form", example = "${w:showRadios('groupBy', groupBys, payload.groupBy, 'name', 'description')}")
     public static String showRadios(String inputName, Object items, Object selected, String valueName, String textName) {
        StringBuilder sb = new StringBuilder();
  
        if (items instanceof Object[]) {
           for (Object item : (Object[]) items) {
              sb.append(showRadio(inputName, item, selected, valueName, textName));
              sb.append("\r\n");
           }
        } else if (items instanceof List) {
           for (Object item : (List<?>) items) {
              sb.append(showRadio(inputName, item, selected, valueName, textName));
              sb.append("\r\n");
           }
        } else if (items != null) {
           throw new RuntimeException("Object[] or List expected, but was: " + items.getClass());
        }
  
        return sb.toString();
     }
focal_method.class_method_signature: FormFunction.showRadios(String inputName, Object items, Object selected, String valueName, String textName)
focal_method.full_signature: @FunctionMeta(description = "Show multiple radios from a list or array object's properties in a form", example = "${w:showRadios('groupBy', groupBys, payload.groupBy, 'name', 'description')}") public static String showRadios(String inputName, Object items, Object selected, String valueName, String textName)
focal_method.identifier: showRadios
focal_method.invocations: append showRadio append append showRadio append getClass toString
focal_method.modifiers: @FunctionMeta(description = "Show multiple radios from a list or array object's properties in a form", example = "${w:showRadios('groupBy', groupBys, payload.groupBy, 'name', 'description')}") public static
focal_method.parameters: (String inputName, Object items, Object selected, String valueName, String textName)
focal_method.return: String
focal_method.signature: String showRadios(String inputName, Object items, Object selected, String valueName, String textName)