Package org.molgenis.framework.ui.html

Examples of org.molgenis.framework.ui.html.SelectInput


    out.println("Step 2: choose filters<br>");
    out.println("<form>");
    out.println("You choose to use the REST interface for retrieval of '" + entity.getClass().getName()
        + "' data. (<a href=\"../find\">back</a>)<br><br> Here you can add filters:<br>");

    SelectInput fieldInput = new SelectInput("field", null);
    fieldInput.setOptions(entity.getFields().toArray(new String[entity.getFields().size()]));

    SelectInput operatorInput = new SelectInput("operator", null);
    List<String> operators = new ArrayList<String>();
    operators.add(QueryRule.Operator.EQUALS.toString());
    operators.add(QueryRule.Operator.GREATER_EQUAL.toString());
    operators.add(QueryRule.Operator.NOT.toString());
    operators.add(QueryRule.Operator.LESS.toString());
    operators.add(QueryRule.Operator.LESS_EQUAL.toString());
    operators.add(QueryRule.Operator.LIKE.toString());
    operatorInput.setOptions(operators.toArray(new String[operators.size()]));

    StringInput valueInput = new StringInput("value", null);

    out.println(fieldInput.getHtml() + operatorInput.getHtml() + valueInput.getHtml());
    out.println("<br>");

    out.println(fieldInput.getHtml() + operatorInput.getHtml() + valueInput.getHtml());
    out.println("<br>");

    out.println("<input type=\"submit\" value=\"generate url\" onclick=\"generateRestUrl(this.form.elements); return false\">");

    out.println("TIP: notice how the url is bookmarkeable for future downloads!");
View Full Code Here

TOP

Related Classes of org.molgenis.framework.ui.html.SelectInput

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.