Aaaaaah!
Okay, found it....
It is exactly where it should be:
add( new Image( "image", imageResource, new ValueMap( map ) ) )
Thanks...
Joe
Johannes Schneider wrote:
> Hi,
>
> I have registered a shared resource with
> IndexedSharedResourceCodingStrategy.
> Now I want to add an image to one of my pages. But of course I need to
> add a parameter to that image. How can this be done? I really can't find
> any fitting constructor...
>
> What I have so far is:
>
>
>
> ResourceReference imageResource = new ResourceReference(
> "MyWellKnownKey" );
>
> HashMap<String, Object> map = new HashMap<String, Object>();
> map.put( "0", "myParameterIWantToAdd );
>
> CharSequence url = RequestCycle.get().urlFor( imageResource, new
> ValueMap( map ) ); //that URL looks good! But what to do with?
>
> add( new Image( "image", String.valueOf( url ) ) ); //does not work
>
>
>
> Where is
>
> new ResourceReference ("MyWellKnownKey" , new ValueMap() );
>
>
>
> Any hints?
>
>
> Thanks,
>
> Johannes
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]