You'd have to write a panel that iterates over the properties of an object using introspection. It's not difficult to write, but there is no standard component for this as of yet. Such a panel would contain a list view with a model that extracts the properties of an object and returns them as a list. The list view for each item in the list (populateItem) gets the property value and decides the best way to print it (the simple way is to just use a label and toString).
Eelco On 5/28/07, Kees de Kooter <[EMAIL PROTECTED]> wrote: > I have read about this. Unfortunately all the examples I found are > with forms. I just want to display pojo values on a read only page. > > In the examples every property is still coded in the page class (e.g. > in the page you refer to personForm.add(personModel.bind(new > RequiredTextField("city"), "address.city"));) . > > I am looking for a way to put the properties in the wicket markup and > bind the pojo to the page, without coding every field explicitly. > > > > On 5/28/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote: > > what you want is an CompoundPropertyModel: > > http://cwiki.apache.org/WICKET/working-with-wicket-models.html > > > > > > > -----Ursprüngliche Nachricht----- > > > Von: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] Im Auftrag > > > von Kees de Kooter > > > Gesendet: Montag, 28. Mai 2007 13:15 > > > An: wicket-user@lists.sourceforge.net > > > Betreff: [Wicket-user] Binding pojo to (read only) page > > > > > > I come from a Spring MVC background. Spring MVC provides the > > > <spring:bind> tag which basically allows to throw a pojo at > > > the page and bind its properties. > > > > > > Is something similar possible with Wicket, without having to > > > explicitly "bind" every property in the page class? > > > > > > > > > -- > > > Cheers, > > > Kees de Kooter > > > http://www.boplicity.net > > > > > > -------------------------------------------------------------- > > > ----------- > > > This SF.net email is sponsored by DB2 Express Download DB2 > > > Express C - the FREE version of DB2 express and take control > > > of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > -- > Cheers, > Kees de Kooter > http://www.boplicity.net > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user