Hello Roland,

your solution works. But the problem is that I am already registering the
resource in
an Initializer. But ok...

Now I am uploading the picture and after the reload, I see the standard pic.
After a
site refresh I am seeing the uploaded pic.

Do I have to set any headers?

greetings





Roland Huss wrote:
> 
> 
> greeklinux wrote:
>> 
>> the line where the NullPointerException is thrown is:
>> 
>> resourceStream = new ResourceReference(MyApplication.PROFILE_STANDARD)
>>                                                
>> .getResource().getResourceStream();
>> 
>> If I am using only this ResourceReference then it works. But I dont know
>> why
>> the Exception is thrown.
>> 
> 
> You need to bind (==register) the ResourceReference to the application
> before you can get to the referenced Resource (which has been registered
> either explicitely or implicitely, if is a PackageResource):
> 
> resourceReference =  new
> ResourceReference(MyApplication.PROFILE_STANDARD);
> resourceReference.bind(Application.get());
> resourceStream = resourceReferece.getResource().getResourceStream();
> 
> 
> ...roland
> 

-- 
View this message in context: 
http://www.nabble.com/Resource-SharedResource---Display-an-image-tp18348115p18365532.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to