Thanks for your suggestions.  It was a model problem, after all: after
I had written to the list, I observed that it wasn't that the first
update never happened, but that all updates happened one iteration too
late, i.e., user handles "A" - nothing happens, user handles "B" - "A"
disappears from the ListView, etc.  So in addition to
target.addComponent(listViewContainer) I added an explicit
listViewContainer.detach().  I thought that that happens
automatically, but apparently not; now it works.

At least it got me to finally install Firebug, it' great!

Cheers,
Thomas

On Tue, Apr 1, 2008 at 11:41 AM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Yeah, and if you dont know it. Firebug is great for that..
>
>  http://www.getfirebug.com/
>
>
>
>  Johan Compagner wrote:
>
> > So the serverside is not called the first time at all? (you have debugged
> that?)
> > Then it seems that it is a javascript issue. Look in the browser why
> > it isnt called.
> >
> > On 3/31/08, Thomas Kappler <[EMAIL PROTECTED]> wrote:
> >
> >
> > > Hi,
> > >
> > > I'm seeing a strange behavior on one of my pages.  Using
> > > wicketstuff-scriptaculous, users drag a row from a ListView to another
> > > component.  This triggers an association between the two model
> > > objects, which is also persisted via Hibernate.  Relevant code:
> > >
> > >            protected void onDrop(Component component,
> > > AjaxRequestTarget target) {
> > >                if (component.getModelObject() instanceof Fiche) {
> > >                        // a fiche being dropped
> > >                        Fiche f = (Fiche) component.getModelObject();
> > >                        sense.getFiches().add(f);
> > >                        DataStaticService.getHibernateSession().flush();
> > >
> DataStaticService.getHibernateSession().merge(sense);
> > >
> > > DataStaticService.getHibernateSession().getTransaction().commit();
> > >                        sensesPanel.update(node, target);
> > >                }
> > >            }
> > >
> > > The update() in the last line triggers a target.addComponent() of the
> > > panel containing the ListView, which should cause it to remove the
> > > dropped element, as it has been handled.  (The model backing the
> > > ListView is the result of a database query getting the Fiches which
> > > are not associated to a Sense.)
> > >
> > > Now, what I see is that the first drop after the page is loaded
> > > doesn't trigger the update, the ListView stays untouched.  However,
> > > when I drop the second and more elements, it starts working.  But the
> > > first dropped element is always displayed, so the ListView is always
> > > off by one.  A manual page reload again causes the next drop to not
> > > update the ListView.
> > >
> > > What gives?  The fact that it starts working at some time seems to
> > > indicate my backend/domain logic is correct.  I can post more code,
> > > but perhaps someone can already give a direction where to look.
> > >
> > > Cheers,
> > > Thomas
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>  --
>  -Wicket for love
>
>  Nino Martinez Wael
>  Java Specialist @ Jayway DK
>  http://www.jayway.dk
>  +45 2936 7684
>
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to