thx jens So for each image to server requests are necessary:
1 to get the dto and create html with image-url 2 to get the image from servlet my hope was/is there is a way with one request/response? And indeed i get the image map as html. so my dto would be very simple: 2 Strings (url + map). On Friday, 14 September 2012 16:25:35 UTC+2, Jens wrote: > > Create a DTO that describes the image map, something like: > > ImageMap > - String: imageUrl (would point to your png-image servlet) > - List<ImageMap.Area>: areas (calculated on server using your lib) > > ImageMap.Area: > - ShapeTypeEnum: shape (RECT, CIRCLE, POLY) > - List<Integer>: coords > - String: href > - String: title > > Then create a custom widget that can render an image map using <img>, > <map> and <area> and use the DTO information to configure the widget. > > If your lib creates raw HTML for the image map then you probably only need > the imageUrl and the raw HTML in your DTO and render the raw HTML directly > using GWT's HTML widget. But you have to do some sanity checks on the raw > HTML to prevent cross site scripting attacks. > So if you can, build the HTML on the client side and only transfer the > needed data from server to client. > > -- J. > -- 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/-/q_BMSp0qzCcJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
