On 12/14/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

fwiw a common pattern i use is to do the conversion in an model decorator

something like

class StringToPhoneModel implements IModel {
private final IModel stringModel;
public StringToPhoneModel(IModel stringModel) {
this.stringModel=stringModel; }
public Object getObject(Component c) { return new PhoneNumber(
stringModel.getObject(c); }
public void setObject(Component c, Object o) { stringModel.setObject(c,
((PhoneNumber)o).toString()); }
public void detach() { stringModel.detach(); }
}

-igor


That's what I was trying to do! Many thanks!

Cheers,
-js
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to