You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ma...@mail.bg on 2011/09/06 14:51:46 UTC

getImageData() of Image not called on component instantiation in IE



Hello, 


I have the following problem. I have a repeater which declares Images as
so: 


 NonCachingImage image1 = new NonCachingImage("image1", new
BufferedDynamicImageResource() { 


 private static final long serialVersionUID = 1L; 


 @Override
 protected byte[] getImageData() { 


 return detachable.getObject().getItem1().getThumbData(); 


 } 


 }); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the image src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it has
never beed loaded and therefore does not retrieve the source of the image.
Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin

-------------------------------------

Сега е по-лесно да получиш най-добрата куриерска услуга на 
телефон *3456(*DHL6)
 http://www.dhl.bg/bg.html

Re: getImageData() of Image not called on component instantiation in IE

Posted by ma...@mail.bg.


Maybe I found the reason for this. 


10-09-2011 20:28:20,794 WARN
org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.decodeParameters:184
- URL fragment has unmatched key/value pairs, responding with 404.
Fragment: PIE.htc 


Any ideas? 


Thank you 


----- Цитат от Carl-Eric Menzel (cmenzel@wicketbuch.de), на
09.09.2011 в 12:14 -----   Do you have a quickstart to try this?


Carl-Eric
www.wicketbuch.de


On Thu, 8 Sep 2011 13:37:03 -0000
martin.asenov@mail.bg wrote:


Would anyone help me with this? I'm desparate on fixing it.... 


Thank you,
Martin 


----- Цитат от martin.asenov@mail.bg, на 06.09.2011 в 15:51
-----


Hello, 


I have the following problem. I have a repeater which declares Images
as so: 


NonCachingImage image1 = new NonCachingImage("image1", new
BufferedDynamicImageResource() { 


private static final long serialVersionUID = 1L; 


@Override
protected byte[] getImageData() { 


return detachable.getObject().getItem1().getThumbData(); 


} 


}); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the
image src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it
has never beed loaded and therefore does not retrieve the source of
the image. Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin


-------------------------------------


Сега е по-лесно да получиш най-добрата
куриерска услуга на 
телефон *3456(*DHL6) 


-------------------------------------
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на
българския пазар - 10 GB пощенска кутия, 20 MB
прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


 

-------------------------------------
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, SMS известяване и други.

Re: getImageData() of Image not called on component instantiation in IE

Posted by ma...@mail.bg.


I examined the logs when the application is used with Chrome and IE and the
differences start from the following: 


In IE: 


10-09-2011 19:28:32,928 DEBUG org.apache.wicket.Session.getPage:701 -
Getting page [path = 1:thumbnail_repeater:1:cols:2:view_link:image1,
versionNumber = 0] 


10-09-2011 19:28:32,931 DEBUG
org.apache.wicket.RequestCycle.setRequestTarget:648 - setting request
target to [BookmarkablePageRequestTarget@779875460
pageClass=org.apache.wicket.markup.html.pages.PageExpiredErrorPage] 


While in Chrome it is: 


10-09-2011 19:29:42,645 DEBUG org.apache.wicket.Session.getPage:701 -
Getting page [path = 1:thumbnail_repeater:1:cols:2:view_link:image1,
versionNumber = 0] 


10-09-2011 19:29:42,647 DEBUG org.apache.wicket.Session.getPage:701 -
Getting page [path = 1:thumbnail_repeater:1:cols:2:view_link:image2,
versionNumber = 0] I ALSO PUT A PRINT STATEMENT INSIDE THE GETIMAGEDATA()
METHOD OF IMAGE1. IT IS NOT CALLED WHEN APPLICATION IS BROWSED WITH IE.
STRANGE THING IS THAT, ON SECOND REQUEST EVERYTHING WORKS FINE IN IE. The
problem is not in the immediate detachment of models, it's the same way in
both browsers, I just didn't know Wicket releases loadabledetachablemodels
right after render. Any help will be greatly appreciated - I'm stuck for
several days on this issue. Thank you,
Martin 


----- Цитат от Carl-Eric Menzel (cmenzel@wicketbuch.de), на
09.09.2011 в 12:14 -----   Do you have a quickstart to try this?


Carl-Eric
www.wicketbuch.de


On Thu, 8 Sep 2011 13:37:03 -0000
martin.asenov@mail.bg wrote:


Would anyone help me with this? I'm desparate on fixing it.... 


Thank you,
Martin 


----- Цитат от martin.asenov@mail.bg, на 06.09.2011 в 15:51
-----


Hello, 


I have the following problem. I have a repeater which declares Images
as so: 


NonCachingImage image1 = new NonCachingImage("image1", new
BufferedDynamicImageResource() { 


private static final long serialVersionUID = 1L; 


@Override
protected byte[] getImageData() { 


return detachable.getObject().getItem1().getThumbData(); 


} 


}); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the
image src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it
has never beed loaded and therefore does not retrieve the source of
the image. Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin


-------------------------------------


Сега е по-лесно да получиш най-добрата
куриерска услуга на 
телефон *3456(*DHL6) 


-------------------------------------
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на
българския пазар - 10 GB пощенска кутия, 20 MB
прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


 

-------------------------------------
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, SMS известяване и други.

Re: getImageData() of Image not called on component instantiation in IE

Posted by ma...@mail.bg.


Hi, 


I created a quickstart but was unable to reproduce the problem. 


I traced down the roots of the error and found out that the
LoadableDetachableModel-s that my repeater views use get their object
detached IMMEDIATELY after page gets rendered. And this happens only when
the application is browsed via IE. 


Here is a snippet from the logs: 


10-09-2011 19:15:56,197 DEBUG org.apache.wicket.Page.componentRendered:395
- Rendered [Page class = ui.Canvas, id = 1, version = 0] 


10-09-2011 19:15:56,197 DEBUG org.apache.wicket.Component.render:2555 - End
render [Page class = ui.Canvas, id = 1, version = 0] 


10-09-2011 19:15:56,199 DEBUG org.apache.wicket.Page.onDetach:1568 - ending
request for page [Page class = ui.DispatchPage, id = 0, version = 0],
request [method = POST, protocol = HTTP/1.1, requestURL =
http://**********/****/, contentType = application/x-www-form-urlencoded,
contentLength = 447, contextPath = /****, pathInfo = null, requestURI =
/****/, servletPath = /, pathTranslated = null] 


10-09-2011 19:15:56,199 DEBUG org.apache.wicket.Page.onDetach:1568 - ending
request for page [Page class = ui.Canvas, id = 1, version = 0], request
[method = POST, protocol = HTTP/1.1, requestURL = http://**********/****/,
contentType = application/x-www-form-urlencoded, contentLength = 447,
contextPath = /****, pathInfo = null, requestURI = /****/, servletPath = /,
pathTranslated = null] 


10-09-2011 19:15:56,199 DEBUG
org.apache.wicket.model.LoadableDetachableModel.detach:106 - removed
transient object for
util.ComparisonDataProvider$1@3a78ad:attached=false:tempModelObject=[null],
requestCycle [RequestCycle@1313e0e thread=http-8080-1] 


.... 


.... 


As you can see model is detached right after page render and therefore the
model object's data cannot be processed. 


Thank you,
Martin  


----- Цитат от Carl-Eric Menzel (cmenzel@wicketbuch.de), на
09.09.2011 в 12:14 -----   Do you have a quickstart to try this?


Carl-Eric
www.wicketbuch.de


On Thu, 8 Sep 2011 13:37:03 -0000
martin.asenov@mail.bg wrote:


Would anyone help me with this? I'm desparate on fixing it.... 


Thank you,
Martin 


----- Цитат от martin.asenov@mail.bg, на 06.09.2011 в 15:51
-----


Hello, 


I have the following problem. I have a repeater which declares Images
as so: 


NonCachingImage image1 = new NonCachingImage("image1", new
BufferedDynamicImageResource() { 


private static final long serialVersionUID = 1L; 


@Override
protected byte[] getImageData() { 


return detachable.getObject().getItem1().getThumbData(); 


} 


}); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the
image src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it
has never beed loaded and therefore does not retrieve the source of
the image. Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin


-------------------------------------


Сега е по-лесно да получиш най-добрата
куриерска услуга на 
телефон *3456(*DHL6) 


-------------------------------------
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на
българския пазар - 10 GB пощенска кутия, 20 MB
прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


 

-------------------------------------
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, SMS известяване и други.

Re: getImageData() of Image not called on component instantiation in IE

Posted by Carl-Eric Menzel <cm...@wicketbuch.de>.
Do you have a quickstart to try this?

Carl-Eric
www.wicketbuch.de

On Thu, 8 Sep 2011 13:37:03 -0000
martin.asenov@mail.bg wrote:

> 
> 
> 
> Would anyone help me with this? I'm desparate on fixing it.... 
> 
> 
> Thank you,
> Martin  
> 
> 
> ----- Цитат от martin.asenov@mail.bg, на 06.09.2011 в 15:51 -----
>   
> 
> 
> Hello, 
> 
> 
> I have the following problem. I have a repeater which declares Images
> as so: 
> 
> 
>  NonCachingImage image1 = new NonCachingImage("image1", new
> BufferedDynamicImageResource() { 
> 
> 
>  private static final long serialVersionUID = 1L; 
> 
> 
>  @Override
>  protected byte[] getImageData() { 
> 
> 
>  return detachable.getObject().getItem1().getThumbData(); 
> 
> 
>  } 
> 
> 
>  }); 
> 
> 
> When the repeater is rendered and displayed in IE, getImageData is not
> called and therefore images are not shown. However, if I copy the
> image src
> and hit that URL, the image gets loaded. 
> 
> 
> I believe for some reason IE thinks the image is cached, although it
> has never beed loaded and therefore does not retrieve the source of
> the image. Don't know if this is the real reason. 
> 
> 
> Has anybody been into this issue before? 
> 
> 
> Regards,
> Martin
> 
> 
> -------------------------------------
> 
> 
> Сега е по-лесно да получиш най-добрата
> куриерска услуга на 
> телефон *3456(*DHL6)   
> 
> 
>  
> 
> -------------------------------------
> Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на
> българския пазар - 10 GB пощенска кутия, 20 MB прикрепен файл,
> безплатен POP3, мобилна версия, SMS известяване и други.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: getImageData() of Image not called on component instantiation in IE

Posted by ma...@mail.bg.


Would anyone help me with this? I'm desparate on fixing it.... 


Thank you,
Martin  


----- Цитат от martin.asenov@mail.bg, на 06.09.2011 в 15:51 -----
  


Hello, 


I have the following problem. I have a repeater which declares Images as
so: 


 NonCachingImage image1 = new NonCachingImage("image1", new
BufferedDynamicImageResource() { 


 private static final long serialVersionUID = 1L; 


 @Override
 protected byte[] getImageData() { 


 return detachable.getObject().getItem1().getThumbData(); 


 } 


 }); 


When the repeater is rendered and displayed in IE, getImageData is not
called and therefore images are not shown. However, if I copy the image
src
and hit that URL, the image gets loaded. 


I believe for some reason IE thinks the image is cached, although it has
never beed loaded and therefore does not retrieve the source of the image.
Don't know if this is the real reason. 


Has anybody been into this issue before? 


Regards,
Martin


-------------------------------------


Сега е по-лесно да получиш най-добрата
куриерска услуга на 
телефон *3456(*DHL6)   


 

-------------------------------------
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, SMS известяване и други.