use of cn.cerc.jpage.other.BuildUrl in project summer-mis by cn-cerc.
the class AbstractGridLine method outputField.
protected void outputField(HtmlWriter html, AbstractField field) {
Record record = dataSource.getDataSet().getCurrent();
BuildUrl build = field.getBuildUrl();
if (build != null) {
UrlRecord url = new UrlRecord();
build.buildUrl(record, url);
if (!"".equals(url.getUrl())) {
html.print("<a href=\"%s\"", url.getUrl());
if (url.getTitle() != null) {
html.print(" title=\"%s\"", url.getTitle());
}
if (url.getTarget() != null) {
html.print(" target=\"%s\"", url.getTarget());
}
if (url.getHintMsg() != null) {
html.print(" onClick=\"return confirm('%s');\"", url.getHintMsg());
}
html.print(">%s</a>", field.getText(record));
} else {
html.print(field.getText(record));
}
} else {
html.print(field.getText(record));
}
}