本文整理汇总了Java中org.zkoss.zul.Listitem.appendChild方法的典型用法代码示例。如果您正苦于以下问题:Java Listitem.appendChild方法的具体用法?Java Listitem.appendChild怎么用?Java Listitem.appendChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.zkoss.zul.Listitem
的用法示例。
在下文中一共展示了Listitem.appendChild方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
public final void render(final Listitem item, final Object data, final int index) {
final TramiteVersion reg = (TramiteVersion) data;
item.setValue(reg);
item.appendChild(new Listcell(String.valueOf(reg.getVersion())));
String usrBloqueo = "";
if ("S".equals(reg.getBloqueadoModificacion())) {
usrBloqueo = reg.getBloqueadoModificacionPor();
}
item.appendChild(GTTUtilsWeb.nuevaCeldaDetalle(GTTUtilsWeb
.nuevaEtiquetaDetalle(usrBloqueo),"white-space: nowrap;"));
item.setAttribute("data", data);
ComponentsCtrl.applyForward(item,
"onDoubleClick=onDoubleClick$itemVersion");
}
示例2: addFields
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
/**
* @param resolver
* @param fieldType
*/
private void addFields(FormFieldResolver resolver, String fieldType, String formName) {
for(IField<?> field : resolver.getFields().values()) {
if (field.getClass().getName().equals(fieldType) && !field.isDisplayOnly()) {
Listitem item = new Listitem();
Listcell id = new Listcell();
Listcell form = new Listcell();
id.setLabel(field.getId() + " (" + field.getLabel() + ")");
form.setLabel(formName);
item.appendChild(id);
item.appendChild(form);
item.setValue(new FieldInfo(formName, field.getId()));
lstFields.getItems().add(item);
}
}
}
示例3: loadData
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
private void loadData() throws ParseException, DatabaseOperationException {
lstData.getItems().clear();
AbstractVariableSet<Value<?>> variables =
DatabaseConditionBuilder.buildVariablesFromFields(composer.getFields());
List<Entry> entries = db.query(selectFields, qualification, 0, variables);
for (Entry entry : entries) {
Listitem item = new Listitem();
for (Value<?> v : entry.getValues()) {
if (v.getValue() != null)
item.appendChild(new Listcell(v.getValue().toString()));
else
item.appendChild(new Listcell(""));
}
item.setValue(entry);
lstData.getItems().add(item);
}
}
示例4: fillFields
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
private void fillFields(int fType) throws ClassNotFoundException, SQLException {
DBModel model = new DBModel(form.getDBConnection().getConnectionString(),
form.getDBConnection().getClassName());
lstFields.getItems().clear();
for( DBField field : model.getFields(form.getCatalog(), form.getTableName())) {
if (fType == convertType(field.getDBType())) {
Listitem item = new Listitem();
Listcell name = new Listcell();
Listcell type = new Listcell();
name.setLabel(field.getName());
type.setLabel(field.getDBTypeName());
item.setValue(field);
item.appendChild(name);
item.appendChild(type);
lstFields.getItems().add(item);
}
}
}
示例5: render
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
@Override
/**
* Evento que alimenta la lsista
*/
public void render(Listitem lista, Object arg1, int arg2) throws Exception {
Semestre dto = (Semestre)arg1;
nroRegistros++;
Listcell lc0 = new Listcell(String.valueOf(nroRegistros));
Listcell lc1 = new Listcell(dto.getDependenciaAcademica().getNombre());
Listcell lc2 = new Listcell(String.valueOf(dto.getAgno()));
Listcell lc3 = new Listcell(String.valueOf(dto.getPeriodo()));
Listcell lc4 = new Listcell(dto.getEstadoSemestre().getDescripcion());
//Se llena la lista con las celdas anteriores
lista.appendChild(lc0);
lista.appendChild(lc1);
lista.appendChild(lc2);
lista.appendChild(lc3);
lista.appendChild(lc4);
}
示例6: render
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
public final void render(final Listitem item, final Object data, final int index) {
final Tramite reg = (Tramite) data;
item.setValue(reg);
item.appendChild(GTTUtilsWeb.nuevaCeldaDetalle(GTTUtilsWeb.nuevaEtiquetaDetalle(reg.getIdentificador()), "white-space: nowrap;"));
item.appendChild(GTTUtilsWeb.nuevaCeldaDetalle(GTTUtilsWeb.nuevaEtiquetaDetalle(((TraTramite) reg.getTraduccion(idioma)).getDescripcion()), "white-space: nowrap;"));
item.setAttribute("data", data);
ComponentsCtrl.applyForward(item,
"onDoubleClick=onDoubleClick$itemTramite");
}
示例7: render
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
public final void render(final Listitem item, final Object data, final int index) {
final ModeloVisualizarPlugin entidad = (ModeloVisualizarPlugin) data;
item.setValue(entidad);
item.setAttribute("expandir", false);
// Icono + nombre
final Listcell listCellNombre = new Listcell(
entidad.getDescripcion());
listCellNombre.setId(entidad.getDescripcion());
final Image iconoPlugin = new Image();
iconoPlugin.setSrc("images/light_16x16.gif");
if (entidad.getNombrePadre() != null) {
listCellNombre.setStyle("padding-left:20px;font-size:11px;");
iconoPlugin.setSrc("images/about1_16x16.gif");
}
item.appendChild(listCellNombre);
ComponentsCtrl.applyForward(listCellNombre,
"onDoubleClick=onDoubleClick$plugin");
// Icono ayuda
final Listcell listCellImage = new Listcell();
listCellImage.setPopup("AyudaPopUp");
listCellImage.appendChild(iconoPlugin);
item.appendChild(listCellImage);
ComponentsCtrl.applyForward(listCellImage, "onClick=onClick$plugin");
}
示例8: render
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
public final void render(final Listitem item, final Object data, final int index) {
final OrganoResponsable org = (OrganoResponsable) data;
item.setValue(org);
// Descripcion
item.appendChild(new Listcell(org.getDescripcion()));
// Doble click
item.setAttribute("data", data);
ComponentsCtrl.applyForward(item,
"onDoubleClick=onDoubleClick$itemOrganismo");
}
示例9: refreshUserList
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
private void refreshUserList() throws SQLException {
lstUsers.getItems().clear();
for(User usr : ConfigLoader.getInstance().getUsers().queryForAll()) {
Listitem item = new Listitem();
Listcell cell = new Listcell();
item.setValue(usr);
cell.appendChild(new Label(usr.getLogin()));
item.appendChild(cell);
lstUsers.getItems().add(item);
}
}
示例10: refreshRoleList
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
private void refreshRoleList() throws SQLException {
lstRoles.getItems().clear();
for(Role r : ConfigLoader.getInstance().getRoles().queryForAll()) {
Listitem item = new Listitem();
Listcell cell = new Listcell();
item.setValue(r);
cell.appendChild(new Label(r.getName()));
item.appendChild(cell);
lstRoles.getItems().add(item);
}
}
示例11: loadResources
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
private void loadResources() throws SQLException {
String query = txtQuery.getText();
String filter = "contains";
if (lstFilterType.getSelectedItem() != null) {
filter = lstFilterType.getSelectedItem().getValue();
}
List<StaticResource> resources = null;
// query all
if (StringUtils.isBlank(query)) {
resources = ConfigLoader.getInstance().getStaticResources().queryForAll();
} else if (StringUtils.isNoneBlank(query) && filter.equals("contains")) {
QueryBuilder<StaticResource, String> qb =
ConfigLoader.getInstance().getStaticResources().queryBuilder();
Where<StaticResource, String> w = qb.where();
w.like(Form.NAME_FIELD_NAME, "%"+query+"%");
resources = ConfigLoader.getInstance().getStaticResources().query(qb.prepare());
} else if (StringUtils.isNoneBlank(query) && filter.equals("equals")) {
resources = ConfigLoader.getInstance().getStaticResources().queryForEq(
StaticResource.NAME_FIELD, query);
}
clearSelectedItem();
lstResult.getItems().clear();
if (resources != null) {
for(StaticResource r : resources) {
Listitem item = new Listitem();
item.appendChild(new Listcell(r.getName()));
item.appendChild(new Listcell(r.getContentType()));
item.setValue(r);
lstResult.getItems().add(item);
}
}
}
示例12: fillFieldList
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
private void fillFieldList(Listbox list, Collection<IField<?>> fields) {
list.getItems().clear();
for(IField<?> f: fields) {
Listitem item = new Listitem();
Listcell id = new Listcell();
Listcell title = new Listcell();
id.setLabel(f.getId());
title.setLabel(f.getLabel());
item.appendChild(id);
item.appendChild(title);
item.setValue(f);
list.getItems().add(item);
}
}
示例13: initFormList
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
private void initFormList(Listbox list) throws SQLException {
list.getItems().clear();
QueryBuilder<Form, String> qb = ConfigLoader.getInstance().getForms().queryBuilder();
Where<Form, String> w = qb.where();
w.eq(Form.CONNECTION_FIELD_NAME, dbConnection.getName());
List<Form> forms = ConfigLoader.getInstance().getForms().query(qb.prepare());
for(Form f : forms) {
Listitem item = new Listitem();
Listcell name = new Listcell();
name.setLabel(f.getName());
item.appendChild(name);
item.setValue(f);
list.getItems().add(item);
}
}
示例14: initConnectionList
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
private void initConnectionList() throws SQLException {
lstConnection.getItems().clear();
for(DBConnection c : ConfigLoader.getInstance().getDBConnections().queryForAll()) {
Listitem item = new Listitem();
Listcell cell = new Listcell();
cell.setLabel(c.getName());
item.appendChild(cell);
item.setValue(c);
lstConnection.getItems().add(item);
}
}
示例15: btnAdd_Click
import org.zkoss.zul.Listitem; //导入方法依赖的package包/类
@Listen("onClick = #btnAdd")
public void btnAdd_Click() {
CharacterMenuItem menuItem = new CharacterMenuItem();
menuItem.setLabel(txtLabel.getText());
menuItem.setValue(txtValue.getText());
menuItem.setMenu(menu);
Listitem item = new Listitem();
item.setValue(menuItem);
item.appendChild(new Listcell(menuItem.getLabel()));
item.appendChild(new Listcell(menuItem.getValue()));
lstItems.getItems().add(item);
}