Re: How to make visible all child of WebMarkupContainer

2010-06-01 Thread Jeremy Thomerson
On Tue, Jun 1, 2010 at 12:25 PM, gurpreet.si...@wellsfargo.com 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=wrapper1imga wicked:id=ajaxlink1Show All/a/div
 div wickit:id=wrapper2imga wicked:id=ajaxlink2Show
 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


RE: How to make visible all child of WebMarkupContainer

2010-06-01 Thread Gurpreet.Singh
Thanks for replying and sorry about typos. Here is the real code

div wicket:id=seeAllWrappera href=# wicket:id=seeAll img 
src=images/al_faqarrow1_gen.gif style=vertical-align:middle border=0/See 
All /a/div
div wicket:id=seeRecentWrappera href=# wicket:id=seeRecentimg 
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:jer...@wickettraining.com] 
Sent: Tuesday, June 01, 2010 10:36 AM
To: users@wicket.apache.org
Subject: Re: How to make visible all child of WebMarkupContainer

On Tue, Jun 1, 2010 at 12:25 PM, gurpreet.si...@wellsfargo.com 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=wrapper1imga wicked:id=ajaxlink1Show All/a/div
 div wickit:id=wrapper2imga wicked:id=ajaxlink2Show
 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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to make visible all child of WebMarkupContainer

2010-06-01 Thread Jeremy Thomerson
On Tue, Jun 1, 2010 at 12:45 PM, gurpreet.si...@wellsfargo.com wrote:

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

 div wicket:id=seeAllWrappera href=# wicket:id=seeAll img
 src=images/al_faqarrow1_gen.gif style=vertical-align:middle
 border=0/See All /a/div
div wicket:id=seeRecentWrappera href=# wicket:id=seeRecentimg
 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


RE: How to make visible all child of WebMarkupContainer

2010-06-01 Thread 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:jer...@wickettraining.com]
Sent: Tuesday, June 01, 2010 10:59 AM
To: Singh, Gurpreet
Cc: users@wicket.apache.org
Subject: Re: How to make visible all child of WebMarkupContainer


On Tue, Jun 1, 2010 at 12:45 PM, 
gurpreet.si...@wellsfargo.commailto:gurpreet.si...@wellsfargo.com wrote:
Thanks for replying and sorry about typos. Here is the real code

div wicket:id=seeAllWrappera href=# wicket:id=seeAll img 
src=images/al_faqarrow1_gen.gif style=vertical-align:middle border=0/See 
All /a/div
   div wicket:id=seeRecentWrappera href=# wicket:id=seeRecentimg 
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


Re: How to make visible all child of WebMarkupContainer

2010-06-01 Thread Jeremy Thomerson
On Tue, Jun 1, 2010 at 1:02 PM, gurpreet.si...@wellsfargo.com 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