Hello All!

I seem to have discovered after quite a lot of effort that it's not possible to 
dynamically swap the markup of a base component from which children inherit 
markup with <wicket:child/> and <wicket:extend/>. I think this makes sense 
because of how wicket merging and caching work (or at least used to work), but 
I just wanted to make sure that this is the case because it's been a long time 
since I worked on Wicket internals. To restate the problem, what I want to do 
is have MyComponent load either MyComponent.html or MyComponentDecorated.html 
depending on the state of some variables associated with MyComponent. In the 
case where the component is decorated, some components might be added and those 
components would be referenced in MyComponentDecorated.html. In the case where 
there are no decorations applied to the component, then no decorative 
components would be added and MyComponent.html would not provide references to 
decorations. I've tried a variety of ways of doing this, but it does not seem 
to be possible. I thought I had it for a moment by overriding both 
getMarkupResourceStream and getCacheKey, but that effort failed as well.

Thoughts? Ideas? Thanks!

Best,

Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to