Quantcast

How to make visible all child of WebMarkupContainer

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to make visible all child of WebMarkupContainer

Gurpreet.Singh
Hi All,


I  am getting strange problem. Setting WebMarkupContainer.setVisible(true) is not making all its child visible via Ajax Link.

My Html code looks like this

<div wickit:id="wrapper1"><img><a wicked:id="ajaxlink1">Show All</a></div>
<div wickit:id="wrapper2"><img><a wicked:id="ajaxlink2">Show Recent</a></div>

I need to show one of those links at a time. But somehow setting setVisible(true) is not working , but setVisible(false) works

Thanks in Advance for replying

Preet


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make visible all child of WebMarkupContainer

jeremy@wickettraining.com
On Tue, Jun 1, 2010 at 12:25 PM, <[hidden email]> wrote:

> Hi All,
>
>
> I  am getting strange problem. Setting WebMarkupContainer.setVisible(true)
> is not making all its child visible via Ajax Link.
>
> My Html code looks like this
>
> <div wickit:id="wrapper1"><img><a wicked:id="ajaxlink1">Show All</a></div>
> <div wickit:id="wrapper2"><img><a wicked:id="ajaxlink2">Show
> Recent</a></div>
>
> I need to show one of those links at a time. But somehow setting
> setVisible(true) is not working , but setVisible(false) works
>

Is that really your code?  There are multiple typos that would stop stuff
from working.  Please paste real code.

Anyway, if you have setVisible(false) on any children, then calling
setVisible(true) on the parent will not make the children also visible.
However, if the parent (webmarkupcontainer) were not visible, then obviously
the children would not be visible, even though their individual isVisible()
methods would return true.


--
Jeremy Thomerson
http://www.wickettraining.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How to make visible all child of WebMarkupContainer

Gurpreet.Singh
Thanks for replying and sorry about typos. Here is the real code

<div wicket:id="seeAllWrapper"><a href="#" wicket:id="seeAll"> <img src="images/al_faqarrow1_gen.gif" style="vertical-align:middle" border="0"/>See All </a></div>
    <div wicket:id="seeRecentWrapper"><a href="#" wicket:id="seeRecent"><img src="images/al_faqarrow1_gen.gif" style="vertical-align:middle" border="0"/> View Most Recent </a></div>

seeAll and seeRecent links visibility is set to default , which I assume is true.

Initialy seeRecentWrapper visibility is set to false and seeAllWrapper visibility is set to true.

On click on seeAll Ajax link I am setting seeRecentWrapper.setVisible(true) and seeAllWrapper.setVisble(false)

On click on seeRecent Ajax link I am setting seeRecentWrapper.setVisible(false) and seeAllWrapper.setVisble(true)

If setting parent component visibility does not affect its child visibility So not sure why links doesn't show up. Any idea?

-----Original Message-----
From: Jeremy Thomerson [mailto:[hidden email]]
Sent: Tuesday, June 01, 2010 10:36 AM
To: [hidden email]
Subject: Re: How to make visible all child of WebMarkupContainer

On Tue, Jun 1, 2010 at 12:25 PM, <[hidden email]> wrote:

> Hi All,
>
>
> I  am getting strange problem. Setting WebMarkupContainer.setVisible(true)
> is not making all its child visible via Ajax Link.
>
> My Html code looks like this
>
> <div wickit:id="wrapper1"><img><a wicked:id="ajaxlink1">Show All</a></div>
> <div wickit:id="wrapper2"><img><a wicked:id="ajaxlink2">Show
> Recent</a></div>
>
> I need to show one of those links at a time. But somehow setting
> setVisible(true) is not working , but setVisible(false) works
>

Is that really your code?  There are multiple typos that would stop stuff
from working.  Please paste real code.

Anyway, if you have setVisible(false) on any children, then calling
setVisible(true) on the parent will not make the children also visible.
However, if the parent (webmarkupcontainer) were not visible, then obviously
the children would not be visible, even though their individual isVisible()
methods would return true.


--
Jeremy Thomerson
http://www.wickettraining.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make visible all child of WebMarkupContainer

jeremy@wickettraining.com
On Tue, Jun 1, 2010 at 12:45 PM, <[hidden email]> wrote:

> Thanks for replying and sorry about typos. Here is the real code
>
> <div wicket:id="seeAllWrapper"><a href="#" wicket:id="seeAll"> <img
> src="images/al_faqarrow1_gen.gif" style="vertical-align:middle"
> border="0"/>See All </a></div>
>    <div wicket:id="seeRecentWrapper"><a href="#" wicket:id="seeRecent"><img
> src="images/al_faqarrow1_gen.gif" style="vertical-align:middle" border="0"/>
> View Most Recent </a></div>
>
> seeAll and seeRecent links visibility is set to default , which I assume is
> true.
>
> Initialy seeRecentWrapper visibility is set to false and seeAllWrapper
> visibility is set to true.
>
> On click on seeAll Ajax link I am setting seeRecentWrapper.setVisible(true)
> and seeAllWrapper.setVisble(false)
>
> On click on seeRecent Ajax link I am setting
> seeRecentWrapper.setVisible(false) and seeAllWrapper.setVisble(true)
>
> If setting parent component visibility does not affect its child visibility
> So not sure why links doesn't show up. Any idea?


In both links you will need to add both wrappers to the ajax response.  Are
you doing this?

--
Jeremy Thomerson
http://www.wickettraining.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: How to make visible all child of WebMarkupContainer

Gurpreet.Singh
Yeap I am adding both wrappers to AjaxRequesttarget  like this

  target.addComponent(seeRecentWrapper..setVisible(true));
  target.addComponent(seeAllWrapper..setVisible(false));

From: Jeremy Thomerson [mailto:[hidden email]]
Sent: Tuesday, June 01, 2010 10:59 AM
To: Singh, Gurpreet
Cc: [hidden email]
Subject: Re: How to make visible all child of WebMarkupContainer


On Tue, Jun 1, 2010 at 12:45 PM, <[hidden email]<mailto:[hidden email]>> wrote:
Thanks for replying and sorry about typos. Here is the real code

<div wicket:id="seeAllWrapper"><a href="#" wicket:id="seeAll"> <img src="images/al_faqarrow1_gen.gif" style="vertical-align:middle" border="0"/>See All </a></div>
   <div wicket:id="seeRecentWrapper"><a href="#" wicket:id="seeRecent"><img src="images/al_faqarrow1_gen.gif" style="vertical-align:middle" border="0"/> View Most Recent </a></div>

seeAll and seeRecent links visibility is set to default , which I assume is true.

Initialy seeRecentWrapper visibility is set to false and seeAllWrapper visibility is set to true.

On click on seeAll Ajax link I am setting seeRecentWrapper.setVisible(true) and seeAllWrapper.setVisble(false)

On click on seeRecent Ajax link I am setting seeRecentWrapper.setVisible(false) and seeAllWrapper.setVisble(true)

If setting parent component visibility does not affect its child visibility So not sure why links doesn't show up. Any idea?

In both links you will need to add both wrappers to the ajax response.  Are you doing this?

--
Jeremy Thomerson
http://www.wickettraining.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make visible all child of WebMarkupContainer

jeremy@wickettraining.com
On Tue, Jun 1, 2010 at 1:02 PM, <[hidden email]> wrote:

>  Yeap I am adding both wrappers to AjaxRequesttarget  like this
>
>
>
>   target.addComponent(seeRecentWrapper..setVisible(true));
>
>   target.addComponent(seeAllWrapper..setVisible(false));
>
>
I'm not sure why you have the wrappers at all - they don't seem to add
anything.  Why not just toggle the visibility on the links themselves?  Have
you looked at the ajax debug window to see what's being sent?  Post that
response if you can't figure it out.

--
Jeremy Thomerson
http://www.wickettraining.com
Loading...