You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Vincent Demay <vi...@anyware-tech.com> on 2007/03/07 10:37:35 UTC

WICKET-365 - Go from setVisible(false) to setVisible(true) on a component in ajax does not work

I think it will be easier to speek about this in the mailing list ;) .

I agree with the last comment : "then why not simply adding the 
style="display:none" attribute to the component tag, instead of creating 
an additional <span> ?" but without its innnerHtml, only the 
componentTag. I think it should work in all case.

--
Vincent Demay
http://wwww.demay-fr.net/blog/

Re: WICKET-365 - Go from setVisible(false) to setVisible(true) on a component in ajax does not work

Posted by Igor Vaynberg <ig...@gmail.com>.
well i guess someone will have to write up a patch and make sure it works in
all the browsers :)

-igor


On 3/7/07, Martijn Dashorst <ma...@gmail.com> wrote:
>
> I seriously doubt it will work in browsers. Not choking on wicket:
> tags and attributes is one thing, having them available in the dom and
> working is a completely other beast.
>
> Martijn
>
> On 3/7/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > now here is an idea we can try. something like wicket:placeholder.
> >
> > -igor
> >
> >
> > On 3/7/07, Frédéric Bertin <fr...@anyware-tech.com> wrote:
> > >
> > > well, from a user point of view, the fact that you can't make a
> > > component visible using Ajax by simply doing:
> > >
> > > component.setVisible(true)
> > > target.addComponent(component)
> > >
> > > is perceived as a bug. And I can't believe you guys won't find
> something
> > > smarter for Wicket than using a surrounding container ;)
> > >
> > > For example, instead of using an HTML tag, what about using a Wicket
> > > specific one, like <wicket:component id="myInvisibleComponent"/> ?
> > >
> > > Fred
> > >
> > >
> > >
> > >
> > > Martijn Dashorst wrote:
> > > > I don't agree. style="display:none" is not the same as not rendering
> > > > it at all
> > > >
> > > > The text and markup is still available, it could have stuff that is
> > > > sensitive in it. setVisible (false) should always remove the whole
> > > > markup for the component from the stream.
> > > >
> > > > Ajax should work the same as normal requests. Otherwise what is the
> > > > fricking point of having a AjaxFallbackLink?
> > > >
> > > > Yes it is a drag to add containers around your stuff that you want
> to
> > > > hide. but it makes it explicit and predictable.
> > > >
> > > > Martijn
> > > >
> > > > On 3/7/07, Vincent Demay <vi...@anyware-tech.com> wrote:
> > > >> I think it will be easier to speek about this in the mailing list
> ;) .
> > > >>
> > > >> I agree with the last comment : "then why not simply adding the
> > > >> style="display:none" attribute to the component tag, instead of
> > > creating
> > > >> an additional <span> ?" but without its innnerHtml, only the
> > > >> componentTag. I think it should work in all case.
> > > >>
> > > >> --
> > > >> Vincent Demay
> > > >> http://wwww.demay-fr.net/blog/
> > > >>
> > > >
> > >
> > >
> >
>
>
> --
> 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
>

Re: WICKET-365 - Go from setVisible(false) to setVisible(true) on a component in ajax does not work

Posted by Martijn Dashorst <ma...@gmail.com>.
I seriously doubt it will work in browsers. Not choking on wicket:
tags and attributes is one thing, having them available in the dom and
working is a completely other beast.

Martijn

On 3/7/07, Igor Vaynberg <ig...@gmail.com> wrote:
> now here is an idea we can try. something like wicket:placeholder.
>
> -igor
>
>
> On 3/7/07, Frédéric Bertin <fr...@anyware-tech.com> wrote:
> >
> > well, from a user point of view, the fact that you can't make a
> > component visible using Ajax by simply doing:
> >
> > component.setVisible(true)
> > target.addComponent(component)
> >
> > is perceived as a bug. And I can't believe you guys won't find something
> > smarter for Wicket than using a surrounding container ;)
> >
> > For example, instead of using an HTML tag, what about using a Wicket
> > specific one, like <wicket:component id="myInvisibleComponent"/> ?
> >
> > Fred
> >
> >
> >
> >
> > Martijn Dashorst wrote:
> > > I don't agree. style="display:none" is not the same as not rendering
> > > it at all
> > >
> > > The text and markup is still available, it could have stuff that is
> > > sensitive in it. setVisible (false) should always remove the whole
> > > markup for the component from the stream.
> > >
> > > Ajax should work the same as normal requests. Otherwise what is the
> > > fricking point of having a AjaxFallbackLink?
> > >
> > > Yes it is a drag to add containers around your stuff that you want to
> > > hide. but it makes it explicit and predictable.
> > >
> > > Martijn
> > >
> > > On 3/7/07, Vincent Demay <vi...@anyware-tech.com> wrote:
> > >> I think it will be easier to speek about this in the mailing list ;) .
> > >>
> > >> I agree with the last comment : "then why not simply adding the
> > >> style="display:none" attribute to the component tag, instead of
> > creating
> > >> an additional <span> ?" but without its innnerHtml, only the
> > >> componentTag. I think it should work in all case.
> > >>
> > >> --
> > >> Vincent Demay
> > >> http://wwww.demay-fr.net/blog/
> > >>
> > >
> >
> >
>


-- 
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

Re: WICKET-365 - Go from setVisible(false) to setVisible(true) on a component in ajax does not work

Posted by Igor Vaynberg <ig...@gmail.com>.
now here is an idea we can try. something like wicket:placeholder.

-igor


On 3/7/07, Frédéric Bertin <fr...@anyware-tech.com> wrote:
>
> well, from a user point of view, the fact that you can't make a
> component visible using Ajax by simply doing:
>
> component.setVisible(true)
> target.addComponent(component)
>
> is perceived as a bug. And I can't believe you guys won't find something
> smarter for Wicket than using a surrounding container ;)
>
> For example, instead of using an HTML tag, what about using a Wicket
> specific one, like <wicket:component id="myInvisibleComponent"/> ?
>
> Fred
>
>
>
>
> Martijn Dashorst wrote:
> > I don't agree. style="display:none" is not the same as not rendering
> > it at all
> >
> > The text and markup is still available, it could have stuff that is
> > sensitive in it. setVisible (false) should always remove the whole
> > markup for the component from the stream.
> >
> > Ajax should work the same as normal requests. Otherwise what is the
> > fricking point of having a AjaxFallbackLink?
> >
> > Yes it is a drag to add containers around your stuff that you want to
> > hide. but it makes it explicit and predictable.
> >
> > Martijn
> >
> > On 3/7/07, Vincent Demay <vi...@anyware-tech.com> wrote:
> >> I think it will be easier to speek about this in the mailing list ;) .
> >>
> >> I agree with the last comment : "then why not simply adding the
> >> style="display:none" attribute to the component tag, instead of
> creating
> >> an additional <span> ?" but without its innnerHtml, only the
> >> componentTag. I think it should work in all case.
> >>
> >> --
> >> Vincent Demay
> >> http://wwww.demay-fr.net/blog/
> >>
> >
>
>

Re: WICKET-365 - Go from setVisible(false) to setVisible(true) on a component in ajax does not work

Posted by Frédéric Bertin <fr...@anyware-tech.com>.
well, from a user point of view, the fact that you can't make a 
component visible using Ajax by simply doing:

component.setVisible(true)
target.addComponent(component)

is perceived as a bug. And I can't believe you guys won't find something 
smarter for Wicket than using a surrounding container ;)

For example, instead of using an HTML tag, what about using a Wicket 
specific one, like <wicket:component id="myInvisibleComponent"/> ?

Fred




Martijn Dashorst wrote:
> I don't agree. style="display:none" is not the same as not rendering 
> it at all
>
> The text and markup is still available, it could have stuff that is
> sensitive in it. setVisible (false) should always remove the whole
> markup for the component from the stream.
>
> Ajax should work the same as normal requests. Otherwise what is the
> fricking point of having a AjaxFallbackLink?
>
> Yes it is a drag to add containers around your stuff that you want to
> hide. but it makes it explicit and predictable.
>
> Martijn
>
> On 3/7/07, Vincent Demay <vi...@anyware-tech.com> wrote:
>> I think it will be easier to speek about this in the mailing list ;) .
>>
>> I agree with the last comment : "then why not simply adding the
>> style="display:none" attribute to the component tag, instead of creating
>> an additional <span> ?" but without its innnerHtml, only the
>> componentTag. I think it should work in all case.
>>
>> -- 
>> Vincent Demay
>> http://wwww.demay-fr.net/blog/
>>
>


Re: WICKET-365 - Go from setVisible(false) to setVisible(true) on a component in ajax does not work

Posted by Vincent Demay <vi...@anyware-tech.com>.
Martijn Dashorst a écrit :
> I don't agree. style="display:none" is not the same as not rendering 
> it at all
>
> The text and markup is still available, it could have stuff that is
> sensitive in it. setVisible (false) should always remove the whole
> markup for the component from the stream.
No, I think I wasn't very clear in what I said ;) .
Generating an empty span is not very good because it could invalidate 
the xhtml, so just replacing the empty span tag with an *empty* 
component tag (div if it was a div, td if it was a td etc...) and 
display:none on it in order to not invalidate Xhtml could be fine imo.
>
> Ajax should work the same as normal requests. Otherwise what is the
> fricking point of having a AjaxFallbackLink?
>
> Yes it is a drag to add containers around your stuff that you want to
> hide. but it makes it explicit and predictable.
>
> Martijn
>
> On 3/7/07, Vincent Demay <vi...@anyware-tech.com> wrote:
>> I think it will be easier to speek about this in the mailing list ;) .
>>
>> I agree with the last comment : "then why not simply adding the
>> style="display:none" attribute to the component tag, instead of creating
>> an additional <span> ?" but without its innnerHtml, only the
>> componentTag. I think it should work in all case.
>>
>> -- 
>> Vincent Demay
>> http://wwww.demay-fr.net/blog/
>>
>
>


Re: WICKET-365 - Go from setVisible(false) to setVisible(true) on a component in ajax does not work

Posted by Martijn Dashorst <ma...@gmail.com>.
I don't agree. style="display:none" is not the same as not rendering it at all

The text and markup is still available, it could have stuff that is
sensitive in it. setVisible (false) should always remove the whole
markup for the component from the stream.

Ajax should work the same as normal requests. Otherwise what is the
fricking point of having a AjaxFallbackLink?

Yes it is a drag to add containers around your stuff that you want to
hide. but it makes it explicit and predictable.

Martijn

On 3/7/07, Vincent Demay <vi...@anyware-tech.com> wrote:
> I think it will be easier to speek about this in the mailing list ;) .
>
> I agree with the last comment : "then why not simply adding the
> style="display:none" attribute to the component tag, instead of creating
> an additional <span> ?" but without its innnerHtml, only the
> componentTag. I think it should work in all case.
>
> --
> Vincent Demay
> http://wwww.demay-fr.net/blog/
>


-- 
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