Search in sources :

Example 16 with HtmlWriter

use of cn.cerc.jpage.core.HtmlWriter in project summer-mis by cn-cerc.

the class CodeNameField method getText.

@Override
public String getText(Record dataSet) {
    if (dataSet == null)
        return null;
    if (buildText != null) {
        HtmlWriter html = new HtmlWriter();
        buildText.outputText(dataSet, html);
        return html.toString();
    }
    return dataSet.getString(getField());
}
Also used : HtmlWriter(cn.cerc.jpage.core.HtmlWriter)

Example 17 with HtmlWriter

use of cn.cerc.jpage.core.HtmlWriter in project summer-mis by cn-cerc.

the class DateField method getText.

@Override
public String getText(Record dataSet) {
    if (dataSet == null)
        return null;
    if (buildText != null) {
        HtmlWriter html = new HtmlWriter();
        buildText.outputText(dataSet, html);
        return html.toString();
    }
    if (dataSet.hasValue(getField()))
        return dataSet.getDate(getField()).getDate();
    else
        return "";
}
Also used : HtmlWriter(cn.cerc.jpage.core.HtmlWriter)

Example 18 with HtmlWriter

use of cn.cerc.jpage.core.HtmlWriter in project summer-mis by cn-cerc.

the class ExpendField method getText.

@Override
public String getText(Record dataSet) {
    if (dataSet == null)
        return null;
    if (this.search)
        return this.getName();
    if (buildText != null) {
        HtmlWriter html = new HtmlWriter();
        buildText.outputText(dataSet, html);
        return html.toString();
    }
    return String.format("<a href=\"javascript:displaySwitch('%d')\">展开</a>", dataSource.getDataSet().getRecNo());
}
Also used : HtmlWriter(cn.cerc.jpage.core.HtmlWriter)

Aggregations

HtmlWriter (cn.cerc.jpage.core.HtmlWriter)18 Record (cn.cerc.jdb.core.Record)2 UrlRecord (cn.cerc.jpage.core.UrlRecord)2 AbstractGridLine (cn.cerc.jpage.grid.lines.AbstractGridLine)2 DecimalFormat (java.text.DecimalFormat)2 HtmlContent (cn.cerc.jpage.core.HtmlContent)1 IColumn (cn.cerc.jpage.core.IColumn)1 IField (cn.cerc.jpage.core.IField)1 AbstractField (cn.cerc.jpage.fields.AbstractField)1 DataGrid (cn.cerc.jpage.grid.DataGrid)1 MasterGridLine (cn.cerc.jpage.grid.lines.MasterGridLine)1