Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show initially hidden DIV with GWT?

Tags:

html

show

gwt

I have a DIV tag which I can made either

display: none; 

or

visibility: hidden;

Then I want to show it with GWT.

But when I am trying to do

RootPanel.get("myid").setVisible(true);

or

RootPanel.get("myid").setVisible(false);

and it has no effect.

I saw in Firebug, that thess functions add "display: none" or remove it in turn. Since there is one explicit "display: none" hardcoded, the DIV is constantly hidden.

So, how can I accomlish the task? Thanks.

like image 820
Dims Avatar asked Dec 06 '25 10:12

Dims


1 Answers

In your JSP

<div id="myid" style="display:none ; width:100%">

In your GWT EntryPoint class

DOM.getElementById("myid").getStyle().setDisplay(Display.BLOCK);
like image 108
Basanth Roy Avatar answered Dec 07 '25 22:12

Basanth Roy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!