You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by angeloimm <an...@libero.it> on 2004/11/25 16:47:04 UTC
Repeater Form and collection
Hi all; i have this problem....... i can recover a Collection of objects from db; this collection is made by objects of this kind:
import java.io.Serializable;
import it.eng.nikko.config.dao.exception.ConfigVOException;
public class ConfigVO implements Serializable {
private String id;
private String ipAddress;
private String portNumber;
private String webAppRoot;
public ConfigVO(String newId, String newIpAddress, String newPortNumber,
String newWebAppRoot) throws ConfigVOException {
if ((!(checkString(newId))) || (!(checkString(newIpAddress))) ||
(!(checkString(newPortNumber))) || (!(checkString(newWebAppRoot)))) {
throw new ConfigVOException("Exception in configuration parameter");
}
setId(newId);
setIpAddress(newIpAddress);
setPortNumber(newPortNumber);
setWebAppRoot(newWebAppRoot);
}
public void setId(String value) {
this.id = value;
}
public String getId() {
return id;
}
public void setIpAddress(String value) {
this.ipAddress = value;
}
public String getIpAddress() {
return ipAddress;
}
public void setPortNumber(String value) {
this.portNumber = value;
}
public String getPortNumber() {
return portNumber;
}
public void setWebAppRoot(String value) {
this.webAppRoot = value;
}
public String getWebAppRoot() {
return webAppRoot;
}
private boolean checkString(String value) {
return (value == null ? false : ((value.trim().equals("")) ? false : true));
}
public boolean equals(Object object) {
if (this.getClass().equals(object.getClass())) {
ConfigVO con = ((ConfigVO) (object));
if ((checkString(con.getId(), this.getId())) &&
(checkString(con.getIpAddress(), this.getIpAddress())) &&
(checkString(con.getPortNumber(), this.getPortNumber())) &&
(checkString(con.getWebAppRoot(), this.getWebAppRoot()))) {
return true;
}
return false;
}
return false;
}
public String toString() {
return "ConfigVO: " + this.id + " " + this.ipAddress + " " +
this.portNumber + " " + this.webAppRoot;
}
private boolean checkString(String aString, String anotherString) {
return aString.equals(anotherString);
}
}
I must show a form formed by a table that has as row as Collection dimension; in order to do this i think i must use <fd:repeater.... but i don't how to do it... can you help me?
I'll try to be clearer.... i have a Collection of ConfigVO object... i want to create a form where there is a table in which every raw is a ConfigVO object rapresentation... how can i do this?
____________________________________________________________
Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione.
Abbonati subito su http://www.libero.it
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org