Hi, Your investigation is fully correct! I think you can overcome this by adding an invisible panel. I.e. at the server side add "style='display:none'" to the Panel. Wicket JS will replace the old with the new one and then your fadeIn effect will show it.
On Mon, Jan 7, 2013 at 3:01 PM, Carlson Weber <carlso...@gmail.com> wrote: > Hey there! > I've been digging the internet for a solution for this problem, did a lot > of debugging on Wicket's javascripts and I am almost reaching a dead end. > I have a very simple test case: A page with a Label and a Link. When I > click this link, I want that the label change it's caption using the fadeIn > jQuery effect. > > The workflow is that: > * Hide the label with jQuery.hide(); > * Change the label text to the new one; > * As the element is hidden on the first step, I can now show the element > using jQuery.fadeIn(); > > The problem is that when Wicket has any component on the AjaxRequestTarget, > it is deleting the current DOM and inserting in its place a brand new > element. I can hide the component before the Wicket.DOM.replace call, but > it's useless, because when Wicket creates the new component, it is visible > again. And because of that, obviously, fadeIn has no effect, because Wicket > already is showing my element. > Do you guys have any solution to do this? What I want to reach finally is > that: I have a panel in my application and when I click an AjaxSubmitLink, > I want to replace this entire panel with a new one and I want that this > panel will slide to its place. > By the way, I saw that wicket has the function Wicket.Events.subscribe with > events /dom/node/removing and /dom/node/added. The problem is that if I > attach my fadeIn function to the "added" event, the component is already > visible and the effect won't take place, because Wicket first adds the > component to DOM and after that it notifies /dom/node/added. > > Thanks in advance! > > -- > Carlson Weber Filho > 9255-9933 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>