You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Brill Pappin <br...@pappin.ca> on 2009/03/22 17:04:10 UTC

Gravatar image component, help with urls

I'm creating a new component to access Gravatar (see: http://en.gravatar.com/) 
.

I wanted to just extend the components the make Image work, because I  
wanted it to work just like an Image and fall back to a standard image  
if the Gavatar image was not present. Unfortunately almost everything  
in Image and its supporting class LocalizedImageResource is final, so  
I ended up having to clone the source.

My problem now is that I need to generate an absolute URI for the  
image resource and I'm not sure what the best way to do that is.
Right now the code is simply using the urlFor method to get an  
application relative path for the resource.

Component.urlFor(ResourceReference)

Is there a way to get the absolute URI of the resource, as in  
including the http://hostname:port/path ??
That URI will be url encoded and passed to Gavatar so that it can fall  
back to it if it doesn't have an avatar image.

If anyone else is interested in helping to improve it, the source is at:
http://wicket-skunkworks.googlecode.com/svn/trunk/wicket-shoebox/
in the wicket skunkworks project.


- Brill 

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