1

Hy , I am creating an login/logout system with GWT. User is prompted with index.html , enters user , pass , server verify`s it and sands back true or false , this part is done and working. Now i am creating a widget for an administration part. If the response is true i would like to send him to administration widget , i created that too , and works. The problem is that the login screen does not disappear when i use

  RootPanel.get().add(widget);

And i would like to "hide" all the login part...

Razvan
  • 710
  • 3
  • 9
  • 25

3 Answers3

0

Any reason why you can't just wrap all the login stuff in a giant div and have GWT add a style which has display:none when the login is successful?

dty
  • 18,795
  • 6
  • 56
  • 82
0

Widgets will be in the DOM until detached (removed). You'll need to manually remove the widget. Adding another widget will not remove the preceding widget.

RootPanel.get().remove(myWidget);

Or add a class to it:

myWidgetInstantiation.getStyle().setVisible(VISIBILITY.Hidden);
Joseph Lust
  • 19,340
  • 7
  • 85
  • 83
0

Read this: Multiple pages tutorial in Google Web Toolkit (GWT)

It goes over how to have multiple "pages" within the context of GWT. The guide is a little out of date but should help move in the right direction.

Community
  • 1
  • 1
Chris Ruffalo
  • 1,903
  • 12
  • 17