Just want to let you know, that it of course :-) did the trick,.


Thank you.

/Flemming

On 2/28/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

why use a type converter? you are not converting types...

i would use a model to do this

class addrlinemodel implements imodel<string> {
 private imodel addrmodel;


  public String getobject() {
      address addr=addrmodel.getobject();
      return addr.streetnumber+" "+addr.streetname....;
  }
  public void setobject(String object) {
     address addr=addrmodel.getobject();
    string[] parts=object.split();
    //decide what goes where
    addr.streetname=parts[2];
    ...
    }
}

-igor


On 2/28/07, Flemming Boller <[EMAIL PROTECTED]> wrote:

> Hi
>
> I have a challenge about creating a reuseable Panel for my pojo called
> Address.
>
> class Address {
>
> String streetName;
> String streetNumber;
> String floor;
> String letter;
> String door;
> String zipCode;
> String city;
> }
>
>
> What I would like is to concatenate streetName, streetNumber, floor,
> letter, door into ONE textfield (wicket:id="address")
> ZipCode and city have their own TextFields and PropertyModel is used
> here.
>
>
> For concatening the fields above I have used a ITypeConverter, which
> converts the one textfield into an new Address object.
> My problem is that the zipCode and city is bound to the old object, so
> the new Address object is missing the zipCode and city.
>
>
> Do any of you guys know a solution to this problem? Should I use a
> ITypeConverter at all? Or should I take a whole other approch.
>
>
> Regards
> Flemming
>
>
>
> -------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to