You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marek Miglinski <ma...@gmail.com> on 2012/12/17 15:05:35 UTC
problem hiding td element
I have two elements in table:
1. <th id="statusHeader" style="display:block;">Status</th>
2. <td id="statusContainer" style="display:block;"><span wicket:id="status">
enabled</span></td>
And I want to hide them by default, so what I do is:
new WebMarkupContainer("statusContainer").add(new AttributeModifier("style",
true, new Model<String>("display:none;")));
new WebMarkupContainer("statusHeader").add(new AttributeModifier("style",
true, new Model<String>("display:none;")));
But I still see those elements, what am I doing wrong?
Thanks.
RE: problem hiding td element
Posted by Michal Wegrzyn <mi...@onior.com>.
Hi Marek,
Why are you not using #setVisible(boolean)?
BTW. Instead of creating new AttributeModifier you can use its static methods.
Best regards,
MichaĆ
> -----Original Message-----
> From: Marek Miglinski [mailto:marekmoffice@gmail.com]
> Sent: Monday, December 17, 2012 15:06
> To: users@wicket.apache.org
> Subject: problem hiding td element
>
> I have two elements in table:
>
> 1. <th id="statusHeader" style="display:block;">Status</th>
>
> 2. <td id="statusContainer" style="display:block;"><span
> wicket:id="status"> enabled</span></td>
>
>
> And I want to hide them by default, so what I do is:
>
> new WebMarkupContainer("statusContainer").add(new
> AttributeModifier("style", true, new Model<String>("display:none;")));
>
> new WebMarkupContainer("statusHeader").add(new
> AttributeModifier("style", true, new Model<String>("display:none;")));
>
>
> But I still see those elements, what am I doing wrong?
>
>
> Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org