Package org.openmrs.module.htmlformentry

Examples of org.openmrs.module.htmlformentry.Translator


        String headerLabel = getAttribute(node, "headerLabel", null);
        if (headerLabel == null) {
            String headerCode = getAttribute(node, "headerCode", null);
            if (headerCode != null) {
                Translator trans = session.getContext().getTranslator();
                headerLabel = trans.translate(Context.getLocale().toString(), headerCode);
            }
        }

        out.print("<" + sectionTag + " class=\""+sectionStyleClass + "\"");
        if (sectionId != null) {
View Full Code Here


      //check for custom label & style
        if (parameters.containsKey("submitLabel")) {
          submitLabel =  parameters.get("submitLabel");
        }
        if (parameters.containsKey("submitCode")) {
        Translator trans = session.getContext().getTranslator();
        submitLabel = trans.translate(Context.getLocale().toString(), parameters.get("submitCode"));
        }
        if (parameters.containsKey("submitClass")) {
        submitClass = submitClass + " " + parameters.get("submitClass")//append any other classes specified
        }
        if (parameters.containsKey("class")) {
View Full Code Here

    private Map<String, String> params;

    @Before
    public void setUp() throws Exception {
        HtmlFormSchema schema = new HtmlFormSchema();
        Translator translator = new Translator() {
            @Override
            public String translate(String localeStr, String key) {
                return key;
            }
        };
View Full Code Here

                Node attribute = map.item(j);
                if (attribute.getNodeName().equals("headerLabel")) {
                    headerLabel = attribute.getNodeValue();
                }
                if (attribute.getNodeName().equals("headerCode")) {
                    Translator trans = session.getContext().getTranslator();
                    headerLabel = trans.translate(Context.getLocale().toString(), attribute.getNodeValue());
                }
            }
            ret.put(i, headerLabel);
        }
        return ret;
View Full Code Here

TOP

Related Classes of org.openmrs.module.htmlformentry.Translator

Copyright © 2018 www.massapicom. 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.