can i ask why are you dismounting? create your resourcereference that returns your resource,use resourcereference for mounting
and Key key =new Key(your ResourceReference) you should also read a very nice martin-g's article on how to mount resources in wicket 1.5 http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/comment-page-1/ On Wed, Dec 7, 2011 at 12:28 PM, John Toncart <[email protected]> wrote: > Hi folks, > > in 1.4 I was doing (pseudo code, real code is longer): > > public class MyPage extends WebPage > { > public MyPage() > { > ... > DynamicImageResource image = new DynamicImageResource(); > image.setImageData(_my_generated_byte_array_); > ... > MyApp.get().getSharedResources().remove("/my/custom/resource.jpg"); > MyApp.get().getSharedResources().add("/my/custom/resource_new", > image); > ... > } > } > > Not know if it's optimal but it works and resources are dynamicaly > mounted and dismounted. > > In 1.5 I can't do: > MyApp.get().getSharedResources().remove("/my/custom/resource.jpg"); > because remove() method in 1.5 needs "ResourceReference.Key" > > Is there example how to work with remove() in 1.5 or how to rewrite > my code in example above? > > Thanks, > > JT > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > -- thank you, regards, Vineet Semwal --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
