Yes, I  know this doc. Not suitable for me (not shown case in
which html tags are nested -see my original post)



> -----Original Message-----
> From: jcgarciam [mailto:jcgarc...@gmail.com] 
> Sent: Sunday, December 12, 2010 10:10 PM
> To: users@wicket.apache.org
> Subject: Re: repeters with
> 
> 
> Taken from the Javadoc:
> http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/
> repeater/RepeatingView.html
> <http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup
> /repeater/RepeatingView.html>
> The usual use of a RepeatingView is:
> 
> Example:
> 
> *Java:*
> 
>  RepeatingView view = new RepeatingView("repeater");  
> view.add(new Label(view.newChildId(), "hello"));  
> view.add(new Label(view.newChildId(), "goodbye"));  
> view.add(new Label(view.newChildId(), "good morning"));  add(view);
> 
> 
> *Markup:*
> 
> 
>   <ul><li wicket:id="repeater"></li></ul>
> 
> 
> *Yields:*
> 
> 
>   <ul><li>hello</li><li>goodbye</li><li>good morning</li></ul>
> 
> 
> 
> On Sun, Dec 12, 2010 at 6:02 PM, Ladislav DANKO [via Apache Wicket] <
> ml-node+3084657-482134668-65...@n4.nabble.com<ml-node%2B308465
> 7-48213466
> ml-node+8-65...@n4.nabble.com>
> > wrote:
> 
> > Panel added
> > ...
> > view.add(new LinkAndImagePanel("linkandimagepanel"));
> > ...
> >
> > with apropriate panel markup and java code.
> >
> > Looks works when there is just one image but for two or more images 
> > there is error:
> > Caused by: java.lang.IllegalArgumentException: A child with id 
> > 'linkandimagepanel' already exists:
> >
> > How to add multiple panels in repeater? For Image there is param in 
> > constructor, but for Panel?
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Martin Grigorov [mailto:[hidden 
> > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=0>]
> >
> > > Sent: Sunday, December 12, 2010 11:10 AM
> > > To: [hidden 
> > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=1>
> > > Subject: Re: repeters with
> > >
> > > the repeater should add a Panel (or a Fragment) instead 
> of Image The 
> > > Panel itself will contain something like:
> > >
> > > ExternalLink link = new ExternalLink("id", href); add(link); 
> > > link.add(new Image("image", ...);
> > >
> > > On Sun, Dec 12, 2010 at 11:07 AM, Ladislav DANKO <[hidden email] 
> > > <http://user/SendEmail.jtp?type=node&node=3084657&i=2>>
> > wrote:
> > >
> > > > How is possible to make a nested html tag with 
> AttributeModifier?
> > > >
> > > > Laco
> > > >
> > > > > -----Original Message-----
> > > > > From: Per Newgro [mailto:[hidden 
> > > > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=3>]
> >
> > > > > Sent: Sunday, December 12, 2010 10:23 AM
> > > > > To: [hidden 
> > > > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=4>
> > > > > 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: [hidden 
> > > > > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=5>
> > > > > > For additional commands, e-mail: [hidden 
> > > > > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=6>
> > > > > >
> > > > > >
> > > > >
> > > 
> --------------------------------------------------------------------
> > > > > - To unsubscribe, e-mail: [hidden 
> > > > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=7>
> > > > > For additional commands, e-mail: [hidden 
> > > > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=8>
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > 
> --------------------------------------------------------------------
> > > -
> > > > To unsubscribe, e-mail: [hidden 
> > > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=9>
> > > > For additional commands, e-mail: [hidden 
> > > > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=10>
> > > >
> > > >
> > >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=11>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=3084657&i=12>
> >
> >
> >
> > ------------------------------
> >  View message @
> > 
> http://apache-wicket.1842946.n4.nabble.com/repeters-with-tp3084084p308
> > 4657.html
> >
> > To start a new topic under Apache Wicket, email
> > 
> ml-node+1842946-398011874-65...@n4.nabble.com<ml-node%2B1842946-398011
> > ml-node+874-65...@n4.nabble.com>
> > To unsubscribe from Apache Wicket, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlS
> ervlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJ
> jaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
> >
> >
> 
> 
> 
> --
> Sincerely,
> JC (http://www.linkedin.com/in/jcgarciam)
> --Anyone who has never made a mistake has never tried anything new.--
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/repeters-with-tp308
> 4084p3084669.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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

Reply via email to