It is probably already well known, if you’re doing Ajax, I might not be popping any big secrets here. But I was reading Wicket in Action tonight, and ran across a very helpful tidbit on how to properly hide a component. If you’ve constructed a component that you’d like to show, upon an action, you need at least a dummy tag in the dom to attach off of. Add this to that component and you can happily .setVisible(false) and unhide it later.
setOutputMarkupPlaceholderTag(true); |
that’s it. Wicket in Action is a great read so far, if you’re doing any web development, we here at Mystic highly recommend picking up a copy.
And if you haven’t read Craig’s review of Wicket, what are you waiting for?
Thanks for this post, you solved my Wicket problem perfectly. I had been stumped as to why my component was disappearing fine, but wouldn’t reappear.
Thanks for that! I was wondering how to properly hide things
Thanks a lot !!! I spent many hours realizing how to manage it, until I read your post.
Thanks a lot, it did the trick for me