As Per you're HTML you're component path is repeatingDocTypes:docTypeName ie:
>      <div wicket:id="repeatingDocTypes" >
>          <span wicket:id="docTypeName">Orders</span><br/>

Where repeatingDocTypes is a repeating view and its children are numbered 
(1,2,3,4..). Yet you added docTypeName and repeatingDocRef.

Now, to make it work try to use inline panels or separate panels for the 
RepeatingView content and/or call the newChildId() methos.

See the API
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/markup/repeater/RepeatingView.html

Have a great day,
    Paul Bors

On Jul 3, 2013, at 7:05 AM, Lucio Crusca <lu...@sulweb.org> wrote:

> Hi *,
> 
> I have the following markup snippet:
> 
>        <div wicket:id="repeatingDocTypes" >
>          <span wicket:id="docTypeName">Orders</span><br/>
>          <hr/>
>          <div wicket:id="repeatingDocRef">
>            <a href="#" wicket:id="doclink"><span 
> wicket:id="docid"></span></a><br/>
>          </div>
>        </div>
> 
> which is bound to this code snippet:
> 
> [...]
>   RepeatingView rv = new RepeatingView("repeatingDocTypes");
>   for (...)
>     addDocTypeBox(rv, docs);
> 
> 
>  private void addDocTypeBox(RepeatingView rv, List<Document> docs)
>  {
>    AbstractItem i = new AbstractItem(rv.newChildId());
>    i.add(new Label("docTypeName", getDocTypeDescription());
>    RepeatingView rdr = new RepeatingView("repeatingDocRef");
>    i.add(rdr);
> 
>    for (Document d: docs)
>    {
>      AbstractItem docsummary = new AbstractItem(rdr.newChildId());
>      Link l = new Link("doclink")
>      {
>         ...
>      };
>      docsummary.add(l);
>      l.add(createSummaryPanel("docid", d));
>      rdr.add(docsummary);
>    }
> 
>    rv.add(i);
>  }
> 
> Please note that the two for loops execute just 1 iteration each with my 
> current test data.
> 
> I get the following exception:
> 
> Last cause: Unable to find component with id 'docTypeName' in [AbstractItem 
> [Component id = 1]]
>    Expected: 'footerPanel:repeatingDocTypes:1.docTypeName'.
>    Found with similar names: 'footerPanel:repeatingDocTypes:2:docTypeName'
> 
> which does shed some light on what's going on, but I find it hard to 
> understand 
> what do "1.docTypeName" and "2:docTypeName" mean. Where did those "1" and "2" 
> come from? What information do they give me in order to spot the bug? Why is 
> "1" followed by a dot while "2" is followed by a column?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

Reply via email to