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); >> } >> } > -- View this message in context: http://www.nabble.com/Best-way-to-create-large-groups-of-similar-tags-tf3804614.html#a10835999 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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