Unlike wrapping components in webmarkupcontainer, this should work for all tags, including <td, <tr, etc.
On 3/19/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
yeah i could live with this solution, if it works for all kind of tags. johan On 3/19/07, Matej Knopp <[EMAIL PROTECTED]> wrote: > > Indeed, it wil fail. but I kind of fail to see practical value of this > behavior. To me it looks much more useful to be able to > setVisible(false) and later setVisible(true), without having to worry > about wrapping the element (which can be rather tricky with element > like td). > > Perhaps we could have a flag on webmarkupcontainer, that would control > how should it render when not visible? I mean, one more flag certainly > won't harm. And it wouldn't break any of the existing code. All it > would do is that when a component is not visible, it will render as > <componentTagName style="display:none" > id="componentId"></componentTagName>. > > -Matej > > On 3/19/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: > > Currently everybody assumes (correctly) that the element is completely > > removed (Ajax and non-Ajax), i.e. not present in the final markup. > > This means that scripts that iterate through the dom, or check for the > > document.getElementById() == null will fail if we implement this. > > > > I *strongly* discourage changing this behavior. > > > > Martijn > > > > On 3/19/07, Matej Knopp <[EMAIL PROTECTED]> wrote: > > > Will it? This seems to be actually quite a smart workaround. How > > > exactly will this break existing clients? Only thing i'm concerned > > > about is the validity of output markup. but imho when we preserve the > > > original tag names, e.g. td will render as td, it should be all right. > > > > > > -Matej > > > > > > On 3/19/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: > > > > So you mean: > > > > > > > > Label l = Label("foo", "hello"); > > > > renders: > > > > <span wicket:id="foo">hello</span> > > > > > > > > ... some ajax stuff, or a normal page render: > > > > > > > > l.setVisible(false); > > > > renders: > > > > <span wicket:id="foo" style="display:none"></span> > > > > ? > > > > > > > > This can and will break existing clients in a very nasty manner, > > > > because the markup id is still present in the final markup. > > > > > > > > Martijn > > > > > > > > On 3/19/07, Vincent Demay <[EMAIL PROTECTED]> wrote: > > > > > Johan Compagner a écrit : > > > > > >> > Also always just rendering the component but use the style to > make in > > > > > >> > invisible > > > > > >> > could be a security problem. So that can't be the default. > > > > > >> > > > > > >> What do you mean by security problem? > > > > > > > > > > > > > > > > > > > > > > > > If the the component that is set to none visible is none > visible > > > > > > because of > > > > > > security > > > > > > So it has data that never should be send to the browser because > the > > > > > > user is > > > > > > not allowed > > > > > > to see it. > > > > > > > > > > But data is never send to the user because a none visible > component will > > > > > be render as an empty tag, so without data > > > > > > > > > > > > > > > > > > > > > > -- > > > > Learn Wicket at ApacheCon Europe: http://apachecon.com > > > > Join the wicket community at irc.freenode.net: ##wicket > > > > Wicket 1.2.5 will keep your server alive. Download Wicket now! > > > > http://wicketframework.org > > > > > > > > > > > > > -- > > Learn Wicket at ApacheCon Europe: http://apachecon.com > > Join the wicket community at irc.freenode.net: ##wicket > > Wicket 1.2.5 will keep your server alive. Download Wicket now! > > http://wicketframework.org > > >