Re: IndexedSharedResourceCodingStrategy.encode not being called

2011-01-26 Thread Markus Schmalhofer

I faced the same the problem and found this solution.
You must use "org.apache.wicket.Application/" as
your resource key.

In your example:
Instead of writing mount(new IndexedSharedResourceCodingStrategy("photo",
"photo") ); 
you must use: 
mount(new IndexedSharedResourceCodingStrategy("photo",
"org.apache.wicket.Application/photo") );  
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IndexedSharedResourceCodingStrategy-encode-not-being-called-tp3074859p3239006.html
Sent from the Users forum mailing list archive at Nabble.com.

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



IndexedSharedResourceCodingStrategy.encode not being called

2010-12-06 Thread Doug Leeper
I have mounted an IndexedSharedResourceCodingStrategy in my WebApplication as 
such:

getSharedResources().add("photo", new BusinessPhotoSharedResource());
mount(new IndexedSharedResourceCodingStrategy("photo", "photo") );

and I have created an Image with the appropriate resource ref and ValueMap.

ValueMap valueMap = new ValueMap();
valueMap.add("0", photoId.getBusinessID().toString());
valueMap.add("1", photoId.getContentID().toString());

   add( new Image( "photo", new ResourceReference(Application.class, 
"photo"), valueMap ) );


but the generated URL for that image is not created as expected.

Generated:
src="resources/app/photo?0=50824&1=1401"

Expected:
src="resources/app/50824/1401/photo"

Is there something I am missing?

I set a break point in Eclipse in the encode and it never reached that break 
point.

Any help is appreciated.

Thanks
- Doug