use the domain class as the source if you are using @Insert to get the value then tapestry will convert the int to a string

On 28 Jun 2005, at 14:51, Jan Vissers wrote:

Hi I'm using Tapestry 3.0.3


Question remains ...

Example: ListEdit on instances of

public class DomainOne {
 private String name;
 private int count;

 ...
}

___How can I use this DomainOne object as source of the ListEdit?___


My first solution used a variant of this class for UI purposes, like:

public class DomainOneUI {
 private String name;
 private String _count;

 public DomainOneUI(DomainOne i) {
   this.name = i.getName();
   this._count = String.valueOf(i.getCount());
 }

 public DomainOne getInstance() {
   DomainOne instance = new DomainOne();
   instance.setName(name);
   instance.setAge(Integer.parseInt(_count));
   return istance;
 }
}


Want to know whether this is a better, less intrusive way. Conversion/translation or something?

--
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)10 - 6940499
http://www.cumquat.nl

[EMAIL PROTECTED]
M +31 6 5 11 169 556

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to