cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: xmlforms + multiple beans ?
Date Fri, 28 Feb 2003 08:41:22 GMT
Jeroen Cranendonk wrote:
<snip/>
> Does anyone have any ideas of how to get round this, or how we could apporach 
> this differently ? (besides using the adress(for example) bean as a subclass 
> for the other bean, this would break if we want to use more then one generic 
> bean)

Why don't you use composition instead of inheritance?

public class MyBean {
   private Address address;
   public Address getAddress() { return address; }
   public void setAddress(Address address) { this.address = address; }
   ...
}

<xf:textbox ref="/address/street" ...>
<xf:textbox ref="/address/zipcode" ...>

	Ugo


-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message