Examples of generateHtml()


Examples of org.openmrs.module.htmlformentry.element.StandardRegimenElement.generateHtml()

            Map<String, String> parameters) {
     
      StandardRegimenElement element = new StandardRegimenElement(session.getContext(), parameters);
    session.getSubmissionController().addAction(element);
   
    return element.generateHtml(session.getContext());
    }

}
View Full Code Here

Examples of org.openmrs.module.htmlformentry.element.StandardRegimenElement1_10.generateHtml()

          Map<String, String> parameters) {
   
    StandardRegimenElement1_10 element = new StandardRegimenElement1_10(session.getContext(), parameters);
    session.getSubmissionController().addAction(element);
   
    return element.generateHtml(session.getContext());
  }
 
}
View Full Code Here

Examples of org.openmrs.module.htmlformentry.element.WorkflowStateSubmissionElement.generateHtml()

    @Override
    protected String getSubstitution(FormEntrySession session, FormSubmissionController controllerActions,
                                     Map<String, String> parameters) {
      WorkflowStateSubmissionElement element = new WorkflowStateSubmissionElement(session.getContext(), parameters);
    session.getSubmissionController().addAction(element);
    return element.generateHtml(session.getContext());
    }
 
}
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.CheckboxWidget.generateHtml()

   
    @Test
    public void checkboxWidgetShouldProduceHtml() {
        CheckboxWidget cw = new CheckboxWidget();
        context.registerWidget(cw);
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\"/><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
        cw.setInitialValue("Something");
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" checked=\"true\"/><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
        cw.setLabel("This is a label");
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" checked=\"true\"/><label for=\"w1\">This is a label</label><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
    }
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.CheckboxWidget.generateHtml()

    public void checkboxWidgetShouldProduceHtml() {
        CheckboxWidget cw = new CheckboxWidget();
        context.registerWidget(cw);
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\"/><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
        cw.setInitialValue("Something");
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" checked=\"true\"/><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
        cw.setLabel("This is a label");
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" checked=\"true\"/><label for=\"w1\">This is a label</label><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
    }
   
    @Test
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.CheckboxWidget.generateHtml()

        context.registerWidget(cw);
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\"/><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
        cw.setInitialValue("Something");
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" checked=\"true\"/><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
        cw.setLabel("This is a label");
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" checked=\"true\"/><label for=\"w1\">This is a label</label><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
    }
   
    @Test
    public void dropdownWidgetShouldProduceHtml() {
        DropdownWidget dw = new DropdownWidget();
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.CheckboxWidget.generateHtml()

    @Test
    public void checkboxWidgetShouldProduceHtmlWithToggleSimple() {
    ToggleWidget toggleWidget = new ToggleWidget("hatColors");
    CheckboxWidget cw = new CheckboxWidget("Has a hat?", "true", toggleWidget.getTargetId(), toggleWidget.isToggleDim());
        context.registerWidget(cw);
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" toggleHide=\"hatColors\"/><label for=\"w1\">Has a hat?</label><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
    }
   
    @Test
    public void checkboxWidgetShouldProduceHtmlWithToggleDim() {
    ToggleWidget toggleWidget = new ToggleWidget("{id: 'hatColors', style: 'dim'}");
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.CheckboxWidget.generateHtml()

    @Test
    public void checkboxWidgetShouldProduceHtmlWithToggleDim() {
    ToggleWidget toggleWidget = new ToggleWidget("{id: 'hatColors', style: 'dim'}");
    CheckboxWidget cw = new CheckboxWidget("Has a hat?", "true", toggleWidget.getTargetId(), toggleWidget.isToggleDim());
        context.registerWidget(cw);
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" toggleDim=\"hatColors\"/><label for=\"w1\">Has a hat?</label><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
    }
   
    @Test
    public void checkboxWidgetShouldProduceHtmlWithToggleHide() {
    ToggleWidget toggleWidget = new ToggleWidget("{id: 'hatColors', style: 'hide'}");
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.CheckboxWidget.generateHtml()

    @Test
    public void checkboxWidgetShouldProduceHtmlWithToggleHide() {
    ToggleWidget toggleWidget = new ToggleWidget("{id: 'hatColors', style: 'hide'}");
    CheckboxWidget cw = new CheckboxWidget("Has a hat?", "true", toggleWidget.getTargetId(), toggleWidget.isToggleDim());
        context.registerWidget(cw);
        Assert.assertEquals("<input type=\"checkbox\" id=\"w1\" name=\"w1\" value=\"true\" toggleHide=\"hatColors\"/><label for=\"w1\">Has a hat?</label><input type=\"hidden\" name=\"_w1\"/>", cw.generateHtml(context));
    }
   
  @Test
  public void toggleWidgetShouldParseSimpleAttribute() {
    ToggleWidget toggleWidget = new ToggleWidget("hatColors");
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.DropdownWidget.generateHtml()

    public void dropdownWidgetShouldProduceHtml() {
        DropdownWidget dw = new DropdownWidget();
        context.registerWidget(dw);
        dw.addOption(new Option("Extra Large", "XL", false));
        dw.addOption(new Option("Large", "L", true));
        Assert.assertEquals("<select id=\"w1\" name=\"w1\"><option value=\"XL\">Extra Large</option><option value=\"L\" selected=\"true\">Large</option></select>", dw.generateHtml(context));
    }

    @Test
    public void UploadWidgetShouldProduceHtml(){
        UploadWidget uw = new UploadWidget();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.