Search in sources :

Example 1 with Select

use of org.gsweb.components.ui.Select in project bamboobsc by billchen198318.

the class SelectTag method handler.

private Select handler() {
    this.width = this.width.toLowerCase();
    if (this.width.endsWith("px")) {
        this.width = StringUtils.replaceOnce(this.width, "px", "");
    }
    Select select = new Select();
    select.setId(this.id);
    select.setName(this.name);
    select.setWidth(Integer.parseInt(this.width));
    select.setDataSource(this.dataSource);
    select.setValue(this.value);
    select.setOnChange(this.onChange);
    select.setReadonly(this.readonly);
    return select;
}
Also used : Select(org.gsweb.components.ui.Select)

Example 2 with Select

use of org.gsweb.components.ui.Select in project bamboobsc by billchen198318.

the class SelectTag method doEndTag.

@Override
public int doEndTag() throws JspException {
    Select select = this.handler();
    try {
        this.pageContext.getOut().write(select.getHtml());
        this.pageContext.getOut().write(select.getScript());
    } catch (IOException e) {
        e.printStackTrace();
    } catch (Exception e) {
        e.printStackTrace();
    }
    select = null;
    return 0;
}
Also used : Select(org.gsweb.components.ui.Select) IOException(java.io.IOException) JspException(javax.servlet.jsp.JspException) IOException(java.io.IOException)

Aggregations

Select (org.gsweb.components.ui.Select)2 IOException (java.io.IOException)1 JspException (javax.servlet.jsp.JspException)1