Hide Wicket components and use Ajax to unhide later

by kinabalu on September 14, 2008

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?

Share this:
  • Digg
  • DZone
  • Facebook
  • Technorati
  • LinkedIn
  • del.icio.us
  • Google Bookmarks
  • E-mail this story to a friend!
  • TwitThis

Leave a Comment

Previous post:

Next post: