Re: Explain difference between using <g:Image> or a <div> (in UI Binder) when using GWT sprite ?
Hello Thomas,
Please, you say this :
If your 'sprite_MS' is already "sprited", then don't use an ImageResource; use a DataResource instead, and use either Image#setUrlAndVisibleRect() or a "normal" CSS class (not @sprite) to display it.
#1
- Can you explain the reason why I should use a DataResource when my image ('sprite_MS') is sprited ? ... Because I found a solution that works perfectly with ImageResource + @sprite.
#2
- Can you give an example with the normal CSS class (not @sprite) because I did not succeed to have the expected result that is to diplay a piece of the sprite_MS image (DataResource in this case).
So I have this :
@Source("./common/sprites_MS.png")
@ImageOptions(preventInlining = true)
DataResource sprites_MS();
And I do not want to use this solution... :
logo.setUrlAndVisibleRect(CR.COMMON_RES_INSTANCE.sprites_MS().getSafeUri(), 0, 0, 154, 60);
....because I need to be able to change my sprites_MS.png and if so it will change all the coordinates of the elements and I prefers to modify their background-positions in just one file (a css file) rather than looking for each call of setUrlAndVisibleRect() in different files.)
#3
Another question, not related to the previous ones but related to images, is that my website is a yahoo_movie-LIKE (www.mananaseguro.com). I will need to display a lot of images (all the week's posters). So what strategy should I use to load and display these images ?
My current vision is :
- The layout of the image is a GRID (for example: column : 6 images, row : 100) => so I could use a DATA GRID widget.
- The images dynamically change when the date change => so I could use the Image class, and concerning my future database of movies's poster images, I will store them in a directory (www.mananaseguro.com/img/poster) and dynamically refer to them by their URL.
Am I on the good way ?
I will use GAE, I do not know if it has some advantages for this case.
I will also use Objectify.
Maybe you have some hints that will be usefull when I will need to create this dynamic database managing the posters.
(I precise that I ask this question, because I do not know Objectify for the moment, neither Request Factory, neither the use of the Cell Widgets).
Thanks again for your help,
Best regards
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/tzVTMHRHiVwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home