How is possible to make a nested html tag with AttributeModifier? Laco
> -----Original Message----- > From: Per Newgro [mailto:per.new...@gmx.ch] > Sent: Sunday, December 12, 2010 10:23 AM > To: users@wicket.apache.org > Subject: Re: repeters with > > You could add Links (instead of the image) and use an > AttributeModifier for the href. > > CHeers > Per > > Am 12.12.2010 09:19, schrieb Ladislav DANKO: > > Hi, > > > > from files in dir I do a list of photos. I do it this way: > > public class InsertPhotos extends WebPage { > > public InsertPhotos() throws IOException > > { > > > > Folder folder = > > ((Start)Application.get()).getPhotosFolder(); > > File[] files = folder.getFiles(); > > List<File> lList = Arrays.asList(files); > > Collections.sort(lList); > > > > RepeatingView view = new RepeatingView("repeater"); > > while(iterator.hasNext()) > > { > > iterator.next(); > > String fileName = lList.get(i).getName(); > > String path = "../../photos/" + fileName; > > i++; > > view.add(new Image(view.newChildId(), path)); > > } > > this.add(view); > > } > > } > > > > and markup: > > <img wicket:id="repeater" style="width: 90px; padding: 2px;" /> > > > > so resulting markup is: > > <img src="resources/../../photos/01.jpg" style="padding: 2px; width: > > 90px;"/> > > <img src="resources/../../photos/02.jpg" style="padding: 2px; width: > > 90px;"/> > > ... > > > > This works but now I need to make a clickable list of photos, so > > resulting markup should be: > > <a title="" rel="lightbox[svatebni]" > href="resources/../../photos/1.jpg"> > > <img style="width: 90px; padding: 2px;" > > src="resources/../../photos/01.jpg" /> </a> <a title="" > > rel="lightbox[svatebni]" href="resources/../../photos/1.jpg"> > > <img style="width: 90px; padding: 2px;" > > src="resources/../../photos/02.jpg" /> </a> ... > > > > I don't know how to add anchor around img tag, can someone help me > > please? I was searching through doc and list but found nothing. > > > > Thanks, Laco > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org