Can you show the Java code also?  It should be something like this:

            ListView cats = new ListView("CategoryList", catList) {

                @Override
                protected void populateItem(ListItem item) {
                    Category cat = item.getModelObject();
                    ListView items = new ListView("itemList",
cat.getItems()) {

                        @Override
                        protected void populateItem(ListItem innerItem) {
                            innerItem.add(new BookmarkablePageLink("link",
Foo.class));
                        }
                    };
                    item.add(items);
                }
            };

Basically, just make sure that you are nesting your list views properly (in
this example, that the item list view is added to the ListItem passed in to
the populateItem method of the category list view).

Hope this helps.

-- 
Jeremy Thomerson
http://www.wickettraining.com


On Wed, Aug 20, 2008 at 7:57 PM, Sami <[EMAIL PROTECTED]> wrote:

> Hello all :)
> I have ordered Wicket i Action but it a preorder at Amazon.co.uk :(
>
> mean while I'm learning new stuff every day.
>
> So now I want to do is a nested <TD> and <TR>
> but i keep getting the: WicketMessage: Unable to find component with id
> 'itemList' in [MarkupContainer
>
>
> while i understand the problem but i dont know the right way to solve what
> i need
> so what happens is that I get a list of items and its category and then
> display them on a table using ListView component
> so its like this :
> ============================
> <table>
>   <span wicket:id="CategoryList">
>          <tr>
>           <td colspan="5"><a href="#" wicket:id="categoryHref"><span
> wicket:id="categoryName">[Category]</span></a></td>
>         </tr>
>
>       <span wicket:id="itemList">
>          <tr>
>           <td>&nbsp;</td>
>           <td><a href="#" wicket:id="href"><span wicket:id="itemName">[Item
> Name]</span></a></td>
>           <td nowrap><span wicket:id="itemPricePostInfo">[item
> Price]</span></td>                   </tr>
>
>        </span> <!-- end of itemList span -->
>    </span> <!-- end of CategoryList span -->
> </table>
> ==============================
>
> so the Data should view like this
> Category-1
>     +-------------- Item 1
>     +---------------Item 2
>     +---------------Item 3
>      n + 1
>
> Category-2
>     +--------------Item 32
>     +--------------item 35
>
>
> Does Tree component solve this problem, and how? as you can see it needs to
> be in an HTML table
> is there any examples i can learn from? or any help to how to do this?
> many thanks
>
> Sami
> p.s. sorry for my bad English :P
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to