actually, if you re-render the component after hide it, it will to be visible... perhaps you can add some callback on the close handler that updates the visibility property on the wicket component.
On Tue, Aug 31, 2010 at 11:08 AM, Pedro Santos <pedros...@gmail.com> wrote: > Use javascript to do that, for example: > > var target = document.getElementById('somecomponentid'); > target.style.position = 'relative'; > var close = document.createElement("span"); > close.innerHTML = 'x'; > close.style.position = 'absolute'; > close.style.top = 0; > close.style.right = 0; > close.onclick = function(){target.style.display = 'none'}; > target.appendChild(close); > > With Wicket, you can create some behavior that calls this javascript > for the target component and then add this behaviour on those > component you want. > > On Mon, Aug 30, 2010 at 11:51 PM, Alec Swan <alecs...@gmail.com> wrote: >> Hello, >> >> I would like to customize AjaxEditableLabel so that every time it is >> rendered it has a letter X in the right-upper corner which allows the >> user to remove the label from the screen. I would also like to >> customize other components, such as panels, the same way. So, ideally >> the solution should be applicable to any type of component. >> >> I would also like to generate the X label at runtime and not have the >> web designer create a separate HTML element with a wicket:id for each >> X. >> >> Any ideas on how to best approach this? >> >> Thanks, >> >> Alec >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > > -- > Pedro Henrique Oliveira dos Santos > -- Pedro Henrique Oliveira dos Santos --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org