-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660.
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State { private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick">";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "
";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id"/>
<listheader width="150px" label="Code"/>
<listheader width="150px" label="Name"/>
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}"/>
<listcell label="${each.code}"/>
<listcell label="${each.name}"/>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick">";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "
";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code"/>
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
2 | No.2 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660.
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State { private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick">";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "
";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id"/>
<listheader width="150px" label="Code"/>
<listheader width="150px" label="Name"/>
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}"/>
<listcell label="${each.code}"/>
<listcell label="${each.name}"/>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick">";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "
";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code"/>
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
3 | No.3 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660.
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State { private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick">";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "
";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id"/>
<listheader width="150px" label="Code"/>
<listheader width="150px" label="Name"/>
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}"/>
<listcell label="${each.code}"/>
<listcell label="${each.name}"/>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick">";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "
";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code"/>
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
4 | No.4 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660.
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
public State(String id, String code, String name) {
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick">";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "
";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id"/>
<listheader width="150px" label="Code"/>
<listheader width="150px" label="Name"/>
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}"/>
<listcell label="${each.code}"/>
<listcell label="${each.name}"/>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick">";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "
";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code"/>
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
5 | No.5 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660.
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
6 | No.6 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns.
The following code is extended code from JIRA ZK-2660.ZK-2660 (http%3A%2F%2Ftracker.zkoss.org%2Fbrowse%2FZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
7 | No.7 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns.
The following code is extended code from JIRA ZK-2660 (http%3A%2F%2Ftracker.zkoss.org%2Fbrowse%2FZK-2660).().
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
8 | No.8 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns.
The following code is extended code from JIRA ZK-2660 ().(http://tracker.zkoss.org/browse/ZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
9 | No.9 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660 (http://tracker.zkoss.org/browse/ZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
10 | No.10 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660 (http://tracker.zkoss.org/browse/ZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
11 | No.11 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660 (http://tracker.zkoss.org/browse/ZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
12 | No.12 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660 (http://tracker.zkoss.org/browse/ZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
13 | No.13 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns.
The following code is extended code from JIRA ZK-2660 (http://tracker.zkoss.org/browse/ZK-2660).(go to ZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
14 | No.14 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns.
The following code is extended code from JIRA ZK-2660 (go to ZK-2660).(http://tracker.zkoss.org/browse/ZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>
15 | No.15 Revision |
Hi,
Client side visibility state for columns synchronized well for Listbox, but don't for Grid's columns. The following code is extended code from JIRA ZK-2660 (http://tracker.zkoss.org/browse/ZK-2660).
Do anybody know how perform sync for Grid? Thnx!
Code:
<zk>
<zscript><![CDATA[
public class State {
private String id, code, name;
public State(String id, String code, String name) {
super();
this.id = id;
this.code = code;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
ListModelList statesListModel = new ListModelList();
for (int i = 0; i < 10; i++) {
statesListModel.add(new State("id" + i, "code " + i, "name " + i));
}
]]></zscript>
<window vflex="1">
<vlayout>
<label multiline="true">
1. Hide any column from the menupopup of listheader or columns
2. Click "Show Listheader visibility" or "Show Columns visibility", the visible state should sync with browser
</label>
<button label="Show Listheader visibility">
<attribute name="onClick"><![CDATA[
List headers = head.getChildren();
String message = "Listbox</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Listheader header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<listbox mold="paging" model="${statesListModel}" vflex="min">
<listhead id="head" menupopup="auto" columnshide="true">
<listheader width="40px" label="Id" />
<listheader width="150px" label="Code" />
<listheader width="150px" label="Name" /><listheader width="150px" label="url" />
</listhead>
<template name="model">
<listitem>
<listcell label="${each.id}" />
<listcell label="${each.code}" />
<listcell label="${each.name}" />
<listcell><a label="uuuuu"/></listcell>
</listitem>
</template>
</listbox>
<button label="Show Columns visibility">
<attribute name="onClick"><![CDATA[
List headers = headG.getChildren();
String message = "Grid</br>";
for (int i = 0, size = headers.size(); i < size; i++) {
Column header = headers.get(i);
message += "Column: " + header.getLabel() + ", Visible:" + header.isVisible() + "<br/>";
}
Clients.showNotification(message);
]]></attribute>
</button>
<grid model="${statesListModel}">
<columns id="headG" menupopup="auto" columnshide="true">
<column label="Id"/>
<column label="Code" />
<column label="Name"/>
</columns>
<template name="model">
<row>
<label value="${each.id}"/>
<label value="${each.code}"/>
<label value="${each.name}"/>
</row>
</template>
</grid>
</vlayout>
</window>
</zk>