use NonCachingImage

-igor


On Wed, Feb 27, 2008 at 2:43 AM, Karol Wrzesniewski
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I'm having problems with refreshing an Image using AjaxLink.
>
>  I have a ModalWindow. On it's left side theres a ListView containing Ajax
>  links:
>
>  ----------
>          add(listaObrazow = new ListView("pics", obrazki) {
>              public void populateItem(final ListItem listItem) {
>                  final String obr = (String)listItem.getModelObject();
>                  listItem.add(new Label("pic",new Model(obr)));
>
>                  listItem.add(new AjaxLink("picAjaxLink") {
>                      public void onClick(AjaxRequestTarget
>  ajaxRequestTarget) {
>
>                          imgPreview.setImageResource(
>                                  EbokTools.getImageResource(
>                                  (String)listItem.getModelObject()
>                                  )
>                                  );
>
>                          ajaxRequestTarget.addComponent(imgPreview);
>
>
>                          myModal.setObraz((String)listItem.getModelObject());
>                          ajaxRequestTarget.addComponent(wyborObrazow);
>                      }});
>              }
>          });
>  ----------
>
>
>
>  imgPreview is an Image object, placed on the same modal Window. What Im
>  trying to achieve is to refresh this image after the AjaxLink is clicked.
>  Unfortunately it doesn't. After I click on AjaxLink content of form
>  "wyborObrazow" is refreshed, but image stays unchanged.
>
>  Image resource is being changed - i know that because after i close modal
>  and open it again "imgPreview" is showing me  the "right" Resource.
>
>  The problem is that calling ajaxRequestTarget.addComponent(imgPreview);
>  after changing imageResource doesn't seem to be enough.
>
>  I would be very grateful for some hints.
>
>  best regards,
>  Zyx
>
>  --
>
>  ---------------------------------------------------------------------
>  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