You need to add your component to a RootPanel to view the same on the
screen.
I follow this approach :
- add all your child widgets to one panel
- add this panel to your root panel
syntax :
RootPanel.get("myDiv").add(panel-instance);
the "id" is a an html control id which u need to assign in the HTML
page :
<div id="myDiv"></div>
I hope that helps
On Apr 30, 2:25 am, Google Web Toolkit <[email protected]>
wrote:
> Folks,
>
> Simple question. I want dynamically add a widget, the code below does
> not bring errors, however there is no visual effects that a component
> was added. I tried to manipulate with doLayout, show, set visible - no
> effect. If a component is added in the dialog constructor it is added
> as expected.
> The method setResults is supposed to change container content.
>
> Thanks in advance.
>
> --Zhenia
>
> public class VerificationResultsDialog extends Dialog {
>
> VerificationResultsPanel resPanel;
> Panel contentPanel;
> private static final int WIDTH = 800;
> private static final int HEIGHT = 500;
>
> static VerificationResultsDialog theDialog;
>
> protected VerificationResultsDialog() {
> super(ClientUtility.translate("verif.title"), true, OK |
> CANCEL);
>
> Panel p = new Panel();
> add(p);
> contentPanel = p;
> p.setBaseCls(SimplePanel.SIMPLE_PANEL);
> p.setLayout(new VerticalLayout());
> p.setAutoScroll(true);
> p.add(resPanel = new VerificationResultsPanel());
>
> setWidth(WIDTH);
> setHeight(HEIGHT);
> }
>
> static public VerificationResultsDialog getInstance() {
> if (theDialog == null)
> theDialog = new VerificationResultsDialog();
> return theDialog;
> }
>
> public void setVerificationResults(VerificationStatusData vsd) {
> contentPanel.remove(resPanel, true);
> contentPanel.add(resPanel = new VerificationResultsPanel());
> resPanel.setVisible(true);
> resPanel.show();
> contentPanel.doLayout();
> this.doLayout();
> resPanel.setVerificationResults(vsd);
>
> }
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---