errorGridModel
which is not used often. This model in only used to format error messages, when
a user tries to save a new record and there are missing or erroneus mandatory values. You can
select a new model by calling in application Java code:
setErrorGridModel(newClass)
where
newClass
is the class object of the new model.
In addition to the previous, every grid holder component can have a grid model of it's own: The model can
be set with grid holder's
setTableModel(Class model)
method.
You can create a custom grid by extending
xfij.webserver.model.BasicTableModel
class.
Followed is a Java source code for the grid model used in normal e FixIT grids (like the one above).
package xfij.webserver.model;
import xfij.core.Util;
public class HTMLTable extends BasicTableModel {
protected void paintCell() {
String ex = Util.replaceString(getText(),"\"",""");
ex = Util.replaceString(ex," "," ");
setText(ex);
if (getY() == 0 && getX() == 0)
addHeader("");
if (getX() == 0)
addHeader("");
addHeader("
if (getY() == 0)
addHeader("BGCOLOR=\"#cccccc\" ALIGN=\"left\"");
else if (isSelected())
addHeader("BGCOLOR=\"#ccccff\" ALIGN=\"left\"");
else
addHeader("BGCOLOR=\"#ffffff\" ALIGN=\"left\"");
if (!getCellWidth().equals(""))
addHeader(" WIDTH=\""+getCellWidth()+"\">");
else
addHeader(">");
addFooter(" | ");
if (getX() == getTableWidth() 1)
addFooter("
");
if (getY() == getTableHeight() 1 && getX() == getTableWidth() 1)
addFooter("
");
if (getText().equals(""))
setText(" ");
}
}
44
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved