本文整理汇总了Java中javax.faces.component.html.HtmlDataTable类的典型用法代码示例。如果您正苦于以下问题:Java HtmlDataTable类的具体用法?Java HtmlDataTable怎么用?Java HtmlDataTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HtmlDataTable类属于javax.faces.component.html包,在下文中一共展示了HtmlDataTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateTableFromColumnList
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
private void generateTableFromColumnList() {
HtmlDataTable dataTable = new HtmlDataTable();
fields.stream().map((_item) -> {
HtmlColumn myColumn = new HtmlColumn();
HtmlOutputText myColumnHeader = new HtmlOutputText();
myColumnHeader.setValue(_item.getName());
myColumn.setHeader(myColumnHeader);
return myColumn;
}).forEach((myColumn) -> {
dataTable.getChildren().add(myColumn);
});
dataTableGroup.getChildren().clear();
dataTableGroup.getChildren().add(dataTable);
}
示例2: testRITable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void testRITable() throws IOException
{
HtmlDataTable table = new HtmlDataTable();
ArrayList<Integer> l = new ArrayList<Integer>();
for (int i = 0 ; i < 10; i++)
l.add(new Integer(i));
table.setValue(l);
table.setStyleClass("TableContent");
table.setHeaderClass("af_column_header-text SomeBorderStyle");
table.setColumnClasses("af_column_cell-text OraTableBorder1111");
for (int i = 0 ; i < 3; i++)
{
UIColumn col = new UIColumn();
/*
HtmlOutputText header = new HtmlOutputText();
header.setValue("Header " + i);
col.setHeader(header);
//HtmlOutputText text = new HtmlOutputText();
HtmlInputText text = new HtmlInputText();
text.setValue("Column " + i);
col.getChildren().add(text);
*/
col.setHeader(new NullComp());
col.getChildren().add(new NullComp());
table.getChildren().add(col);
}
UIViewRoot root = createTestTree(table, "testRITable()", 500);
renderRoot(root);
}
示例3: getPermDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
/**
* Returns the permissions table
*/
public HtmlDataTable getPermDataTable() {
List roleNames = getRoleNames();
List permNames = getPermNames();
List permNamesPlus = new ArrayList();
permNamesPlus.add("Role");
permNamesPlus.addAll(permNames);
permTable = new HtmlDynamicColumnCheckboxTable();
permTable.setStyleClass("listHier lines");
permTable.setCellpadding("0");
permTable.setCellspacing("0");
permTable.setBorder(0);
permTable.setCheckboxBindingVar("podPerms.checkboxTableValues[1].checkboxValues");
permTable.setHeaderClass("navIntraTool");
permTable.prepareDCDataTable(permNamesPlus);
permTable.setDataTableContents(roleNames, permNamesPlus);
permTable.setValue("#{podPerms.checkboxTableValues}");
permTable.setVar("permItem");
setCheckboxTableValues();
return (HtmlDataTable) permTable;
}
示例4: setRosterDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public void setRosterDataTable(HtmlDataTable rosterDataTable) {
Set usedCategories = getUsedCategories();
if (rosterDataTable.findComponent(CAT_COLUMN_PREFIX + "0") == null) {
Application app = FacesContext.getCurrentInstance().getApplication();
// Add columns for each category. Be sure to create unique IDs
// for all child components.
int colpos = 0;
for (Iterator iter = usedCategories.iterator(); iter.hasNext(); colpos++) {
String category = (String)iter.next();
String categoryName = getCategoryName(category);
UIColumn col = new UIColumn();
col.setId(CAT_COLUMN_PREFIX + colpos);
HtmlCommandSortHeader sortHeader = new HtmlCommandSortHeader();
sortHeader.setId(CAT_COLUMN_PREFIX + "sorthdr_" + colpos);
sortHeader.setRendererType("org.apache.myfaces.SortHeader");
sortHeader.setArrow(true);
sortHeader.setColumnName(category);
//sortHeader.setActionListener(app.createMethodBinding("#{rosterBean.sort}", new Class[] {ActionEvent.class}));
HtmlOutputText headerText = new HtmlOutputText();
headerText.setId(CAT_COLUMN_PREFIX + "hdr_" + colpos);
headerText.setValue(categoryName);
sortHeader.getChildren().add(headerText);
col.setHeader(sortHeader);
HtmlOutputText contents = new HtmlOutputText();
contents.setId(CAT_COLUMN_PREFIX + "cell_" + colpos);
contents.setValueBinding("value",
app.createValueBinding("#{enrollment.categoryToSectionMap['" + category + "'].title}"));
col.getChildren().add(contents);
rosterDataTable.getChildren().add(col);
}
}
}
示例5: getDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public HtmlDataTable getDataTable() {
return dataTable;
}
示例6: setDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public void setDataTable(HtmlDataTable dataTable) {
this.dataTable = dataTable;
}
示例7: setDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public void setDataTable(HtmlDataTable dataTable) {
this.dataTable = dataTable;
}
示例8: getDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public HtmlDataTable getDataTable() {
return dataTable;
}
示例9: setPermDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
/**
* Sets the permissions table
*/
public void setPermDataTable(HtmlDataTable permDataTable) {
this.permTable = (HtmlDynamicColumnCheckboxTable) permDataTable;
}
示例10: getRosterDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public HtmlDataTable getRosterDataTable() {
return null;
}
示例11: getDataTable1
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public HtmlDataTable getDataTable1() { return dataTable1; }
示例12: setDataTable1
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public void setDataTable1(HtmlDataTable hdt) { dataTable1 = hdt; }
示例13: getDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public HtmlDataTable getDataTable() { return dataTable; }
示例14: setDataTable
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public void setDataTable(HtmlDataTable hdt) { dataTable = hdt; }
示例15: getDtabEngineLog
import javax.faces.component.html.HtmlDataTable; //导入依赖的package包/类
public HtmlDataTable getDtabEngineLog() { return dtabEngineLog; }