Agreed, that would be overkill. I do think we need a broader idea for
conversions instead of just the type conversions we have now, and
we'll build it as one of the first things after 1.2.

Eelco


On 5/6/06, Alexei Sokolov <[EMAIL PROTECTED]> wrote:
Igor,

POJOs are mapped to DB tables. Why would you have UsPhoneNumber or ZipCode
objects in your POJOs? Yes, you can map them as components, but I don't have
a reason to do it. In 99.9% of all cases you will have String properties.
Address class is useful sometimes, but UsPhoneNumber & ZipCode classes? I
don't think so. Please correct me if I'm wrong.


Alex

On 5/5/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> any reason why the pojo works with strings instead of objects?
>
>
> -Igor
>
>
>
> On 5/5/06, Alexei Sokolov < [EMAIL PROTECTED]> wrote:
> >
> > POJO
> >
> > public class Partner implements java.io.Serializable {
> > ...
> > private String name;
> > private String zipCode;
> > ...
> > ...
> > public String getZipCode() {
> >    return zipCode;
> > }
> >
> > public void setZipCode(String value) {
> >    zipCode = value;
> > }
> >
> > public class PartnerMixin {
> > private Partner delegate;
> >
> > public PartnerMixin(Partner delegate);
> > public ZipCode getZipCodeObj() {
> >    return new ZipCode(delegate.getZipCode());
> > }
> > public void setZipCodeObj(ZipCode value) {
> >   delegate.setZipCode(value.getStringValue());
> > }
> > }
> >
> > PartnerMixin does not have to be serializable, Partner does.
> >
> > Alex
> >
> >
> >
> > On 5/5/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > >
> > > what does partner class look like before the mixin?
> > >
> > >
> > > -Igor
> > >
> > >
> > >
> > > On 5/5/06, Alexei Sokolov <[EMAIL PROTECTED] > wrote:
> > > >
> > > > Good to know, thank you. As a work-around for now I'm using mixins
generated by cglib:
> > > >
> > > > Form form = new Form("edit.form", new
CompoundPropertyModel(MixinFactory.wrap(partner, new
PartnerMixin(partner))));
> > > >
> > > > method signature for MixinFactory.wrap: public static Object
wrap(Object parent, Object... mixins);
> > > > ...
> > > >
> > > > Partner partner =
(Partner)MixinFactory.upwrap(getForm().getModelObject());
> > > >
> > > > And then in PartnerMixin I have methods like getZipCode/setZipCode,
getPhoneNumber/setPhoneNumber, etc. Works for me until you guys come up with
improved converters.
> > > >
> > > > If anyone interested, I can submit source code for MixinFactory.
> > > >
> > > > Alex
> > > >
> > > >
> > > >
> > > > On 5/5/06, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> > > > > > And I would not worry about converters too much... I mean, it is
definitely
> > > > > > should be addressed in the next release or so, but I don't think
it is a
> > > > > > barrier to wider wicket adoption.
> > > > >
> > > > > They will be:
https://sourceforge.net/tracker/index.php?func=detail&aid=1453022&group_id=119783&atid=684975
> > > > >
> > > > > :)
> > > > >
> > > > > Eelco
> > > > >
> > > > >
> > > > >
-------------------------------------------------------
> > > > > Using Tomcat but need to do more? Need to support web services,
security?
> > > > > Get stuff done quickly with pre-integrated technology to make your
job easier
> > > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
> > > > >
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
> > > > > _______________________________________________
> > > > > Wicket-develop mailing list
> > > > > Wicket-develop@lists.sourceforge.net
> > > > >
https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to