Re: DeckPanel causes Widget to disappear
Arrgh. I thought I was using DeckPanel yesterday and was using StackPanel. The easiest way to debug it will be using firebug. Check to see it's structue after loading - i.e. is the widget a child? Sorry about that! Joe On Mar 4, 8:30 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Joe- What API are you looking at? I only see one DeckPanel.add() method: void add(Widget w) Adds the specified widget to the deck. I've checked both 1.5.2 and 1.5.3. There's an inherited add() method, but it still doesn't match your signature. Are you thinking of TabPanel? On Tue, Mar 3, 2009 at 11:20 PM, Joe Cole profilercorporat...@gmail.com wrote: I think the problem may be that you are not using the deckpanel add methods: DeckPanel.add(String text, Widget widget, boolean asHTML) Can you try that? On Mar 4, 1:44 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
DeckPanel causes Widget to disappear
I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: DeckPanel causes Widget to disappear
Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: DeckPanel causes Widget to disappear
Try adding the deck to the rootpanel before you add the widget to it. I'm not saying this is definitely it, but as a general rule, I try to build up widgets as I nest them, from the outside in, adding them to the DOM as soon as possible. The reason being that if it is not connected, then 100% of 0 is 0. Hence height = 0. The deckpanel (last time I looked) sizes the deck innards to 100%. The SimplePanel doesn't. Ian http://examples.roughian.com 2009/3/4 Robert J. Carr rjc...@gmail.com Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: DeckPanel causes Widget to disappear
Great suggestion, but unfortunately it didn't help. The item I add to the deck is still hidden. Thanks though. Robert On Tue, Mar 3, 2009 at 5:01 PM, Ian Bambury ianbamb...@gmail.com wrote: Try adding the deck to the rootpanel before you add the widget to it. I'm not saying this is definitely it, but as a general rule, I try to build up widgets as I nest them, from the outside in, adding them to the DOM as soon as possible. The reason being that if it is not connected, then 100% of 0 is 0. Hence height = 0. The deckpanel (last time I looked) sizes the deck innards to 100%. The SimplePanel doesn't. Ian http://examples.roughian.com 2009/3/4 Robert J. Carr rjc...@gmail.com Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: DeckPanel causes Widget to disappear
Do you have a (non-)working example you could post (or send privately)? Ian http://examples.roughian.com 2009/3/4 Robert J. Carr rjc...@gmail.com Great suggestion, but unfortunately it didn't help. The item I add to the deck is still hidden. Thanks though. Robert On Tue, Mar 3, 2009 at 5:01 PM, Ian Bambury ianbamb...@gmail.com wrote: Try adding the deck to the rootpanel before you add the widget to it. I'm not saying this is definitely it, but as a general rule, I try to build up widgets as I nest them, from the outside in, adding them to the DOM as soon as possible. The reason being that if it is not connected, then 100% of 0 is 0. Hence height = 0. The deckpanel (last time I looked) sizes the deck innards to 100%. The SimplePanel doesn't. Ian http://examples.roughian.com 2009/3/4 Robert J. Carr rjc...@gmail.com Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: DeckPanel causes Widget to disappear
I think the problem may be that you are not using the deckpanel add methods: DeckPanel.add(String text, Widget widget, boolean asHTML) Can you try that? On Mar 4, 1:44 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: DeckPanel causes Widget to disappear
Hi Joe- What API are you looking at? I only see one DeckPanel.add() method: void add(Widget w) Adds the specified widget to the deck. I've checked both 1.5.2 and 1.5.3. There's an inherited add() method, but it still doesn't match your signature. Are you thinking of TabPanel? On Tue, Mar 3, 2009 at 11:20 PM, Joe Cole profilercorporat...@gmail.com wrote: I think the problem may be that you are not using the deckpanel add methods: DeckPanel.add(String text, Widget widget, boolean asHTML) Can you try that? On Mar 4, 1:44 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---