Matej Knopp wrote:
> Second question, I assume you want to show inserted rows without
> refreshing the entire listview? Well, this is possible to certain
> degree, but requres some javacsript foo. You need to create the DOM
> element with appropriate id (in javascript) before adding the newly
> created ListItem to ajaxrequesttarget. TreeTable does it, however, not
> with ListView. It uses different kind of repeater.
>   
Now I think it's impossible to insert rows in a list created with
ListView via AJAX because children items id's are just their index in
the list. So when I insert something in the list, I have to change id's
of all lower items and do the same thing with scripts on the client
side. It's getting too complex and slow.

So I'm trying to create CustomListView by copying it from ListView and
extracting children item id generation strategy. But I have a problem -
when I create new list item during ajax request, add it to a
CustomListView instance and append to AjaxRequestTarget, I get the
following error:

ERROR - RequestCycle               - Unable to find the markup for the
component. That may be due to transparent containers or components
implementing IComponentResolver: [MarkupContainer [Component id = ad4,
page = listview.ListViewPage, path =
7:list-container:list:ad4.CustomListItem, isVisible = true, isVersioned
= false]]
wicket.WicketRuntimeException: Unable to find the markup for the
component. That may be due to transparent containers or components
implementing IComponentResolver: [MarkupContainer [Component id = ad4,
page = listview.ListViewPage, path =
7:list-container:list:ad4.CustomListItem, isVisible = true, isVersioned
= false]]
    at wicket.MarkupFragmentFinder.find(MarkupFragmentFinder.java:110)
    at wicket.Component.renderComponent(Component.java:1593)
    at
wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:691)
    at
wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:588)
    at wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:476)
    at
wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:102)


I looked through AbstractTree.updateTree code, but didn't find any
special magic to insert new rows.. Please help!

-- 
Andrew Klochkov


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to