I'm still having the fundamental problem of an Image refusing to
update. (A coworker suggested that it might be that I wasn't (yet)
updating the underlying model that the page was drawing from, which
didn't "smell" like the problem to me, since I could see the
component-based updating I thought I was doing, but I put in that
change of updating the model, but still I  can NOT get the image part
of the page to update.) The Label subcomponent of the component is
updating fine, but, the ImageComponent (a wrapper to a Wicket Image)
seems as fix'd as the north star.

I'm working with my own MediaComponent class. It has one of our
ImageComponent, added thus:
      mImageComponent = new ImageComponent("mediaimage",mResource,pClassStyle);
        mImageComponent.setOutputMarkupId(true);
        add(mImageComponent);

(the mResource here is our MMSDataResource which extends Wicket's
DynamicImageResource )

Then when it comes time to update w/ the MMSDataResource passed back
from the ModalWindow, I do this:
                        ImageComponent newImageComponent = new
ImageComponent("mediaimage",mResource,mClassStyle);
                        newImageComponent.setOutputMarkupId(true);
                        mImageComponent.replaceWith(newImageComponent);
                        mImageComponent = newImageComponent;
                        pTarget.addComponent(MediaPanel.this);

i can add a pTarget.addComponent(mImageComponent); to no avail; if I
put it before the swap so the reference is to the "old"
mImageComponent, it rightly complains, and doesn't make a difference
coming later... I think adding the MediaPanel itself means the
imageComponent inside of it gets redrawn via Ajax too.

So I see that MMSDataResource's getImageData() is NOT being called by
DynamicImageResource for the Ajax re-render. I see the whole
MediaPanel getting redrawn in the Ajax debug window, but apparently
the Image reference from ImageComponent is the same old thing.

I know there are a few places in my group's code that I might be the
actual source of the problem, but can anyone see if I'm doing
something wrong? Can't you swap in a new subcomponent during an
AjaxRequestTarget-driven update? Is there a likely culprit, or
something else that needs to be explicitly added to the
AjaxRequestTarget ?

Thanks...
Kirk

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

Reply via email to