However, if you take a closer look at the markup, and the markup that
gets generated, you can clearly see the problem for a listview:

In the server side markup:
<ul>
<li wicket:id="listitem"><span wicket:id="label">some value</span></li>
</ul>

In the client side markup:
<ul>
<li><span>foo</span></li>
<li><span>bar</span></li>
<li><span>foobar</span></li>
</ul>

What you typically want to do is to redraw the complete <ul></ul>
part, because most browsers really don't appreciate when you replace
parts of a tag, especially when you are working with a <table>.

As you can see in this example, the <ul> tag is not a component, and
Wicket is not aware of it. Even if you were to do:
listview.setOutputMarkupId(true), this wouldn't work, as the listview
*itself* doesn't have a tag associated with it.

That is why you need to provide the webmarkupcontainer yourself as a
wrapper for the listview.

Martijn

On 8/21/06, Roman Mandeleil <[EMAIL PROTECTED]> wrote:
>
> Ok, thanks, now it works fine, but do you have some good explanation to that
> behaviour
> it is not intuitive to put a ListView  into some WebMarkupContainer just for
> Ajax update, because
> ListView itself is a WebMarkupContainer
>
>
>
> Scott Swank wrote:
> >
> > I can vouch for it's common-ness.
> >
> > On 8/20/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> >> you cannot repaint listview directly via ajax - this is a common mistake.
> >> try putting it into a webmarkup container and repainting that container
> >> instead.
> >>
> >> -Igor
> >>
> >>
> >>
> >> On 8/20/06, Roman Mandeleil <[EMAIL PROTECTED]> wrote:
> >> >
> >> > Check some problem in the attached file (some notes in the source)
> >> >
> >> > http://www.nabble.com/user-files/235691/ListPage.java
> >> ListPage.java
> >> >
> >> >
> >> >
> >> >
> >> > igor.vaynberg wrote:
> >> > >
> >> > > yes, it shouldnt be happening thats why i wanted to see your
> >> code/markup.
> >> > >
> >> > > have you tried in ffox and ie? sometimes when ajax updating trs you
> >> end
> >> up
> >> > > with duplicates - so it may just be a case of crappy outerhtml
> >> support
> >> in
> >> > > the browser.
> >> > >
> >> > > -Igor
> >> > >
> >> > >
> >> > > On 8/19/06, Roman Mandeleil <[EMAIL PROTECTED]> wrote:
> >> > >>
> >> > >>
> >> > >> I can provide you some sample but I think it will complicate the
> >> > >> situation
> >> > >> ,
> >> > >> I want to understand the principle of how it works, I thought the
> >> model
> >> > >> should be full synchronized
> >> > >> with the html on the screen, but maybe the idea is something else ?
> >> > >>
> >> > >>
> >> > >> igor.vaynberg wrote:
> >> > >> >
> >> > >> > how about some code of that page?
> >> > >> >
> >> > >> > -Igor
> >> > >> >
> >> > >> >
> >> > >> > On 8/18/06, Roman Mandeleil < [EMAIL PROTECTED]> wrote:
> >> > >> >>
> >> > >> >>
> >> > >> >> I really don't understand how it should works, I have a ListView
> >> and
> >> > >> some
> >> > >> >> model attached to it with two elements , some how every self
> >> updating
> >> > >> >> cycle
> >> > >> >> I got one element added to the list on the screen, any ideas ?
> >> > >> >> --
> >> > >> >> View this message in context:
> >> > >> >>
> >> > >>
> >> http://www.nabble.com/ListView-and-AjaxSelfUpdatingTimerBehavior-tf2127590.html#a5870890
> >> > >> >> Sent from the Wicket - User forum at Nabble.com.
> >> > >> >>
> >> > >> >>
> >> > >> >>
> >> > >>
> >> -------------------------------------------------------------------------
> >> > >> >> Using Tomcat but need to do more? Need to support web services,
> >> > >> security?
> >> > >> >> Get stuff done quickly with pre-integrated technology to make
> >> your
> >> job
> >> > >> >> easier
> >> > >> >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> > >> >> Geronimo
> >> > >> >>
> >> > >>
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> > >> >> _______________________________________________
> >> > >> >> Wicket-user mailing list
> >> > >> >> Wicket-user@lists.sourceforge.net
> >> > >> >>
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >> > >> >>
> >> > >> >
> >> > >> >
> >> > >>
> >> -------------------------------------------------------------------------
> >> > >> > Using Tomcat but need to do more? Need to support web services,
> >> > >> security?
> >> > >> > Get stuff done quickly with pre-integrated technology to make your
> >> job
> >> > >> > easier
> >> > >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> > >> Geronimo
> >> > >> >
> >> > >>
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> > >> > _______________________________________________
> >> > >> > Wicket-user mailing list
> >> > >> > Wicket-user@lists.sourceforge.net
> >> > >> >
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >> > >> >
> >> > >> >
> >> > >>
> >> > >> --
> >> > >> View this message in context:
> >> > >>
> >> http://www.nabble.com/ListView-and-AjaxSelfUpdatingTimerBehavior-tf2127590.html#a5886620
> >> > >> Sent from the Wicket - User forum at Nabble.com.
> >> > >>
> >> > >>
> >> > >>
> >> -------------------------------------------------------------------------
> >> > >> Using Tomcat but need to do more? Need to support web services,
> >> security?
> >> > >> Get stuff done quickly with pre-integrated technology to make your
> >> job
> >> > >> easier
> >> > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> > >> Geronimo
> >> > >>
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> > >> _______________________________________________
> >> > >> Wicket-user mailing list
> >> > >> Wicket-user@lists.sourceforge.net
> >> > >>
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >> > >>
> >> > >
> >> > >
> >> -------------------------------------------------------------------------
> >> > > Using Tomcat but need to do more? Need to support web services,
> >> security?
> >> > > Get stuff done quickly with pre-integrated technology to make your
> >> job
> >> > > easier
> >> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> Geronimo
> >> > >
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> > > _______________________________________________
> >> > > Wicket-user mailing list
> >> > > Wicket-user@lists.sourceforge.net
> >> > >
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >> > >
> >> > >
> >> >
> >> > --
> >> > View this message in context:
> >> http://www.nabble.com/ListView-and-AjaxSelfUpdatingTimerBehavior-tf2127590.html#a5896557
> >> > Sent from the Wicket - User forum at Nabble.com.
> >> >
> >> >
> >> >
> >> -------------------------------------------------------------------------
> >> > Using Tomcat but need to do more? Need to support web services,
> >> security?
> >> > Get stuff done quickly with pre-integrated technology to make your job
> >> easier
> >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> Geronimo
> >> >
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> > _______________________________________________
> >> > Wicket-user mailing list
> >> > Wicket-user@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >> >
> >>
> >>
> >> -------------------------------------------------------------------------
> >> Using Tomcat but need to do more? Need to support web services, security?
> >> Get stuff done quickly with pre-integrated technology to make your job
> >> easier
> >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >> Geronimo
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>
> >> _______________________________________________
> >> Wicket-user mailing list
> >> Wicket-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >>
> >>
> >
> >
> > --
> > Scott Swank
> > reformed mathematician
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/ListView-and-AjaxSelfUpdatingTimerBehavior-tf2127590.html#a5902064
> Sent from the Wicket - User forum at Nabble.com.
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Download Wicket 1.2.1 now! Embed Wicket components in your portals!
-- http://wicketframework.org

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to