Ah, I was trying various permutations in google of wicket, ajax, image, refresh, etc.
the resulting code was something like mImage = new Image("imgTag", mResource){ private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("src", tag.getString("src") + "&imageid=" + mIDforURL); } }; where mIDforURL was actually a timestamp generated by the containing compontent.. Thanks! On 10/29/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: > search the list for "updating images using ajax". It should give about > 5-10 threads easily. > > And this finds: > http://issues.apache.org/jira/browse/WICKET-939 > > Martijn > > On 10/30/07, Kirk Israel <[EMAIL PROTECTED]> wrote: > > This might well be the problem. > > How do you explicitly postpend something to the URL of a Wicket Image? > > The URLs we've been using are autogenerated, and my Google mojo is > > failing me... it doesn't have anything to do with .forURL(), does it? > > > > On 10/29/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: > > > Not sure if it is relevant, but to update images using ajax you need > > > to generate a unique URL by adding a timestamp or random number to it. > > > > > > Martijn > > > > > > On 10/29/07, Kirk Israel <[EMAIL PROTECTED]> wrote: > > > > 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] > > > > > > > > > > > > > > > > > -- > > > Buy Wicket in Action: http://manning.com/dashorst > > > Apache Wicket 1.3.0-beta4 is released > > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ > > > > > > --------------------------------------------------------------------- > > > 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] > > > > > > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.0-beta4 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ > > --------------------------------------------------------------------- > 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]