so the problem is that in the ajax request you still send the initial image? so it seems that set model on the nci has no effect at all?
On 6/13/07, Jeremy Levy <[EMAIL PROTECTED]> wrote: > I have an AjaxLink link that I am trying to use to update an image, in the > onClick method I am replacing the Model of the image to the new path, > however it's not working. I've tried it with Image and NonCachingImage, and > also turned off Caching in FireFox. I'm not sure but the XML being sent > doesn't look correct. I'm using 1.2.5. Here are the relevant code snipits: > > > ... > final NonCachingImage warningImage = new > NonCachingImage("warningImage", new Model("images/alert_orange.png")); > warningImage.setOutputMarkupId(true); > add(warningImage); > ... > > final AjaxLink link = new AjaxLink("theLink") { > public void onClick(AjaxRequestTarget ajaxRequestTarget) { > log.debug("Link Clicked..."); > > warningImage.setModel(new Model("images/alert_green.png")); > ajaxRequestTarget.addComponent(warningImage); > } > }; > add(link); > > >From the AJAX Console: > > INFO: > INFO: Initiating Ajax GET request on > /1/meetmoi?x=YuQ6ay6aKBGDiO5OfiMmT7sqTYDzw7kvj2TxXBaK1HxBbP9XAjorn1Zpm4EovOnWCZVHg*4WCL-uPukV*-Oz2CeAsvJdoPkh&wicket:behaviorId=0&random=0.337860019529019 > INFO: Invoking pre-call handler(s)... > INFO: Received ajax response (388 characters) > INFO: > <?xml version="1.0" encoding="UTF-8"?><ajax-response><component > id="notYetActive_repeatingAlerts_1_aAlert_warningImage" ><![CDATA[<img > id="notYetActive_repeatingAlerts_1_aAlert_warningImage" > src="/1/meetmoi/resources/com.mdate.web.panels.alerts.MobileNotValidatedAlert/images/alert_orange_en_US.png?wicket:antiCache=1181744625859" > wicket:id="warningImage"/>]]></component></ajax-response> > INFO: Response parsed. Now invoking steps... > INFO: Response processed successfully. > INFO: Invoking post-call handler(s)... > > > Thanks. > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user