Well, I guess I could use a Fragment (if it would work inside a Border) inside a RepeatingView, but then I would need to have all feature texts in the Java code, which is not nice but would work.
Tom Herman Bovens wrote: > Hm, can't you iterate over your collection of features and add the > corresponding component in each iteration? Something like that? > > > Thomas Singer-3 wrote: >> Thanks, Alexey and Kent, for your feed-back. Unfortunately, I still have >> do >> add a lot of components to the Page instance, for each line one. >> >> Tom >> >> >> Kent Tong wrote: >>> Put that code into a panel, eg, FeatureAvailability.html: >>> >>> <wicket:panel> >>> <td align="center"> >>> <img wicket:id="img" src="/graphics/feature-present.gif" >>> border="0" >>> alt="+" width="9" height="9"> >>> </td> >>> </wicket:panel> >>> >>> FeatureAvailability.java: >>> >>> public class FeatureAvailability extends Panel { >>> public FeatureAvailability(String id, IModel model) { >>> super(id, model); >>> boolean isPresent = ((Boolean) getModelObject()).booleanValue(); >>> WebMarkupContainer img = new WebMarkupContainer("img"); >>> img.add(new SimpleAttributeModifier("src", >>> String.format("/graphics/feature-%s.gif", >>> new Object[] { >>> isPresent ? "present" : "absent" }))); >>> img.add(new SimpleAttributeModifier("alt", >>> isPresent ? "+" : "-")); >>> add(img); >>> } >>> } > ------------------------------------------------------------------------- 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