Adjust HTMLPanel Height as paer srcdoc content
I have an HTMPLPanel, It has an Iframeelement inside it. for Iframe I had set srcdoc attribute which is content of an input HTML page. Content is shown fine, but there are display issues the way it is shown. 1. Scroll is hidden for both panel and frame 2. 2.There is still scroll shown, I feel it comes from HTML 3. 3.But content shown in very small portion and scroll appears always.even for small HTML content. Somehow I am not able to increase height of HTML panel so that if content is small it would be visible as a full. Can anybody provide suggestions -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Click even on outer HTMLPanel on existing html ?
Can somebody please give me some tips on how to solve this ? How to get the click events on the outer div html, loaded in an HTMLPanel? Thank you, Ed On Tuesday, 12 January 2016 11:53:03 UTC+1, Ed wrote: > > Please some advice on this issue ? > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Click even on outer HTMLPanel on existing html ?
stupid suggestion but do you sink the events you want to listen for? On Tue, Jan 26, 2016 at 11:00 PM, Ed <post2edb...@gmail.com> wrote: > Can somebody please give me some tips on how to solve this ? > How to get the click events on the outer div html, loaded in an HTMLPanel? > Thank you, Ed > > > On Tuesday, 12 January 2016 11:53:03 UTC+1, Ed wrote: >> >> Please some advice on this issue ? >> > -- > You received this message because you are subscribed to the Google Groups > "GWT Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-web-toolkit+unsubscr...@googlegroups.com. > To post to this group, send email to google-web-toolkit@googlegroups.com. > Visit this group at https://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- Vassilis Virvilis -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Click even on outer HTMLPanel on existing html ?
Yes I do (as DomHandler: ClickEvent.getType()) that's why I don't understand I don't catch any. I get the idea the events aren't bubbled up (passed through), because the loaded html in the HTMLPanel exists of existing html instead of creating it through gwt, such that events are passed through... On 26 January 2016 at 22:02, Vassilis Virvilis <vasv...@gmail.com> wrote: > stupid suggestion but do you sink the events you want to listen for? > > On Tue, Jan 26, 2016 at 11:00 PM, Ed <post2edb...@gmail.com> wrote: > >> Can somebody please give me some tips on how to solve this ? >> How to get the click events on the outer div html, loaded in an HTMLPanel? >> Thank you, Ed >> >> >> On Tuesday, 12 January 2016 11:53:03 UTC+1, Ed wrote: >>> >>> Please some advice on this issue ? >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "GWT Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to google-web-toolkit+unsubscr...@googlegroups.com. >> To post to this group, send email to google-web-toolkit@googlegroups.com. >> Visit this group at https://groups.google.com/group/google-web-toolkit. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Vassilis Virvilis > > -- > You received this message because you are subscribed to a topic in the > Google Groups "GWT Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-web-toolkit/60RGI3WN1W0/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > google-web-toolkit+unsubscr...@googlegroups.com. > To post to this group, send email to google-web-toolkit@googlegroups.com. > Visit this group at https://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Click even on outer HTMLPanel on existing html ?
> stupid suggestion but do you sink the events you want to listen for? > addDomHandler() automatically sinks the corresponding native event type. You only need to sink events yourself when you override onBrowserEvent() to handle native events without registering a handler using addDomHandler(). I know that HTMLPanel.addDomHandler(ClickHandler, ClickEvent.getType()) works as expected as our app uses it. However it does not use HTMLPanel.wrap(). -- J. -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Click even on outer HTMLPanel on existing html ?
Hmmm,, so it should work for existing html, that is loaded from an xml file (so no wrap is needed). On 26 January 2016 at 23:31, Jenswrote: > > stupid suggestion but do you sink the events you want to listen for? >> > > addDomHandler() automatically sinks the corresponding native event type. > You only need to sink events yourself when you override onBrowserEvent() to > handle native events without registering a handler using addDomHandler(). > > I know that HTMLPanel.addDomHandler(ClickHandler, ClickEvent.getType()) > works as expected as our app uses it. However it does not use > HTMLPanel.wrap(). > > -- J. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "GWT Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-web-toolkit/60RGI3WN1W0/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > google-web-toolkit+unsubscr...@googlegroups.com. > To post to this group, send email to google-web-toolkit@googlegroups.com. > Visit this group at https://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
adding a background-image to the body or to an HTMLPanel
Hello! I'd like to add a background-image to the body element or at least to a HTMLPanel in the UIBinder xml file. Here's my code: http://dl.google.com/gwt/DTD/xhtml.ent;> public class LoginView extends Composite implements ILoginView { @UiTemplate("LoginView.ui.xml") interface LoginUiBinder extends UiBinder<Widget, LoginView> { } private static LoginUiBinder uiBinder = GWT.create(LoginUiBinder.class); @UiField TextBox matrnrTextBox; @UiField PasswordTextBox passwordTextBox; @UiField Button loginButton; private ILoginPresenter presenter; @UiField(provided = true) final MyResources res; public LoginView() { this.res = MyResources.INSTANCE; res.loginCss().ensureInjected(); initWidget(uiBinder.createAndBindUi(this)); } @UiHandler("loginButton") void onClick(ClickEvent e) { if (presenter != null) { presenter.onLoginButtonClicked(username, password); } } } @Override public Widget asWidget() { return this; } @Override public void setName(String helloName) { } @Override public void setPresenter(ILoginPresenter presenter) { this.presenter = presenter; } } public interface MyResources extends ClientBundle { public static final MyResources INSTANCE = GWT.create(MyResources.class); @Source("css/login.css") public MyLoginCssResource loginCss(); @Source("css/GWT_App.css") public CommonCss GWT_AppCss(); @Source("img/logo.png") ImageResource logo(); } public interface CommonCss extends CssResource { String panel(); } GWT_App.css @sprite .panel { gwt-image: 'logo'; background-color: red; } When I use the image in a g:Image element, the image is displayed (not as background, of course) How can I add a background-image directly to the body? Is this possible using UIBinders? How can I generally style the body using UIBinders? And if that's not possible, how can I add a background-image to the HTMLPanel? -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Click even on outer HTMLPanel on existing html ?
Please some advice on this issue ? -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Click even on outer HTMLPanel on existing html ?
I load a piece of html from an external file and add wrap it in a HTMLPanel, and add a ClickHandler to the HTMLPanel to catch click events anywhere on the loaded html. However, that doesn't work, I not catch any click event :( The click handler is added as Dom handler. However, if I add a TextBox, the click handler will receive clicks made on the added TextBox. So event do bubble up on new widgets that are added, but not on existing html. I thought it might be because of bootstrap css that I use (container, row and col styles), but removing them had no effect. The HTMLPanel has a background color and is wrapping all loaded html. How to solve this? - Ed -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Creating a widget that can accept HTML + Widgets in UiBinder (Without using HTMLPanel)
Hi, I'm trying to create a container widget which can accept html within uibinder files, without extending from HTMLPanel. If I try to implement `HasHTML`, then I can only pass in HTML without being able to pass any widgets. If I try to extend from ComplexPanel and override the add(Widget child) method, same as HTMLPanel does, then passing in HTML doesn't work. Surely UiBinder isn't hard-coded to only allow HtmlPanel to accept panels + widgets? I'm trying to reduce the amount of boilerplate needed for displaying a form. (Right now I have to use a FormPanel containing a HtmlPanel which contains the actual form code. I'd like to be able to just use one widget which contains my html embdedded within the formPanel and HtmlPanel) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Creating a widget that can accept HTML + Widgets in UiBinder (Without using HTMLPanel)
Surely UiBinder isn't hard-coded to only allow HtmlPanel to accept panels + widgets? HTMLPanel has its own HTMLPanelParser used by UiBinder which makes mixing HTML + Widgets possible, so yes it is kind of hardcoded. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Creating a widget that can accept HTML + Widgets in UiBinder (Without using HTMLPanel)
IMO that parser interface should be made external and it should allow any widget that implements this interface to have html within UiBinder. I'm surprised it wasn't done that way to begin with. On Tue, Mar 24, 2015 at 9:11 PM, Jens jens.nehlme...@gmail.com wrote: Surely UiBinder isn't hard-coded to only allow HtmlPanel to accept panels + widgets? HTMLPanel has its own HTMLPanelParser used by UiBinder which makes mixing HTML + Widgets possible, so yes it is kind of hardcoded. -- J. -- You received this message because you are subscribed to a topic in the Google Groups Google Web Toolkit group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/4DFGQF3oIYg/unsubscribe . To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: How to figure out HTMLPanel rendering is complete
Thanks for the reply. Since we do NOT want to make a server call until the rendering is complete I am not sure if scheduleDeferred would help. Please correct if I am wrong. On Saturday, 18 October 2014 00:42:44 UTC+5:30, Raphael Garnier wrote: Hi, Maybe you could use scheduleDeferred of Scheduler to run code when the DOM is done. See http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/client/Scheduler.html#scheduleDeferred(com.google.gwt.core.client.Scheduler.ScheduledCommand) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: How to figure out HTMLPanel rendering is complete
Thanks for your suggestions. Yes, we are doing incremental loading. I will try out your suggestions. On Saturday, 18 October 2014 03:23:29 UTC+5:30, Steve C wrote: I'm guessing that you're doing incremental loading - that as soon as the user reaches the bottom of the current content, you get more? You could remove the scroll handler when you start to load the HTML, and then restore it when the HTML has been received. Or have the loading mechanism set a flag and unset it when done, and the scroll handler checks that flag before doing anything (maybe better to use an integer count, increment when starting load, decrement when complete, and scrolll handler only works when it's zero). But, if there are images in the received content, they will be loading asynchronously after that, which will affect the size of the content. The best* way I can think of to handle that is to scan the received HTML looking for img tags, and then add a native JS load/error handler to each one, and keep a running count. The load handler would decrement the count, and, when it reaches 0, all images will be loaded. You might still need a deferred command, since just because the image has loaded doesn't mean that the DOM has reflowed. *Maybe the second best way. If you used an iframe as your loader instead of GWT's Ajax mechanism, you could set a readystatechange handler. readyState 4 is supposed to mean that everything has been received, including images. But, I don't know how well supported that is across browsers. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: How to figure out HTMLPanel rendering is complete
I think there are three things that need to happen each time you get more content, at least two of which are asynchronous: 1. your ajax call to get content, asynchronous 2. when you place received HTML code into document, browser will start to render HTML, but without the images yet. I believe that if you run the deferred command as suggested just after setting the HTML content into the panel, it will run when the HTML is fully rendered, but w/o any images in place 3. browser will start to load referenced images (from img tags src attributes) and other items with src, possibly in parallel with the rendering of the HTML If you really don't want to start loading any new content until the HTML and images are fully loaded, then you would need some mechanism to know when all the images are complete. You might actually want to still use a deferred command at this point, since the point in time where images are loaded is probably earlier than the point where they are actually rendered. You can help out the process if you control the incoming HTML, by using height and width attributes in the img tags. That way the placeholders will be sized immediately, and you wouldn't have to wait until they have loaded. Unfortunately, I believe that this gets in the way of responsive design, since it prevents a max-width css rule from working correctly. On Tuesday, October 21, 2014 9:13:22 AM UTC-4, sch wrote: Thanks for the reply. Since we do NOT want to make a server call until the rendering is complete I am not sure if scheduleDeferred would help. Please correct if I am wrong. On Saturday, 18 October 2014 00:42:44 UTC+5:30, Raphael Garnier wrote: Hi, Maybe you could use scheduleDeferred of Scheduler to run code when the DOM is done. See http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/client/Scheduler.html#scheduleDeferred(com.google.gwt.core.client.Scheduler.ScheduledCommand) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
How to figure out HTMLPanel rendering is complete
I am working on an application which fetches HTML content from the server and displays it to the user. The content fetched from the server is a complete HTML document. I have used UiBinder to specify UI for the view. g:HTMLPanel ui:field=mainPanel styleName=ap-mainPanel/g:HTMLPanel In the view I have setViewerContent(String content) method and also a member panel for holding content[contentPanel] public void setViewerContent(String content){ contentPanel = new HTMLPanel(content); contentPanel.setStyleName(ap-mainPanel ap-scrollPanel); //$NON-NLS-1$ contentPanel.addAttachHandler(new AttachEvent.Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if(event.isAttached()) { System.out.println(-- rendering complete --); isRenderComplete = true; } } }); mainPanel.clear(); mainPanel.add(contentPanel); addScrollHandler();} I add a scroll handler to the contentPanel which listens to the ScrollEvent and onScroll() calls the appropriate methods to fetch content from the server based on whether scroll is at the top or bottom. public void addScrollHandler() { Event.sinkEvents(contentPanel.getElement(), Event.ONSCROLL); contentPanel.addHandler(this, ScrollEvent.getType());} public void onScroll( ScrollEvent event ){ if( HelperUtils.isScrollAtBottom( event.getSource() ) ) { if(isRenderComplete) { System.out.println(-- Process Down scroll START--); isRenderComplete = false; getUiHandlers().reachedMaxVerticalScrollPostion(); System.out.println(-- Process Down scroll END--); } } if( HelperUtils.isScrollAtTop( event.getSource() ) ) { if(isRenderComplete) { System.out.println(-- Process Up scroll START--); isRenderComplete = false; getUiHandlers().reachedMinVerticalScrollPostion(); System.out.println(-- Process Up scroll END --); } }} The problem I was facing was as we render the content I see calls made to the server to fetch content continuously. New scroll events are being fired while the content fetched from the server is being rendered. We would not want this i.e while the content is being rendered we do not want the ScrollEvent to be fired. I tried the above code where I have attached AttachEvent.Handler() to contentPanel. A flag isRenderComplete is maintained which is turned true on contentPanel attach. This flag is used in the onScroll method before triggering any server call.This approach seems to work. But I am not sure if this is the correct one. Does anyone has any better solution[s] ?If the content has images and other external stuff will they be loaded before AttachEvent is fired ? Also since we are creating new contentPanel everytime each fetch takes the scrollbar to the top. I tried to add a new HTMLPanel markerPanel with couple of line breaks to the contentPanel. Then in the onAttachOrDetach() of contentPanel tried to scroll to the markerPanel. This did not work. public void setViewerContent(String content){ contentPanel = new HTMLPanel(content); markerPanel = new HTMLPanel( br br ); contentPanel.setStyleName(ap-mainPanel ap-scrollPanel); //$NON-NLS-1$ contentPanel.addAttachHandler(new AttachEvent.Handler() { @Override public void onAttachOrDetach(AttachEvent event) { System.out.println(-- rendering complete --); if(event.isAttached()) { markerPanel.getElement().scrollIntoView(); isRenderComplete = true; } } }); mainPanel.clear(); contentPanel.add(markerPanel); mainPanel.add(contentPanel); addScrollHandler();} Any suggestions ? we want the scroll to be at the bottom when we fetch new content and the scroll event should not be fired till the content fetched is rendered completely. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
How to figure out HTMLPanel rendering is complete
Hi, Maybe you could use scheduleDeferred of Scheduler to run code when the DOM is done. See http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/client/Scheduler.html#scheduleDeferred(com.google.gwt.core.client.Scheduler.ScheduledCommand) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: How to figure out HTMLPanel rendering is complete
I'm guessing that you're doing incremental loading - that as soon as the user reaches the bottom of the current content, you get more? You could remove the scroll handler when you start to load the HTML, and then restore it when the HTML has been received. Or have the loading mechanism set a flag and unset it when done, and the scroll handler checks that flag before doing anything (maybe better to use an integer count, increment when starting load, decrement when complete, and scrolll handler only works when it's zero. But, if there are images in the received content, they will be loading asynchronously after that, which will affect the size of the content. The best* way I can think of to handle that is to scan the received HTML looking for img tags, and then add a native JS load/error handler to each one, and keep a running count. the load handler would decrement the count, and, when it reaches 0, all images will be loaded. You might still need a deferred command, since just because the image has loaded doesn't mean that the DOM has reflowed. *Maybe the second best way. If you used an iframe as your loader instead of GWT's Ajax mechanism, you could set a readystatechange handler. ReadyState 4 is supposed to mean that everything has been received, including images. But, I don't know how well supported that is across browsers. On Friday, October 17, 2014 8:34:25 AM UTC-4, sch wrote: I am working on an application which fetches HTML content from the server and displays it to the user. The content fetched from the server is a complete HTML document. I have used UiBinder to specify UI for the view. g:HTMLPanel ui:field=mainPanel styleName=ap-mainPanel/g:HTMLPanel In the view I have setViewerContent(String content) method and also a member panel for holding content[contentPanel] public void setViewerContent(String content){ contentPanel = new HTMLPanel(content); contentPanel.setStyleName(ap-mainPanel ap-scrollPanel); //$NON-NLS-1$ contentPanel.addAttachHandler(new AttachEvent.Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if(event.isAttached()) { System.out.println(-- rendering complete --); isRenderComplete = true; } } }); mainPanel.clear(); mainPanel.add(contentPanel); addScrollHandler();} I add a scroll handler to the contentPanel which listens to the ScrollEvent and onScroll() calls the appropriate methods to fetch content from the server based on whether scroll is at the top or bottom. public void addScrollHandler() { Event.sinkEvents(contentPanel.getElement(), Event.ONSCROLL); contentPanel.addHandler(this, ScrollEvent.getType());} public void onScroll( ScrollEvent event ){ if( HelperUtils.isScrollAtBottom( event.getSource() ) ) { if(isRenderComplete) { System.out.println(-- Process Down scroll START--); isRenderComplete = false; getUiHandlers().reachedMaxVerticalScrollPostion(); System.out.println(-- Process Down scroll END--); } } if( HelperUtils.isScrollAtTop( event.getSource() ) ) { if(isRenderComplete) { System.out.println(-- Process Up scroll START--); isRenderComplete = false; getUiHandlers().reachedMinVerticalScrollPostion(); System.out.println(-- Process Up scroll END --); } }} The problem I was facing was as we render the content I see calls made to the server to fetch content continuously. New scroll events are being fired while the content fetched from the server is being rendered. We would not want this i.e while the content is being rendered we do not want the ScrollEvent to be fired. I tried the above code where I have attached AttachEvent.Handler() to contentPanel. A flag isRenderComplete is maintained which is turned true on contentPanel attach. This flag is used in the onScroll method before triggering any server call.This approach seems to work. But I am not sure if this is the correct one. Does anyone has any better solution[s] ?If the content has images and other external stuff will they be loaded before AttachEvent is fired ? Also since we are creating new contentPanel everytime each fetch takes the scrollbar to the top. I tried to add a new HTMLPanel markerPanel with couple of line breaks to the contentPanel. Then in the onAttachOrDetach() of contentPanel tried to scroll to the markerPanel. This did not work. public void setViewerContent(String content){ contentPanel = new HTMLPanel(content); markerPanel = new HTMLPanel( br br ); contentPanel.setStyleName(ap-mainPanel ap-scrollPanel); //$NON-NLS-1$ contentPanel.addAttachHandler(new AttachEvent.Handler() { @Override public void
Re: How to figure out HTMLPanel rendering is complete
I'm guessing that you're doing incremental loading - that as soon as the user reaches the bottom of the current content, you get more? You could remove the scroll handler when you start to load the HTML, and then restore it when the HTML has been received. Or have the loading mechanism set a flag and unset it when done, and the scroll handler checks that flag before doing anything (maybe better to use an integer count, increment when starting load, decrement when complete, and scrolll handler only works when it's zero). But, if there are images in the received content, they will be loading asynchronously after that, which will affect the size of the content. The best* way I can think of to handle that is to scan the received HTML looking for img tags, and then add a native JS load/error handler to each one, and keep a running count. The load handler would decrement the count, and, when it reaches 0, all images will be loaded. You might still need a deferred command, since just because the image has loaded doesn't mean that the DOM has reflowed. *Maybe the second best way. If you used an iframe as your loader instead of GWT's Ajax mechanism, you could set a readystatechange handler. readyState 4 is supposed to mean that everything has been received, including images. But, I don't know how well supported that is across browsers. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Exception-undefined is not a function(While adding anchor to htmlpanel)
Hi, I am getting exception while adding the Anchor to HTMLPanel,Below is the code private HTMLPanel panel; private HorizontalPanel hPanel=new HorizontalPanel();; Anchor anchor=new Anchor(); anchor.setVisible(true); anchor.getElement().setPropertyString(id, hintButton); public void createPanel(String title){ if(panel!=null){ hPanel.remove(panel); } panel=new HTMLPanel(title); panel.add(anchor); //exception while adding anchor to HTMLPanel second time hPanel.add(panel); } the above code is working fine ,its creating the htmlpanel with anchor and executing fine for firstTime.When i am calling the Method createPanel for second Time its giving the below exception. 11:27:41.673 [ERROR] [demowidgetlibrary] Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:125) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177) at com.google.gwt.user.client.ui.ValueBoxBase.onBrowserEvent(ValueBoxBase.java:252) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1467) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1406) at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:323) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:347) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:745) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.dom.client.Node$.removeChild$(Node.java) at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:71) at com.google.gwt.user.client.ui.Widget.removeFromParent(Widget.java:202) at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:96) at com.google.gwt.user.client.ui.HTMLPanel.add(HTMLPanel.java:150) at com.jenzabar.jx.ui.widgets.item.LabelBoxField.createHTMLPanel(LabelBoxField.java:200) at com.jenzabar.jx.ui.widgets.item.LabelBoxField.setRequiredTitle(LabelBoxField.java:111) at com.jenzabar.jx.ui.widgets.base.FormField.setRequiredErrorOnBlur(FormField.java:288
Re: Exception-undefined is not a function(While adding anchor to htmlpanel)
There might have been an error injecting the JSNI into the page. I'd strongly suggest you try Super Dev Mode (this will be the default in GWT 2.7; I'd suggest you try 2.7.0-SNAPSHOT, JARs are available from https://oss.sonatype.org/content/repositories/google-snapshots/com/google/gwt/ , the very latest JARs built last night have superDevMode turned on by default when you launch the DevMode). On Wednesday, October 8, 2014 8:12:29 AM UTC+2, Mohammed Sameen wrote: Hi, I am getting exception while adding the Anchor to HTMLPanel,Below is the code private HTMLPanel panel; private HorizontalPanel hPanel=new HorizontalPanel();; Anchor anchor=new Anchor(); anchor.setVisible(true); anchor.getElement().setPropertyString(id, hintButton); public void createPanel(String title){ if(panel!=null){ hPanel.remove(panel); } panel=new HTMLPanel(title); panel.add(anchor); //exception while adding anchor to HTMLPanel second time hPanel.add(panel); } the above code is working fine ,its creating the htmlpanel with anchor and executing fine for firstTime.When i am calling the Method createPanel for second Time its giving the below exception. 11:27:41.673 [ERROR] [demowidgetlibrary] Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:125) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177) at com.google.gwt.user.client.ui.ValueBoxBase.onBrowserEvent(ValueBoxBase.java:252) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1467) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1406) at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:323) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:347) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:745) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.dom.client.Node$.removeChild$(Node.java) at com.google.gwt.user.client.ui.ComplexPanel.remove
Re: Exception-undefined is not a function(While adding anchor to htmlpanel)
Thanks Thomas,But i cant upgrade to GWT 2.7 right now i am using 2.6.Is there any other way? On Wednesday, October 8, 2014 11:42:29 AM UTC+5:30, Mohammed Sameen wrote: Hi, I am getting exception while adding the Anchor to HTMLPanel,Below is the code private HTMLPanel panel; private HorizontalPanel hPanel=new HorizontalPanel();; Anchor anchor=new Anchor(); anchor.setVisible(true); anchor.getElement().setPropertyString(id, hintButton); public void createPanel(String title){ if(panel!=null){ hPanel.remove(panel); } panel=new HTMLPanel(title); panel.add(anchor); //exception while adding anchor to HTMLPanel second time hPanel.add(panel); } the above code is working fine ,its creating the htmlpanel with anchor and executing fine for firstTime.When i am calling the Method createPanel for second Time its giving the below exception. 11:27:41.673 [ERROR] [demowidgetlibrary] Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:125) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177) at com.google.gwt.user.client.ui.ValueBoxBase.onBrowserEvent(ValueBoxBase.java:252) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1467) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1406) at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:323) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:347) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:745) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.dom.client.Node$.removeChild$(Node.java) at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:71) at com.google.gwt.user.client.ui.Widget.removeFromParent(Widget.java:202) at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:96) at com.google.gwt.user.client.ui.HTMLPanel.add(HTMLPanel.java:150
Re: Exception-undefined is not a function(While adding anchor to htmlpanel)
Hi.. Since anchor is global variable, and you are trying to remove the parent widget means (panel) so anchor reference will also remove from the parent and the reference will be setting as null, when you call the createPanel() method second time, anchor reference will be null, so panel.add(anchor);. It will throw an exception. Try to add null check for anchor also or create a new instance of anchor. Hope It will work. Thanks. Naveen. On Wed, Oct 8, 2014 at 4:18 PM, Mohammed Sameen sameen@gmail.com wrote: Thanks Thomas,But i cant upgrade to GWT 2.7 right now i am using 2.6.Is there any other way? On Wednesday, October 8, 2014 11:42:29 AM UTC+5:30, Mohammed Sameen wrote: Hi, I am getting exception while adding the Anchor to HTMLPanel,Below is the code private HTMLPanel panel; private HorizontalPanel hPanel=new HorizontalPanel();; Anchor anchor=new Anchor(); anchor.setVisible(true); anchor.getElement().setPropertyString(id, hintButton); public void createPanel(String title){ if(panel!=null){ hPanel.remove(panel); } panel=new HTMLPanel(title); panel.add(anchor); //exception while adding anchor to HTMLPanel second time hPanel.add(panel); } the above code is working fine ,its creating the htmlpanel with anchor and executing fine for firstTime.When i am calling the Method createPanel for second Time its giving the below exception. 11:27:41.673 [ERROR] [demowidgetlibrary] Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/ gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.event.shared.HandlerManager.fireEvent( HandlerManager.java:129) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.dom.client.DomEvent. fireNativeEvent(DomEvent.java:125) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget. java:177) at com.google.gwt.user.client.ui.ValueBoxBase.onBrowserEvent( ValueBoxBase.java:252) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1467) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1406) at com.google.gwt.user.client.impl.DOMImplStandard. dispatchEvent(DOMImplStandard.java:323) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke( MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke( MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke( OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer. reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript( BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke( ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject( ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject( JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:347) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke( MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke( MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke( OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages( BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection( BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run( BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:745) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/ gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript( BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke( ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject( ModuleSpace.java:284
Re: Exception-undefined is not a function(While adding anchor to htmlpanel)
Thanks Naveen,But its not throwing nullpointer exception i checked that also anchor is intialized its not holding null value.. On Wednesday, October 8, 2014 11:42:29 AM UTC+5:30, Mohammed Sameen wrote: Hi, I am getting exception while adding the Anchor to HTMLPanel,Below is the code private HTMLPanel panel; private HorizontalPanel hPanel=new HorizontalPanel();; Anchor anchor=new Anchor(); anchor.setVisible(true); anchor.getElement().setPropertyString(id, hintButton); public void createPanel(String title){ if(panel!=null){ hPanel.remove(panel); } panel=new HTMLPanel(title); panel.add(anchor); //exception while adding anchor to HTMLPanel second time hPanel.add(panel); } the above code is working fine ,its creating the htmlpanel with anchor and executing fine for firstTime.When i am calling the Method createPanel for second Time its giving the below exception. 11:27:41.673 [ERROR] [demowidgetlibrary] Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:125) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177) at com.google.gwt.user.client.ui.ValueBoxBase.onBrowserEvent(ValueBoxBase.java:252) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1467) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1406) at com.google.gwt.user.client.impl.DOMImplStandard.dispatchEvent(DOMImplStandard.java:323) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:347) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:745) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(40)]): undefined is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.dom.client.Node$.removeChild$(Node.java) at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:71) at com.google.gwt.user.client.ui.Widget.removeFromParent(Widget.java:202) at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:96) at com.google.gwt.user.client.ui.HTMLPanel.add(HTMLPanel.java:150
Re: Exception-undefined is not a function(While adding anchor to htmlpanel)
On Wednesday, October 8, 2014 12:48:50 PM UTC+2, Mohammed Sameen wrote: Thanks Thomas,But i cant upgrade to GWT 2.7 right now i am using 2.6.Is there any other way? Super Dev Mode exists since 2.5, it's just easier to use (and faster!) with 2.7 than in previous versions. To get the ease of use, you could try https://github.com/manolo/superdevmode-launcher-legacy (download https://github.com/manolo/superdevmode-launcher-legacy/blob/master/superdevmode-launcher-legacy.jar?raw=true and put it in your classpath *before* gwt-dev.jar, and don't forget to also add gwt-codeserver.jar, then launch DevMode as usual except passing an additional argument -superDevMode) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Exception while adding anchor button to HTMLPanel..
any suggestion on this? On Tuesday, September 30, 2014 4:44:03 PM UTC+5:30, Mohammed Sameen wrote: While Adding Anchor button to HTMLPanel i am getting the below error. lblPanel = new HTMLPanel(sameen); lblPanel.add(hintButton); 15:28:05.558 [ERROR] [widgetdemo] Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(50)]): Object doesn't support property or method 'removeChild' at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177) at com.google.gwt.user.client.ui.ValueBoxBase.onBrowserEvent(ValueBoxBase.java:252) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:745) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(50)]): Object doesn't support property or method 'removeChild' at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.dom.client.Node$.removeChild$(Node.java) at com.google.gwt.user.client.DOM.removeChild(DOM.java:1023) at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:71) at com.google.gwt.user.client.ui.WidgetCollection$WidgetIterator.remove(WidgetCollection.java:55) at com.google.gwt.user.client.ui.Panel.clear(Panel.java:78) at com.jenzabar.jx.ui.widgets.item.LabelBoxField.createHTMLPanel(LabelBoxField.java:192) at com.jenzabar.jx.ui.widgets.item.LabelBoxField.setRequiredTitle(LabelBoxField.java:111) at com.jenzabar.jx.ui.widgets.base.FormField.setRequiredErrorOnBlur(FormField.java:288) at com.jenzabar.jx.ui.widgets.item.TextBoxField$3.onBlur(TextBoxField.java:130) at com.google.gwt.event.dom.client.BlurEvent.dispatch(BlurEvent.java:56) at com.google.gwt.event.dom.client.BlurEvent.dispatch(BlurEvent.java:1) at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1) at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40
Exception while adding anchor button to HTMLPanel..
While Adding Anchor button to HTMLPanel i am getting the below error. lblPanel = new HTMLPanel(sameen); lblPanel.add(hintButton); 15:28:05.558 [ERROR] [widgetdemo] Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(50)]): Object doesn't support property or method 'removeChild' at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177) at com.google.gwt.user.client.ui.ValueBoxBase.onBrowserEvent(ValueBoxBase.java:252) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:745) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(50)]): Object doesn't support property or method 'removeChild' at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.dom.client.Node$.removeChild$(Node.java) at com.google.gwt.user.client.DOM.removeChild(DOM.java:1023) at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:71) at com.google.gwt.user.client.ui.WidgetCollection$WidgetIterator.remove(WidgetCollection.java:55) at com.google.gwt.user.client.ui.Panel.clear(Panel.java:78) at com.jenzabar.jx.ui.widgets.item.LabelBoxField.createHTMLPanel(LabelBoxField.java:192) at com.jenzabar.jx.ui.widgets.item.LabelBoxField.setRequiredTitle(LabelBoxField.java:111) at com.jenzabar.jx.ui.widgets.base.FormField.setRequiredErrorOnBlur(FormField.java:288) at com.jenzabar.jx.ui.widgets.item.TextBoxField$3.onBlur(TextBoxField.java:130) at com.google.gwt.event.dom.client.BlurEvent.dispatch(BlurEvent.java:56) at com.google.gwt.event.dom.client.BlurEvent.dispatch(BlurEvent.java:1) at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1) at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40) at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193) at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88
Re: Strange behavior of Chrome 35.0.1916 on Windows 7 when add/remove style of HTMLPanel
had the same issue especially with a lot of gwt-bootstrap widgets (NavBar, etc). After upgrading to Chrome 36 the problem went away. On Friday, July 25, 2014 12:41:57 AM UTC+2, Robert Hoffmann wrote: There is a bug report on thishttps:// code.google.com/p/chromium/issues/detail?id=377913 Do you use the AdBlock plugin? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Strange behavior of Chrome 35.0.1916 on Windows 7 when add/remove style of HTMLPanel
There is a bug report on thishttps://code.google.com/p/chromium/issues/detail?id=377913 Do you use the AdBlock plugin? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Strange behavior of Chrome 35.0.1916 on Windows 7 when add/remove style of HTMLPanel
Hi, I have exactly the same problem and I don't find a solution to fix that ! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Strange behavior of Chrome 35.0.1916 on Windows 7 when add/remove style of HTMLPanel
Hi, I ran into very strange behaviour, which happens only in chrome 35/win 7. I use ListBox to change color of HTMLPanel with CssResource. When we change the value in the ListBox, the color of the panel should be changed but nothing happens, when we check the style via Inspect Element the style was changed but visually not applied. Everything works fine until update to version Chrome 35. Is anyone encounter the same problem? Any Ideas why when we change the style using addStyle()/removeStyle() the new style does not take affect? I have no problems with Firefox I use UIBibder. public class SelectorImpl extends Composite { @UiField ListBox listBox; @UiField HTMLPanel panel; interface Style extends CssResource { String red(); String green(); } @UiField Style style; private MapInteger, String colorsMap = new HashMapInteger, String(); private String currentColor; public EmployeeAttendanceSchedulerViewImpl() { ... colorsMap.put(1, style.red()) ; colorsMap.put(2, style.green()); currentColor = style.red(); panel.addStyleName(currentColor); } @UiHandler(listBox) public void onListSelected(ChangeEvent event){ panel.removeStyleName(currentColor); currentColor = colorsMap.get(listBox.getSelectedIndex()); panel.addStyleName(currentColor); } } In ui.xml ui:style type=com.SelectorImpl.Style .red { background-color: #FF; } .green { background-color: #00FF00; } .panelBoxStyle { box-sizing: border-box; border: solid 1px; width: 40px; height: 19px; } /ui:style g:HTMLPanel g:ListBox ui:field=listBox/ g:HTMLPanel ui:field=panel styleName={style.panelBoxStyle}/ /g:HTMLPanel -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: HTMLPanel - How does it work?
I rarely need such flexibility. I tend to use UiBinder for most of my UI needs. In many cases I have enough with just Div/Span elements and basic widgets. On Sat, Apr 26, 2014 at 1:25 PM, Joshua Godi joshuag...@gmail.com wrote: Thanks for the reply. I do want to be able to have (1) widget children, (2) text, (3) html allowed to be written inside this widget. That way it's as flexible as it needs to be. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: HTMLPanel - How does it work?
On Saturday, April 26, 2014 1:25:26 PM UTC+2, Joshua Godi wrote: Thanks for the reply. I do want to be able to have (1) widget children, (2) text, (3) html allowed to be written inside this widget. That way it's as flexible as it needs to be. I don't think it's a good idea. gwt-bootstrap already tried that and they're having issues (e.g. integrating with UiBinder) YMMV FYI, in GWT 2.7, FlowPanel will no longer be div-only, so you could build a FlowPanel that's an H1: https://gwt-review.googlesource.com/6780 For HTML or text, you can then extend HTML or Label and use their protected constructor. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: HTMLPanel - How does it work?
Awesome, thanks for the info! I will just stick to allowing for children only. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: HTMLPanel - How does it work?
You don't need to extend HTMLPanel when all you need is one tag. You can do that by just subclassing Widget instead and call setElement( Document.get().createHElement(1)) in the constructor. Then you can make it implement HasText and HasHTML to set the contents (by using the Element.setInnerText or setInnerHTML methods). f.ex (just typing from the top of my mind, so it can contain some typos): public class HeadingWidget extends Widget implement HasHTML, HasText, HasSafeHtml, TakesValueString { public HeadingWidget( int level) { setElement( Document.get().createHElement(level)); } public setText( String text ) { getElement().setInnerText(text); } public setHTML( String html ) { getElement().setInnerHTML(html); } ... } HTMLPanel is normally used for the case where you need a mix of plain HTML and widgets. It is for example used extensively in UiBinder. It allows you to wrap an existing Element in the provided HTML in an actual widget. On Sat, Apr 26, 2014 at 12:45 AM, Joshua Godi joshuag...@gmail.com wrote: I was curious if anyone could explain how the HTMLPanel works? I am trying to create a custom Heading widget for my GWT Project that extends HTMLPanel but since the heading element can be h1, h2, ..., h6, I am having a hard time getting this to work for HTMLPanel, since it calls into the HTMLPanel(String html) constructor first. I was going to write my own version of the HTMLPanel, any thoughts? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: HTMLPanel - How does it work?
Thanks, I will try that today. :) I do want widgets allowed in this context to, but from your example I think I could pull it off. Thanks again, Joshua On Saturday, April 26, 2014 3:44:05 AM UTC-5, stuckagain wrote: You don't need to extend HTMLPanel when all you need is one tag. You can do that by just subclassing Widget instead and call setElement( Document.get().createHElement(1)) in the constructor. Then you can make it implement HasText and HasHTML to set the contents (by using the Element.setInnerText or setInnerHTML methods). f.ex (just typing from the top of my mind, so it can contain some typos): public class HeadingWidget extends Widget implement HasHTML, HasText, HasSafeHtml, TakesValueString { public HeadingWidget( int level) { setElement( Document.get().createHElement(level)); } public setText( String text ) { getElement().setInnerText(text); } public setHTML( String html ) { getElement().setInnerHTML(html); } ... } HTMLPanel is normally used for the case where you need a mix of plain HTML and widgets. It is for example used extensively in UiBinder. It allows you to wrap an existing Element in the provided HTML in an actual widget. On Sat, Apr 26, 2014 at 12:45 AM, Joshua Godi joshu...@gmail.comjavascript: wrote: I was curious if anyone could explain how the HTMLPanel works? I am trying to create a custom Heading widget for my GWT Project that extends HTMLPanel but since the heading element can be h1, h2, ..., h6, I am having a hard time getting this to work for HTMLPanel, since it calls into the HTMLPanel(String html) constructor first. I was going to write my own version of the HTMLPanel, any thoughts? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com javascript:. To post to this group, send email to google-we...@googlegroups.comjavascript: . Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: HTMLPanel - How does it work?
Thanks for the reply. I do want to be able to have (1) widget children, (2) text, (3) html allowed to be written inside this widget. That way it's as flexible as it needs to be. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
HTMLPanel - How does it work?
I was curious if anyone could explain how the HTMLPanel works? I am trying to create a custom Heading widget for my GWT Project that extends HTMLPanel but since the heading element can be h1, h2, ..., h6, I am having a hard time getting this to work for HTMLPanel, since it calls into the HTMLPanel(String html) constructor first. I was going to write my own version of the HTMLPanel, any thoughts? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
How to make a very long non-stop string (without any space in it) break into many new lines when showing in HTMLPanel?
I have an HTMLPanel inside a FlowPanel which is inside a ScrollPanel like this. g:ScrollPanel g:FlowPanel g:HTMLPanel ui:field=showMessageHTMLPanel width=600px/ /g:FlowPanel /g:ScrollPanel The showMessageHTMLPanel is used to hold the text that user enter a TextArea . I want that the showMessageHTMLPanel should show exactly like how it was displayed in TextArea. Ex,if user types in many sentences in new lines in TextArea, then the showMessageHTMLPanel should show similar like this: This is text1 This is text2. So here is what I did. I uses new SafeHtmlBuilder().appendEscapedLines(message).toSafeHtml(). HTML showMessageHTML = new HTML(new SafeHtmlBuilder().appendEscapedLines(message).toSafeHtml()); getView().getShowMessageHTMLPanel().add(showMessageHTML); The result is that It breaks the lines quite OK, no problem. However, When I type a non-stop very long string ( a String that doesn't have any space on it) into a TextArea. Ex, see this non-stop string: Aa a. As you saw, even this non-stop string has no space, but when typing in TextArea then the string will automatically fall into new lines. Ok, now when I show that non-stop string in getView().getShowMessageHTMLPanel(), it showed the text as one straight line without any line break: Aaaa..a. The user has to scroll the scrollbar to see the complete text. This is unacceptable since it is too hard to see the whole line. Also many urls are non-stop string without spaces. So the user may not be able to copy the url. *How to make a very long non-stop string (without any space in it) break into many new lines when showing in HTMLPanel?* Or *Do you know any other widget that can handle this?* *(**http://stackoverflow.com/questions/22731546/how-to-make-a-very-long-non-stop-string-without-any-space-in-it-break-into-man http://stackoverflow.com/questions/22731546/how-to-make-a-very-long-non-stop-string-without-any-space-in-it-break-into-man)* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: How to make a very long non-stop string (without any space in it) break into many new lines when showing in HTMLPanel?
i found the answer: .messageDisplay{ word-wrap:break-word; } On Sunday, March 30, 2014 12:16:16 AM UTC+11, Tom wrote: I have an HTMLPanel inside a FlowPanel which is inside a ScrollPanel like this. g:ScrollPanel g:FlowPanel g:HTMLPanel ui:field=showMessageHTMLPanel width=600px/ /g:FlowPanel /g:ScrollPanel The showMessageHTMLPanel is used to hold the text that user enter a TextArea. I want that the showMessageHTMLPanel should show exactly like how it was displayed in TextArea. Ex,if user types in many sentences in new lines in TextArea, then the showMessageHTMLPanel should show similar like this: This is text1 This is text2. So here is what I did. I uses new SafeHtmlBuilder().appendEscapedLines(message).toSafeHtml(). HTML showMessageHTML = new HTML(new SafeHtmlBuilder().appendEscapedLines(message).toSafeHtml()); getView().getShowMessageHTMLPanel().add(showMessageHTML); The result is that It breaks the lines quite OK, no problem. However, When I type a non-stop very long string ( a String that doesn't have any space on it) into a TextArea. Ex, see this non-stop string: Aa a. As you saw, even this non-stop string has no space, but when typing in TextArea then the string will automatically fall into new lines. Ok, now when I show that non-stop string in getView().getShowMessageHTMLPanel(), it showed the text as one straight line without any line break: Aaaa..a. The user has to scroll the scrollbar to see the complete text. This is unacceptable since it is too hard to see the whole line. Also many urls are non-stop string without spaces. So the user may not be able to copy the url. *How to make a very long non-stop string (without any space in it) break into many new lines when showing in HTMLPanel?* Or *Do you know any other widget that can handle this?* *(**http://stackoverflow.com/questions/22731546/how-to-make-a-very-long-non-stop-string-without-any-space-in-it-break-into-man http://stackoverflow.com/questions/22731546/how-to-make-a-very-long-non-stop-string-without-any-space-in-it-break-into-man)* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
HTMLPanel cannot remove DivElement inside its node ?
Through getElement() you can retrieve the child element(s) and remove them. I Believe the function is getChildNodes() or something like that. Iterate over the result and remove whatever is appropriate. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
HTMLPanel cannot remove DivElement inside its node ?
Hi, *HTMLPanel panel = new HTMLPanel();// class attribute* * * *public void function()* *{* * panel.clear(); * * Element d3 = DOM.createDiv(); d3.setClassName(N.NN.N().resultSearch_category_title()); d3.setInnerHTML(name);* * panel.getElement().appendChild(d3); * *}* The issue is that *panel *will not remove the divElement...The only thing I am happy with is that, if I use another HTMLPanel instead of the divElement, so then YES, .clear() will remove it. So this involve that I use a lot of HTMLPanel instead of DivElement and I am sure it costs me (the DOM or code will be heavier). Is it possible that the clear() method REALLY remove all child elements (and not only others HTMLPanel) ? Which alternative I have ? Thanks you, -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: HTMLPanel cannot remove DivElement inside its node ?
Build a custom Widget (probably extending Widget directly) that contains your element logic behind named methods. Maybe a D3RenderWidget? GWT's clear() method on widgets only removes child widgets. So it works on the widget abstraction layer and not on the lower element layer. If you attach additional elements to a widget the clear() method does not know that. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
GWT and Xinha - HTMLPanel or popup
Hello, I'm trying to put Xinha editor at GWT. I tried to put it in HTMLPanel but displays only TextArea and as if he performed all the javascript. I tried to run it through the JSNI but still I could not run the editor. I'd rather put the editor within GWT but if someone is able to help me to do it as a popup I will be very grateful. Ends of my time on the project. Thank you very much for your answers. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: HtmlPanel, custom tag and binder
Please file an issue for it. I once had this issue even without using the tag attribute in UiBinder. Actually I could never figure out whats wrong but I had the same LazyDomElement exception. In my case the exception occurs only once in production mode and I was never able to reproduce it. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: HtmlPanel, custom tag and binder
I think you just can't do such a thing (using 'tr' as the tag) The problem is that when parsing trtdspan id='gwt-uid-67-/span/td/tr as innerHTML, the tr and td and simply dropped, so the HTMLPanel's root element actually becaomes the span id='gwt-uid-67'. Try it for yourself: http://jsfiddle.net/7FhnW/ Maybe the IE-specific workaround is no longer needed and we could now createElement(tr).setInnerHTML(tdspan id='gwt-uid-67'/span/td) which would work (at least in Chrome, haven't tested anywhere else). I doubt it though: http://msdn.microsoft.com/en-us/library/ie/ms533897(v=vs.85).aspx The *innerHTML* property is read-only on the *col*http://msdn.microsoft.com/en-us/library/ie/ms535225(v=vs.85).aspx , *colGroup*http://msdn.microsoft.com/en-us/library/ie/ms535227(v=vs.85).aspx , *frameSet*http://msdn.microsoft.com/en-us/library/ie/ms535251(v=vs.85).aspx , *html* http://msdn.microsoft.com/en-us/library/ie/ms535255(v=vs.85).aspx , *head* http://msdn.microsoft.com/en-us/library/ie/ms535252(v=vs.85).aspx , *style*http://msdn.microsoft.com/en-us/library/ie/ms535898(v=vs.85).aspx , *table*http://msdn.microsoft.com/en-us/library/ie/ms535901(v=vs.85).aspx , *tBody*http://msdn.microsoft.com/en-us/library/ie/ms535902(v=vs.85).aspx , *tFoot*http://msdn.microsoft.com/en-us/library/ie/ms535907(v=vs.85).aspx ,*tHead* http://msdn.microsoft.com/en-us/library/ie/ms535909(v=vs.85).aspx , *title*http://msdn.microsoft.com/en-us/library/ie/ms535910(v=vs.85).aspx, and *tr* http://msdn.microsoft.com/en-us/library/ie/ms535911(v=vs.85).aspx objects. Or maybe the IE-specific code could be pushed behind deferred binding. Anyway, I think it's unsafe to use any table element as HTMLPanel's tag. Maybe we should just call it out in the doc… On Tuesday, July 23, 2013 4:56:29 PM UTC+2, David Ignjić wrote: Hello, I have problem with widget: Ui binder file: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui xmlns:t=urn:import:com.umantis.talent.client.thirdappraisal.widget g:HTMLPanel tag=tr tdg:Label ui:field=label/g:Label/td tdg:Label ui:field=period/g:Label/td tdg:Label ui:field=description/g:Label/td tdt:ValueRadioList ui:field=givenAnswer/t:ValueRadioList/td tdg:DoubleBox ui:field=scoreValue/g:DoubleBox/td tdg:TextArea ui:field=givenComment/g:TextArea/td /g:HTMLPanel /ui:UiBinder Java file: package com.umantis.talent.client.thirdappraisal; import java.util.Map; import com.google.gwt.core.client.GWT; import com.google.gwt.editor.client.Editor; import com.google.gwt.text.shared.AbstractRenderer; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.DoubleBox; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.TextArea; import com.google.gwt.user.client.ui.Widget; import com.umantis.talent.client.thirdappraisal.widget.ValueRadioList; import com.umantis.talent.shared.dto.thirdpartyappraisal.ThirdPartyAppraisalQuestionEvaluationModel; public class QuestionEvaluationEditor extends Composite implements EditorThirdPartyAppraisalQuestionEvaluationModel { private static QuestionEvaluationEditorUiBinder uiBinder = GWT.create(QuestionEvaluationEditorUiBinder.class); interface QuestionEvaluationEditorUiBinder extends UiBinderWidget, QuestionEvaluationEditor { } @UiField Label label; @UiField Label period; @UiField Label description; @UiField(provided = true) ValueRadioListLong givenAnswer; @UiField DoubleBox scoreValue; @UiField TextArea givenComment; private MapLong, String dynamicListAnswers; public QuestionEvaluationEditor() { givenAnswer = new ValueRadioListLong(new AbstractRendererLong() { @Override public String render(Long object) { return dynamicListAnswers.get(object); } }); initWidget(uiBinder.createAndBindUi(this)); } public void setDynamicListAnswers(MapLong, String dynamicListAnswers) { this.dynamicListAnswers = dynamicListAnswers; givenAnswer.setAcceptableValues(dynamicListAnswers.keySet()); } } I get the error java.lang.RuntimeException: Cannot find element with id gwt-uid-67. Perhaps it is not attached to the document body. at com.google.gwt.uibinder.client.LazyDomElement.get(LazyDomElement.java:70) at com.umantis.talent.client.thirdappraisal.QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl$Widgets.build_f_HTMLPanel1(QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl.java:89) at
Re: HtmlPanel, custom tag and binder
I think you just can't do such a thing (using 'tr' as the tag) The problem is that when parsing trtdspan id='gwt-uid-67-/span/td/tr as innerHTML, the tr and td and simply dropped, so the HTMLPanel's root element actually becaomes the span id='gwt-uid-67'. Try it for yourself: http://jsfiddle.net/7FhnW/ But if the span id='gwt-uid-' elements are preserved why does LazyDomElement can't find them via Document.get().getElementById()? -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: HtmlPanel, custom tag and binder
On Wednesday, July 24, 2013 11:07:42 AM UTC+2, Jens wrote: I think you just can't do such a thing (using 'tr' as the tag) The problem is that when parsing trtdspan id='gwt-uid-67-/span/td/tr as innerHTML, the tr and td and simply dropped, so the HTMLPanel's root element actually becaomes the span id='gwt-uid-67'. Try it for yourself: http://jsfiddle.net/7FhnW/ But if the span id='gwt-uid-' elements are preserved why does LazyDomElement can't find them via Document.get().getElementById()? Here we'd have multiple spans so the temporary div would contain span id='gwt-uid-1'/spanspan id='gwt-uid-2'/span… and then the HTMLPanel constructor uses getFirstElementChild() on the div to use as the panel's root element, so the HTMLPanel's root element ends up being the first span (rather than the tr) and the other spans are ignored/forgotten/garbage-collected. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: HtmlPanel, custom tag and binder
Here we'd have multiple spans so the temporary div would contain span id='gwt-uid-1'/spanspan id='gwt-uid-2'/span… and then the HTMLPanel constructor uses getFirstElementChild() on the div to use as the panel's root element, so the HTMLPanel's root element ends up being the first span (rather than the tr) and the other spans are ignored/forgotten/garbage-collected. Ah makes sense..maybe this helps me to identify the issue I had. Same exception but without using a custom tag for HTMLPanel. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
HtmlPanel, custom tag and binder
Hello, I have problem with widget: Ui binder file: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui xmlns:t=urn:import:com.umantis.talent.client.thirdappraisal.widget g:HTMLPanel tag=tr tdg:Label ui:field=label/g:Label/td tdg:Label ui:field=period/g:Label/td tdg:Label ui:field=description/g:Label/td tdt:ValueRadioList ui:field=givenAnswer/t:ValueRadioList/td tdg:DoubleBox ui:field=scoreValue/g:DoubleBox/td tdg:TextArea ui:field=givenComment/g:TextArea/td /g:HTMLPanel /ui:UiBinder Java file: package com.umantis.talent.client.thirdappraisal; import java.util.Map; import com.google.gwt.core.client.GWT; import com.google.gwt.editor.client.Editor; import com.google.gwt.text.shared.AbstractRenderer; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.DoubleBox; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.TextArea; import com.google.gwt.user.client.ui.Widget; import com.umantis.talent.client.thirdappraisal.widget.ValueRadioList; import com.umantis.talent.shared.dto.thirdpartyappraisal.ThirdPartyAppraisalQuestionEvaluationModel; public class QuestionEvaluationEditor extends Composite implements EditorThirdPartyAppraisalQuestionEvaluationModel { private static QuestionEvaluationEditorUiBinder uiBinder = GWT.create(QuestionEvaluationEditorUiBinder.class); interface QuestionEvaluationEditorUiBinder extends UiBinderWidget, QuestionEvaluationEditor { } @UiField Label label; @UiField Label period; @UiField Label description; @UiField(provided = true) ValueRadioListLong givenAnswer; @UiField DoubleBox scoreValue; @UiField TextArea givenComment; private MapLong, String dynamicListAnswers; public QuestionEvaluationEditor() { givenAnswer = new ValueRadioListLong(new AbstractRendererLong() { @Override public String render(Long object) { return dynamicListAnswers.get(object); } }); initWidget(uiBinder.createAndBindUi(this)); } public void setDynamicListAnswers(MapLong, String dynamicListAnswers) { this.dynamicListAnswers = dynamicListAnswers; givenAnswer.setAcceptableValues(dynamicListAnswers.keySet()); } } I get the error java.lang.RuntimeException: Cannot find element with id gwt-uid-67. Perhaps it is not attached to the document body. at com.google.gwt.uibinder.client.LazyDomElement.get(LazyDomElement.java:70) at com.umantis.talent.client.thirdappraisal.QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl$Widgets.build_f_HTMLPanel1(QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl.java:89) at com.umantis.talent.client.thirdappraisal.QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl$Widgets.get_f_HTMLPanel1(QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl.java:79) at com.umantis.talent.client.thirdappraisal.QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl$Widgets.access$0(QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl.java:78) at com.umantis.talent.client.thirdappraisal.QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl.createAndBindUi(QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl.java:30) at com.umantis.talent.client.thirdappraisal.QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl.createAndBindUi(QuestionEvaluationEditor_QuestionEvaluationEditorUiBinderImpl.java:1) at com.umantis.talent.client.thirdappraisal.QuestionEvaluationEditor.init(QuestionEvaluationEditor.java:55) But if I change line g:HTMLPanel tag=tr to g:HTMLPanel all working as expected. I looked into source and problem is with this line setElement(scratchDiv.getFirstChildElement()); --this linegetElement().removeFromParent(); Ok How to solve this ?. Thanks David Ignjic -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Needed Urgent Help:How to display PDF conent of page in GWT Panel or frame or HTML in HtmlPanel + source code
This is a nice idea. Unfortunately the PDF drew blank in Firefox, and drew instead of the PDF file a security warning in IE 10. Worked in Chrome and Safari though. (All on Windows.) It also draws with a grey border and some viewing controls you might or might not want. Thanks for the suggestion. On Thursday, November 15, 2012 6:31:51 AM UTC-5, Christof Kaller wrote: Another way is to use google docs for it, then u can actually view it in an iframe as well. try: iframe src= http://docs.google.com/viewer?url=http%3A%2Fwww.maneofsite.com%2FnameOfPDF.pdfembedded=true; width=600 height=780 style=border: none;/iframe Christof -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to avoid unnecessary divs when using UiBinder with a panel, example, HTMLPanel?
Design your widgets well. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
How to avoid unnecessary divs when using UiBinder with a panel, example, HTMLPanel?
When I use Uibinder and want to have an HTMLPanel to hold another widget which is also HTMLPanel, I would have 2 divs, which I only require 1, I don't need the external one. Example: ... ... g:HTMLPanel ui:field=panel / ... ... public void addToPanel(Widget widget) { panel.clear(); panel.add(widget); } How can I avoid having the div of the fathering panel? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
UIBinder HTMLPanel: set background color for entire browser window?
GWT 2.5.1, Eclipse 4.2 using GWT plugin (GPE). I have a Main.ui.xml file thus: !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent; ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.ui ui:style src='GWTtest.css' / g:HTMLPanel stylePrimaryName='{style.main}' span class='{style.about}' placeholder text /span /g:HTMLPanel /ui:UiBinder The main class selector in GWTtest.css specifies only a color -- the color I'd like the browser's page background to be. The page remains white, however. (The span element text renders in the CSS-specified color, so I know the underlying CSS mechanism is working.) In addition to being new to GWT, I'm pretty shallow in HTML. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
HTMLPanel inside DockLayoutPanel does not show up
Hi, I have a HTMLPanel which wraps several components. If I enclose this with a DockLayoutPanel and place it into the center, it is not rendered anymore. g:DockLayoutPanel unit=PCT g:center g:HTMLPanel g:Buttonbr/br/ g:Label /g:HTMLPanel /g:center /g:DockLayoutPanel Why am I seeing an empty screen for this? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
GWT HtmlPanel Disable SafeHTML
Hi, is there a way to disable SafeHTML in the new GWT2.5 HTMLPanel? If I put text in the HTMLPanel, it replaces all my spaces with nbsp; which means it ignores all styles and also the text just runs out of the page if it's long. Have already posted on StackOverflow as well: http://stackoverflow.com/questions/14530012/gwt-htmlpanel-disable-safehtml -- 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. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem with HTMLPanel and method addAndReplaceElement
) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Thread.java:722) Le mercredi 14 novembre 2012 14:36:48 UTC+1, Sarah Konat a écrit : Hi, Here some explanations. If my HTML page contains : div id=cancel_date h3 id=cancel_date_title/h3 table align=center tr td id=cancel_date_labelDetailService/td td id=cancel_date_detailService/td /tr /table /div If my code contains HTMLPanel container = HTMLPanel.wrap(Document.get().getElementById(cancel_date)); public void init(){ container.add(getMyWidget(), cancel_date_detailService); } public void reload(){ container.addAndReplaceElement(getService(), cancel_date_detailService); } The first time I load my page, I initialize it with the method init(). The second time and after, I call the method reload(). The first time I call the method reload(), everything works fine. But after, I have a NoSuchElementException like this : ERROR: Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:69) at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:134) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:1) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395) at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java
Re: Problem with HTMLPanel and method addAndReplaceElement
.onSuccess(MyCellTableFuturDates.java:130) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:1) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395) at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Thread.java:722) Le mercredi 14 novembre 2012 14:36:48 UTC+1, Sarah Konat a écrit : Hi, Here some explanations. If my HTML page contains : div id=cancel_date h3 id=cancel_date_title/h3 table align=center tr td id=cancel_date_labelDetailService/td td id=cancel_date_detailService/td /tr /table /div If my code contains HTMLPanel container = HTMLPanel.wrap(Document.get().getElementById(cancel_date)); public void init(){ container.add(getMyWidget(), cancel_date_detailService); } public void reload(){ container.addAndReplaceElement(getService(), cancel_date_detailService); } The first time I load my page, I initialize it with the method init(). The second time and after, I call the method reload(). The first time I call the method reload(), everything works fine. But after, I have a NoSuchElementException like this : ERROR: Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:69) at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:134) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:1) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395) at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561
Re: Problem with HTMLPanel and method addAndReplaceElement
The method is named addAndReplace so your td element with your id is replaced the first time and does not exist anymore when you try to execute the code a second time. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/v32PT3kPp3UJ. 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: GWT 2.5 change to provided=true for HTMLPanel
Thanks Ryan. That works. Also, this is totally funny: - Forget I've tried to solve this problem before - Find my own question online - Question is already answered it's like time travel. On Monday, August 20, 2012 11:24:16 PM UTC+10, RyanZA wrote: It seems to be an issue with the HTMLPanel itself - it blocks @UiField (provided=true) explicitly. I still have no idea why, unfortunately. Quickest workaround is to remove the (provided=true) part, and then make the HTMLPanel yourself explicitly, and add it to the original one. eg in your code, change: @UiField(provided = true) HTMLPanel pnlContent; to @UiField HTMLPanel pnlContent; and @Override public Widget asWidget() { lblName = new LabelToolItem(row.getStr()); pnlContent = new HTMLPanel(renderer.render(row)); return binder.createAndBindUi(this); } to @Override public Widget asWidget() { lblName = new LabelToolItem(row.getStr()); HTMLPanel pnlContent_temp = new HTMLPanel(renderer.render(row)); Widget w = binder.createAndBindUi(this); pnlContent.add(pnlContent_temp); return w; } On Monday, August 20, 2012 3:52:46 AM UTC+2, Peter Leong wrote: I'm having same problem. Did you find a solution? My code uses 'IsWidget', no Composite: http://subversion.assembla.com/svn/freshcode_public/learn/gwt/src/main/java/biz/freshcode/learn/gwt/client/uispike/gxt/LineItem.java Also, I'm using 2.5.0-rc1 because of the Maven plugin. Pete On Monday, July 23, 2012 4:48:13 AM UTC+10, RyanZA wrote: Previously in GWT 2.4 and below, this would work: UI Binder: g:HTMLPanel ui:field=myPanel / Code: @UiField (provided=true) HTMLPanel myPanel; myPanel = new HTMLPanel(foobar); In GWT 2.5, this now gives an error: (gwt source) // Make sure that, if there is a UiField for this panel, it isn't // (provided = true), as that isn't supported. if (uiField != null uiField.isProvided()) { writer.die(UiField %s for HTMLPanel cannot be provided., fieldName); } Just wondering why provided=true is no longer supported? AFAIK this was the purpose of provided=true in UiBinder? I've now changed the code to have UiBinder create an HTMLPanel for me and then add my widget to it, but this gives an extra unneeded wrapping div in my HTML... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/e-YMXCF_okAJ. 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: Needed Urgent Help:How to display PDF conent of page in GWT Panel or frame or HTML in HtmlPanel + source code
On 14/11/2012 13:52, singh ajay wrote: I am generating PDF file using JRXML using Java JASPEREXPORTMANAGER. but i don't know how to view pdf in gwt UI. any frame or special container require. Most of the time, the PDF file is downloaded, unless the user installed and activated some plugin to show it in the browser, but then it uses the full page. There is at least one (to my knowledge) tentative to make a JavaScript PDF reader, but I am not sure if it is complete. Now, I question the point of your request: either you want to deliver a PDF content, generally to be saved on the user's computer, so you don't need to display it, or you want to deliver some visual content to be displayed in a browser, and then you can use HTML or canvas. I am not sure why you want to display PDF as part of a Web page. -- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 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: Needed Urgent Help:How to display PDF conent of page in GWT Panel or frame or HTML in HtmlPanel + source code
Hi, Philipe is wright. The user needs to install a plug-in. An alternative indeed is using a javascript rendering engine- don't remember the name of it, but know that there is one. Another way is to use google docs for it, then u can actually view it in an iframe as well. try: iframe src= http://docs.google.com/viewer?url=http%3A%2Fwww.maneofsite.com%2FnameOfPDF.pdfembedded=true; width=600 height=780 style=border: none;/iframe Christof 2012/11/15 Philippe Lhoste phi...@gmx.net On 14/11/2012 13:52, singh ajay wrote: I am generating PDF file using JRXML using Java JASPEREXPORTMANAGER. but i don't know how to view pdf in gwt UI. any frame or special container require. Most of the time, the PDF file is downloaded, unless the user installed and activated some plugin to show it in the browser, but then it uses the full page. There is at least one (to my knowledge) tentative to make a JavaScript PDF reader, but I am not sure if it is complete. Now, I question the point of your request: either you want to deliver a PDF content, generally to be saved on the user's computer, so you don't need to display it, or you want to deliver some visual content to be displayed in a browser, and then you can use HTML or canvas. I am not sure why you want to display PDF as part of a Web page. -- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 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.comgoogle-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+** unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/** group/google-web-toolkit?hl=enhttp://groups.google.com/group/google-web-toolkit?hl=en **. -- https://www.xing.com/profile/HansChristof_Kaller Christof Kaller An de Krütpasch 15 47661 Issum T: +49(0)2835-440 724 / M: +49(0)177-23 44 54 8 E: christof.kal...@googlemail.com XING: https://www.xing.com/profile/Christof_Kaller Der Inhalt dieser E-Mail ist vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, daß jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung oder Weitergabe des Inhalts dieser E-Mail unzulässig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. -- 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.
Needed Urgent Help:How to display PDF conent of page in GWT Panel or frame or HTML in HtmlPanel + source code
Hi Folk, can any one help me out with my problem, I am generating PDF file using JRXML using Java JASPEREXPORTMANAGER. but i don't know how to view pdf in gwt UI. any frame or special container require. Do let me know. Ragards, Ajay Singh, Mumbai, India -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/poe_EEzHe90J. 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.
Problem with HTMLPanel and method addAndReplaceElement
Hi, Here some explanations. If my HTML page contains : div id=cancel_date h3 id=cancel_date_title/h3 table align=center tr td id=cancel_date_labelDetailService/td td id=cancel_date_detailService/td /tr /table /div If my code contains HTMLPanel container = HTMLPanel.wrap(Document.get().getElementById(cancel_date)); public void init(){ container.add(getMyWidget(), cancel_date_detailService); } public void reload(){ container.addAndReplaceElement(getService(), cancel_date_detailService); } The first time I load my page, I initialize it with the method init(). The second time and after, I call the method reload(). The first time I call the method reload(), everything works fine. But after, I have a NoSuchElementException like this : ERROR: Uncaught exception escaped com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:69) at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:134) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:1) at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287) at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395) at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Thread.java:722) Caused by: java.util.NoSuchElementException: cancel_date_detailService at com.google.gwt.user.client.ui.HTMLPanel.addAndReplaceElement(HTMLPanel.java:224) at be.mims.bookme.client.gui.FactoryCancelDate.showCancelDate(FactoryCancelDate.java:128) at be.mims.bookme.client.BookMe.show(BookMe.java:277) at be.mims.bookme.client.event.StateEvent.dispatch(StateEvent.java:31) at be.mims.bookme.client.event.StateEvent.dispatch(StateEvent.java:1) at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1) at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40) at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193) at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88) at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:52) at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:67) at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:134) at be.mims.bookme.client.gui.component.MyCellTableFuturDates$7.onSuccess(MyCellTableFuturDates.java:1
Ambiguity on javadoc (HTMLPanel - addAndReplaceElement() )
Hi, I do not understand if addAndReplaceElement() is deprecated or not...because it seems that the alternative of the deprecated function is the same. Can you confirm ? (the link in the javadoc refers to eactly the same function). I just want to know if I should use this function or not... Thanks you, addAndReplaceElement @Deprecatedpublic void *addAndReplaceElement*(Widget http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/user/client/ui/Widget.html widget, Element http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/user/client/Element.html toReplace) *Deprecated.* *use addAndReplaceElement(Widget, Element)http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/user/client/ui/HTMLPanel.html#addAndReplaceElement(com.google.gwt.user.client.ui.Widget, com.google.gwt.user.client.Element)* Adds a child widget to the panel, replacing the HTML element. *Parameters:*widget - the widget to be addedtoReplace - the element to be replaced by the widget -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/6MdGZwhcYWEJ. 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: Ambiguity on javadoc (HTMLPanel - addAndReplaceElement() )
If you look carefully at the source code, you'll see that there are two methods called addAndReplaceElement(Widget, Element), it's just that one of them uses com.google.gwt.dom.client.Element and the other uses com.google.gwt.user.client.Element It's the com.google.gwt.user.client.Element version that's marked as deprecated. In the generated javadoc, click on the link from the deprecated method and it takes you to the same deprecated method. But the source code indicates the overloaded method instead. It looks like the generated javadoc doesn't accurately reflect the source code. Paul On 12/09/12 16:17, regnoult axel wrote: Hi, I do not understand if addAndReplaceElement() is deprecated or not...because it seems that the alternative of the deprecated function is the same. Can you confirm ? (the link in the javadoc refers to eactly the same function). I just want to know if I should use this function or not... Thanks you, addAndReplaceElement @Deprecated public void *addAndReplaceElement*(Widget http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/user/client/ui/Widget.html widget, Element http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/user/client/Element.html toReplace) *Deprecated.* /use |addAndReplaceElement(Widget, Element)| http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/user/client/ui/HTMLPanel.html#addAndReplaceElement%28com.google.gwt.user.client.ui.Widget,%20com.google.gwt.user.client.Element%29/ Adds a child widget to the panel, replacing the HTML element. *Parameters:* |widget| - the widget to be added |toReplace| - the element to be replaced by the widget -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/6MdGZwhcYWEJ. 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. -- 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: Ambiguity on javadoc (HTMLPanel - addAndReplaceElement() )
Ok, Thanks you Paul -- 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: GWT 2.5 change to provided=true for HTMLPanel
It seems to be an issue with the HTMLPanel itself - it blocks @UiField (provided=true) explicitly. I still have no idea why, unfortunately. Quickest workaround is to remove the (provided=true) part, and then make the HTMLPanel yourself explicitly, and add it to the original one. eg in your code, change: @UiField(provided = true) HTMLPanel pnlContent; to @UiField HTMLPanel pnlContent; and @Override public Widget asWidget() { lblName = new LabelToolItem(row.getStr()); pnlContent = new HTMLPanel(renderer.render(row)); return binder.createAndBindUi(this); } to @Override public Widget asWidget() { lblName = new LabelToolItem(row.getStr()); HTMLPanel pnlContent_temp = new HTMLPanel(renderer.render(row)); Widget w = binder.createAndBindUi(this); pnlContent.add(pnlContent_temp); return w; } On Monday, August 20, 2012 3:52:46 AM UTC+2, Peter Leong wrote: I'm having same problem. Did you find a solution? My code uses 'IsWidget', no Composite: http://subversion.assembla.com/svn/freshcode_public/learn/gwt/src/main/java/biz/freshcode/learn/gwt/client/uispike/gxt/LineItem.java Also, I'm using 2.5.0-rc1 because of the Maven plugin. Pete On Monday, July 23, 2012 4:48:13 AM UTC+10, RyanZA wrote: Previously in GWT 2.4 and below, this would work: UI Binder: g:HTMLPanel ui:field=myPanel / Code: @UiField (provided=true) HTMLPanel myPanel; myPanel = new HTMLPanel(foobar); In GWT 2.5, this now gives an error: (gwt source) // Make sure that, if there is a UiField for this panel, it isn't // (provided = true), as that isn't supported. if (uiField != null uiField.isProvided()) { writer.die(UiField %s for HTMLPanel cannot be provided., fieldName); } Just wondering why provided=true is no longer supported? AFAIK this was the purpose of provided=true in UiBinder? I've now changed the code to have UiBinder create an HTMLPanel for me and then add my widget to it, but this gives an extra unneeded wrapping div in my HTML... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Cj-qwRC0h40J. 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: GWT 2.5 change to provided=true for HTMLPanel
This works for me as long as I create the widget manually prior to calling initWidget(uiBinder.createAndBindUi(this)); On Sunday, July 22, 2012 2:48:13 PM UTC-4, RyanZA wrote: Previously in GWT 2.4 and below, this would work: UI Binder: g:HTMLPanel ui:field=myPanel / Code: @UiField (provided=true) HTMLPanel myPanel; myPanel = new HTMLPanel(foobar); In GWT 2.5, this now gives an error: (gwt source) // Make sure that, if there is a UiField for this panel, it isn't // (provided = true), as that isn't supported. if (uiField != null uiField.isProvided()) { writer.die(UiField %s for HTMLPanel cannot be provided., fieldName); } Just wondering why provided=true is no longer supported? AFAIK this was the purpose of provided=true in UiBinder? I've now changed the code to have UiBinder create an HTMLPanel for me and then add my widget to it, but this gives an extra unneeded wrapping div in my HTML... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/ySd40O079sIJ. 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: GWT 2.5 change to provided=true for HTMLPanel
I'm having same problem. Did you find a solution? My code uses 'IsWidget', no Composite: http://subversion.assembla.com/svn/freshcode_public/learn/gwt/src/main/java/biz/freshcode/learn/gwt/client/uispike/gxt/LineItem.java Also, I'm using 2.5.0-rc1 because of the Maven plugin. Pete On Monday, July 23, 2012 4:48:13 AM UTC+10, RyanZA wrote: Previously in GWT 2.4 and below, this would work: UI Binder: g:HTMLPanel ui:field=myPanel / Code: @UiField (provided=true) HTMLPanel myPanel; myPanel = new HTMLPanel(foobar); In GWT 2.5, this now gives an error: (gwt source) // Make sure that, if there is a UiField for this panel, it isn't // (provided = true), as that isn't supported. if (uiField != null uiField.isProvided()) { writer.die(UiField %s for HTMLPanel cannot be provided., fieldName); } Just wondering why provided=true is no longer supported? AFAIK this was the purpose of provided=true in UiBinder? I've now changed the code to have UiBinder create an HTMLPanel for me and then add my widget to it, but this gives an extra unneeded wrapping div in my HTML... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/oOl7QGY8dyMJ. 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.
GWT 2.5 change to provided=true for HTMLPanel
Previously in GWT 2.4 and below, this would work: UI Binder: g:HTMLPanel ui:field=myPanel / Code: @UiField (provided=true) HTMLPanel myPanel; myPanel = new HTMLPanel(foobar); In GWT 2.5, this now gives an error: (gwt source) // Make sure that, if there is a UiField for this panel, it isn't // (provided = true), as that isn't supported. if (uiField != null uiField.isProvided()) { writer.die(UiField %s for HTMLPanel cannot be provided., fieldName); } Just wondering why provided=true is no longer supported? AFAIK this was the purpose of provided=true in UiBinder? I've now changed the code to have UiBinder create an HTMLPanel for me and then add my widget to it, but this gives an extra unneeded wrapping div in my HTML... -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/-YBnu6Awi08J. 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: DataGrid (GWT 2.4) not visible in HTMLPanel
Hello, I have the same issue. But if I don't set a size in pixeles the data grid is hidden. Could you tell me what do you do? Thanks Emanuel On Sep 22, 12:33 pm, Uemit uemit.se...@gmail.com wrote: @Steve: Thanks for the confirmation. I put the DataGrid in a ResizeLayoutPanel and it works fine now. -- 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: DataGrid (GWT 2.4) not visible in HTMLPanel
Answered yesterday on StackOverflow: http://stackoverflow.com/questions/7875620/solved-gwt-datagrid-automatic-height -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/VlCgeUEmnFoJ. 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: UIBinder, HTMLPanel, and style interactions
Wrap div element in a HTML panel. You don't need padding the content of the div element. Instead, you use the margin tag of css. S. Abraham www.DataStoreGwt.com Persist objects directly in GAE On Sep 27, 2:04 am, Mike Dee mdichiapp...@gmail.com wrote: I'm noticing something weird. It is my first attempt at using HTMLPanel. The app is laid out with a DockLayoutPanel. The south panel is a footer panel and simply has a piece of text in it, which is always there. I want the text to be right justified with a bit of padding. g:HTMLPanel width=100% height=100% styleName=my-footer-panel- style div ui:msgSome Text Here/ui:msg /div /g:HTMLPanel The style, my-footer-panel, has a font, color, and padding. The padding doesn't appear to work. When I look at the page in Firebug I seem some strange things (see below). The style is in there (as a class), but the style attribute looks to be overriding the class with some inline styles. div style=position: absolute; overflow: hidden; left: 0px; right: 0px; bottom: 0px; height: 24px; div class=my-footer-panel-style style=height: 100%; width: 100%; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; divSome Text Here/div /div /div Why does the DIV have both a class and a style? Where does the style come from (the DockLayoutPanel)? Mike -- 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.
UIBinder, HTMLPanel, and style interactions
I'm noticing something weird. It is my first attempt at using HTMLPanel. The app is laid out with a DockLayoutPanel. The south panel is a footer panel and simply has a piece of text in it, which is always there. I want the text to be right justified with a bit of padding. g:HTMLPanel width=100% height=100% styleName=my-footer-panel- style div ui:msgSome Text Here/ui:msg /div /g:HTMLPanel The style, my-footer-panel, has a font, color, and padding. The padding doesn't appear to work. When I look at the page in Firebug I seem some strange things (see below). The style is in there (as a class), but the style attribute looks to be overriding the class with some inline styles. div style=position: absolute; overflow: hidden; left: 0px; right: 0px; bottom: 0px; height: 24px; div class=my-footer-panel-style style=height: 100%; width: 100%; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; divSome Text Here/div /div /div Why does the DIV have both a class and a style? Where does the style come from (the DockLayoutPanel)? Mike -- 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: DataGrid (GWT 2.4) not visible in HTMLPanel
@Steve: Thanks for the confirmation. I put the DataGrid in a ResizeLayoutPanel and it works fine now. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Vl3nht4fiSsJ. 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.
DataGrid (GWT 2.4) not visible in HTMLPanel
I am trying to switch from CellTable to the GWT 2.4's new DataGrid CellWidget however I run into a problem. I used the CellTable inside two normal divs for styling purposes (border, etc). The UiBinder code looked as follows: *g:HTMLPanel* *div class={mainRes.style.box_shadow} * * div class={mainRes.style.box_container} * * c:CellTable ui:field=table addStyleNames={mainRes.style.cellTable} /* * /div* * /div* */g:HTMLPanel* However with the new DataGrid this approach doesn't work anymore. When I put the DataGrid inside a HTMLPanel, nothing is displayed. I checked with firebug and I saw that height is 0px. I then checked the DataGrid source and saw that it implements the RequireResize interface. So I assume the problem is that HTMLPanel breaks the ProvidesResizehttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/ProvidesResize.html chain. I tried to set the height to 100% but it didn't really work. Is it somehow possible to put the DataGrid inside two normal divs or can I only place it inside a g:LayoutPanel ? Thanks in advance Ümit -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/NBqEcf_uO7YJ. 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: DataGrid (GWT 2.4) not visible in HTMLPanel
I had the same problem a couple weeks ago. Yes, DataGrid must display in one of the Layout Panel classes as it needs the ProvidesResize interface you describe. You may want to try the ResizeLayoutPanelhttp://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/user/client/ui/ResizeLayoutPanel.html, which allows a single child widget. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/nuO8g56euJMJ. 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: Display problem of HTML in HTMLPanel in IE9
The dev tools show the pre in a div with the correct font-families specified. Weird. It is DNA. I'm not sure what of. Some random sequence we pulled from a database for testing. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/g8a4gyJ0ZEsJ. 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: Display problem of HTML in HTMLPanel in IE9
Furthermore, I can copy the inner html from the dev tools DOM into a new document and display the page in IE9 and the text lines up properly. Very weird. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/btReepQczq4J. 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: Display problem of HTML in HTMLPanel in IE9
It appears to be the Lucida Console. If I remove it and use Courier New it is fine. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/SaBVbinZfoIJ. 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.
Display problem of HTML in HTMLPanel in IE9
We're using 2.4 RC1 I generate the following HTML in my code: pre style=font-family:Lucida Console, Courier New, Monospace;color:black span style=color:green---/span 510 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 ||||||||||||||| |||||||||||||| ||||||||||| aagcccaggatcgttggaggaactgcgtctgttcgtggspan style=color:redy/spangagspan style=color:redy/spanggccgtggcaggtgaccctgcacacaacctcACCCACTCAGAGACACCTGTgtggag[g/t]ctccatcattggaaaccagtggatattaspan style=color:redm/spancagcCGCTCACTGTTTCTATGGGTcagtaccacspan style=color:redr/spanspan style=color:redr/spanctgspan style=color:redk/spanspan style=color:redw/spanttagttcatcttcttcacacatttata span style=color:blue--/span span style=color:green---/span/pre The HTML is passed into an HTMLPanel which is set as a child in a ScrollPanel. In IE8 and FF3.6, the numbers and ticks line up as expected for a fixed font. In IE9 they are not lined up correctly. If I take the HTML above into a file inside html/body/div tags it looks correct in IE9. Any ideas? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/jkFH2buZGkIJ. 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: Display problem of HTML in HTMLPanel in IE9
I would suggest inspecting your page with the IE dev tools to verify the actual font and other properties affecting the SPAN with the text alignment problems. Sidenote: What is that DNA of ? im just guessing its dna... i dont really know. On Aug 24, 7:05 am, Mark mswaisg...@yahoo.com wrote: We're using 2.4 RC1 I generate the following HTML in my code: pre style=font-family:Lucida Console, Courier New, Monospace;color:black span style=color:green---gt;/span 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180 185 190 195 200 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aagcccaggatcgttggaggaactgcgtctgttcgtggspan style=color:redy/spangagspan style=color:redy/spanggccgtggcaggtgaccctgcacacaacctcACCCACTCAGAGACACCTGTgtggag[g/t]ctccatcattggaaaccagtggatattaspan style=color:redm/spancagcCGCTCACTGTTTCTATGGGTcagtaccacspan style=color:redr/spanspan style=color:redr/spanctgspan style=color:redk/spanspan style=color:redw/spanttagttcatcttcttcacacatttata span style=color:bluelt;--/span span style=color:greenlt;---/span/pre The HTML is passed into an HTMLPanel which is set as a child in a ScrollPanel. In IE8 and FF3.6, the numbers and ticks line up as expected for a fixed font. In IE9 they are not lined up correctly. If I take the HTML above into a file inside html/body/div tags it looks correct in IE9. Any ideas? Thanks, Mark -- 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.
[gwt-contrib] Adding a missing addAndReplaceElement(IsWidget, Element) to HTMLPanel. (issue1514805)
Reviewers: rjrjr, Description: Adding a missing addAndReplaceElement(IsWidget, Element) to HTMLPanel. Review by: rj...@google.com Please review this at http://gwt-code-reviews.appspot.com/1514805/ Affected files: M user/src/com/google/gwt/user/client/ui/HTMLPanel.java Index: user/src/com/google/gwt/user/client/ui/HTMLPanel.java === --- user/src/com/google/gwt/user/client/ui/HTMLPanel.java (revision 10510) +++ user/src/com/google/gwt/user/client/ui/HTMLPanel.java (working copy) @@ -1,12 +1,12 @@ /* * Copyright 2008 Google Inc. - * + * * Licensed under the Apache License, Version 2.0 (the License); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -35,7 +35,7 @@ * A helper method for creating unique IDs for elements within dynamically- * generated HTML. This is important because no two elements in a document * should have the same id. - * + * * @return a new unique identifier */ public static String createUniqueId() { @@ -44,11 +44,11 @@ /** * Creates an HTML panel that wraps an existing element. - * + * * This element must already be attached to the document. If the element is * removed from the document, you must call * {@link RootPanel#detachNow(Widget)}. - * + * * @param element the element to be wrapped */ public static HTMLPanel wrap(Element element) { @@ -68,7 +68,7 @@ * Creates an HTML panel with the specified HTML contents inside a DIV * element. Any element within this HTML that has a specified id can contain a * child widget. - * + * * @param html the panel's HTML */ public HTMLPanel(String html) { @@ -80,12 +80,12 @@ setElement(Document.get().createDivElement()); getElement().setInnerHTML(html); } - + /** * Initializes the panel's HTML from a given {@link SafeHtml} object. - * + * * Similar to {@link #HTMLPanel(String)} - * + * * @param safeHtml the html to set. */ public HTMLPanel(SafeHtml safeHtml) { @@ -96,7 +96,7 @@ * Creates an HTML panel whose root element has the given tag, and with the * specified HTML contents. Any element within this HTML that has a specified * id can contain a child widget. - * + * * @param tag the tag of the root element * @param html the panel's HTML */ @@ -106,7 +106,7 @@ * innerHTML. table and tbody simply won't, the property is read only. * p will explode if you incorrectly try to put another p inside of it. * And who knows what else. - * + * * However, if you cram a complete, possibly incorrect structure inside a * div, IE will swallow it gladly. So that's what we do here in the name of * IE robustification. @@ -114,10 +114,10 @@ StringBuilder b = new StringBuilder(); b.append('').append(tag).append('').append(html); b.append(/).append(tag).append(''); - + // We could use the static hiddenDiv, but that thing is attached // to the document. The caller might not want that. - + DivElement scratchDiv = Document.get().createDivElement(); scratchDiv.setInnerHTML(b.toString()); setElement(scratchDiv.getFirstChildElement()); @@ -126,7 +126,7 @@ /** * Construct a new {@link HTMLPanel} with the specified element. - * + * * @param elem the element at the root of the panel */ private HTMLPanel(Element elem) { @@ -135,7 +135,7 @@ /** * Adds a child widget to the panel. - * + * * @param widget the widget to be added */ @Override @@ -146,7 +146,7 @@ /** * Adds a child widget to the panel, contained within the HTML element * specified by a given id. - * + * * @param widget the widget to be added * @param id the id of the element within which it will be contained */ @@ -164,7 +164,7 @@ * Adds a child widget to the panel, contained within an HTML * element. It is up to the caller to ensure that the given element * is a child of this panel's root element. - * + * * @param widget the widget to be added * @param elem the element within which it will be contained */ @@ -175,7 +175,7 @@ /** * Adds a child widget to the panel, replacing the HTML element. - * + * * @param widget the widget to be added * @param toReplace the element to be replaced by the widget */ @@ -183,10 +183,10 @@ com.google.gwt.user.client.Element clientElem = toReplace.cast(); addAndReplaceElement(widget, clientElem); } - + /** * Adds a child widget
[gwt-contrib] Re: Adding a missing addAndReplaceElement(IsWidget, Element) to HTMLPanel. (issue1514805)
LGTM http://gwt-code-reviews.appspot.com/1514805/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding a missing addAndReplaceElement(IsWidget, Element) to HTMLPanel. (issue1514805)
http://gwt-code-reviews.appspot.com/1514805/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10515 committed - Adding a missing addAndReplaceElement(IsWidget, Element) to HTMLPanel....
Revision: 10515 Author: her...@google.com Date: Tue Aug 9 08:26:00 2011 Log: Adding a missing addAndReplaceElement(IsWidget, Element) to HTMLPanel. Review at http://gwt-code-reviews.appspot.com/1514805 Review by: rj...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10515 Modified: /trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java /trunk/user/src/com/google/gwt/user/client/ui/RenderablePanel.java === --- /trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java Fri Jun 24 09:50:57 2011 +++ /trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java Tue Aug 9 08:26:00 2011 @@ -1,12 +1,12 @@ /* * Copyright 2008 Google Inc. - * + * * Licensed under the Apache License, Version 2.0 (the License); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -35,7 +35,7 @@ * A helper method for creating unique IDs for elements within dynamically- * generated HTML. This is important because no two elements in a document * should have the same id. - * + * * @return a new unique identifier */ public static String createUniqueId() { @@ -44,11 +44,11 @@ /** * Creates an HTML panel that wraps an existing element. - * + * * This element must already be attached to the document. If the element is * removed from the document, you must call * {@link RootPanel#detachNow(Widget)}. - * + * * @param element the element to be wrapped */ public static HTMLPanel wrap(Element element) { @@ -68,7 +68,7 @@ * Creates an HTML panel with the specified HTML contents inside a DIV * element. Any element within this HTML that has a specified id can contain a * child widget. - * + * * @param html the panel's HTML */ public HTMLPanel(String html) { @@ -80,12 +80,12 @@ setElement(Document.get().createDivElement()); getElement().setInnerHTML(html); } - + /** * Initializes the panel's HTML from a given {@link SafeHtml} object. - * + * * Similar to {@link #HTMLPanel(String)} - * + * * @param safeHtml the html to set. */ public HTMLPanel(SafeHtml safeHtml) { @@ -96,7 +96,7 @@ * Creates an HTML panel whose root element has the given tag, and with the * specified HTML contents. Any element within this HTML that has a specified * id can contain a child widget. - * + * * @param tag the tag of the root element * @param html the panel's HTML */ @@ -106,7 +106,7 @@ * innerHTML. table and tbody simply won't, the property is read only. * p will explode if you incorrectly try to put another p inside of it. * And who knows what else. - * + * * However, if you cram a complete, possibly incorrect structure inside a * div, IE will swallow it gladly. So that's what we do here in the name of * IE robustification. @@ -114,10 +114,10 @@ StringBuilder b = new StringBuilder(); b.append('').append(tag).append('').append(html); b.append(/).append(tag).append(''); - + // We could use the static hiddenDiv, but that thing is attached // to the document. The caller might not want that. - + DivElement scratchDiv = Document.get().createDivElement(); scratchDiv.setInnerHTML(b.toString()); setElement(scratchDiv.getFirstChildElement()); @@ -126,7 +126,7 @@ /** * Construct a new {@link HTMLPanel} with the specified element. - * + * * @param elem the element at the root of the panel */ private HTMLPanel(Element elem) { @@ -135,7 +135,7 @@ /** * Adds a child widget to the panel. - * + * * @param widget the widget to be added */ @Override @@ -146,7 +146,7 @@ /** * Adds a child widget to the panel, contained within the HTML element * specified by a given id. - * + * * @param widget the widget to be added * @param id the id of the element within which it will be contained */ @@ -164,7 +164,7 @@ * Adds a child widget to the panel, contained within an HTML * element. It is up to the caller to ensure that the given element * is a child of this panel's root element. - * + * * @param widget the widget to be added * @param elem the element within which it will be contained */ @@ -175,7 +175,7 @@ /** * Adds a child widget to the panel, replacing the HTML element. - * + * * @param widget the widget to be added * @param toReplace the element to be replaced by the widget */ @@ -183,10 +183,10 @@ com.google.gwt.user.client.Element clientElem
[gwt-contrib] Re: Fixing a bug in HTMLPanel#addAndReplaceElement() where widgets that are children of the element ... (issue1467807)
Are you using one of the static wrap() methods, like Label#wrap()? The wrap methods specifically assert that the Element is not a child of a widget, so wrapping an element in an HtmlPanel wouldn't be allowed. If you aren't using the wrap methods, can you provide an example? You might be violating certain limitations of Widgets that protect against browser memory leaks. On 2011/07/26 16:23:52, JOANRIBALTA wrote: I'm wrapping an element in a new widget which adds new functionalities to the element, and I'm using the function HTMLPanel.addAndReplaceElement(widget, element) to replace the element by the widget but now the new check in lines 196/197/198/199 are avoiding that. Thanks, Joan Ribalta 196 // Early exit if the element to replace and the replacement are the same. 197 if (toReplace == widget.getElement()) { 198 return; 199 } http://gwt-code-reviews.appspot.com/1467807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Tr.lời: HTMLPanel Mouseover events
You can use FocusPanel to wrap your HTMLPanel. See: http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/FocusPanel.html -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/mBDpf2r9FjsJ. 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: HTMLPanel Mouseover events
I guess GWT Designer doesn't support it, but you actually bind any event you like to any widget using Widget#addDomHandler. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/WlPV1I6pFvYJ. 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.
HTMLPanel Mouseover events
Are mouseover events supported for HTML panel. I dont see anything in the designer except for onattach/detach. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/qYutv_nFP1IJ. 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.
[gwt-contrib] Fixing a bug in HTMLPanel#addAndReplaceElement() where widgets that are children of the element ... (issue1467807)
Reviewers: rchandia, Description: Fixing a bug in HTMLPanel#addAndReplaceElement() where widgets that are children of the element being replaced are never removed, which puts the widgets in an invalid state. We now handle three additional scenarios. If the element being replaced is the new widget, then its a no-op. If the element being replaced contains one or more widgets, those widgets are removed from the HTMLPanel before replacing the element. If the element being replaced is a widget (but not the new widget), then we insert the new widget first, and then remove the old widget. Issue: 4642 Author: jlabanca, gfotos Please review this at http://gwt-code-reviews.appspot.com/1467807/ Affected files: M user/src/com/google/gwt/user/client/ui/HTMLPanel.java M user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a bug in HTMLPanel#addAndReplaceElement() where widgets that are children of the element ... (issue1467807)
This is an updated patch for issue: http://gwt-code-reviews.appspot.com/1462808/ This version addresses additional error states. http://gwt-code-reviews.appspot.com/1467807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a bug in HTMLPanel#addAndReplaceElement() where widgets that are children of the element ... (issue1467807)
On 2011/06/24 18:42:47, jlabanca wrote: This is an updated patch for issue: http://gwt-code-reviews.appspot.com/1462808/ This version addresses additional error states. LGTM http://gwt-code-reviews.appspot.com/1467807/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r10394 committed - Fixing a bug in HTMLPanel#addAndReplaceElement() where widgets that ar...
Revision: 10394 Author: jlaba...@google.com Date: Fri Jun 24 09:50:57 2011 Log: Fixing a bug in HTMLPanel#addAndReplaceElement() where widgets that are children of the element being replaced are never removed, which puts the widgets in an invalid state. We now handle three additional scenarios. If the element being replaced is the new widget, then its a no-op. If the element being replaced contains one or more widgets, those widgets are removed from the HTMLPanel before replacing the element. If the element being replaced is a widget (but not the new widget), then we insert the new widget first, and then remove the old widget. Issue: 4642 Author: jlabanca, gfotos Review at http://gwt-code-reviews.appspot.com/1467807 Review by: rchan...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=10394 Modified: /trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java /trunk/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java === --- /trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java Wed Feb 16 10:10:39 2011 +++ /trunk/user/src/com/google/gwt/user/client/ui/HTMLPanel.java Fri Jun 24 09:50:57 2011 @@ -20,6 +20,7 @@ import com.google.gwt.dom.client.Element; import com.google.gwt.safehtml.shared.SafeHtml; +import java.util.Iterator; import java.util.NoSuchElementException; /** @@ -191,12 +192,57 @@ * @deprecated use {@link #addAndReplaceElement(Widget, Element)} */ @Deprecated - public void addAndReplaceElement(Widget widget, - com.google.gwt.user.client.Element toReplace) { + public void addAndReplaceElement(Widget widget, com.google.gwt.user.client.Element toReplace) { +/* + * Early exit if the element to replace and the replacement are the same. If + * we remove the new widget, we would also remove the element to replace. + */ +if (toReplace == widget.getElement()) { + return; +} + // Logic pulled from super.add(), replacing the element rather than adding. + +// Detach new child. Okay if its a child of the element to replace. widget.removeFromParent(); + +// Logical detach of all children of the element to replace. +Widget toRemove = null; +IteratorWidget children = getChildren().iterator(); +while (children.hasNext()) { + Widget next = children.next(); + if (toReplace.isOrHasChild(next.getElement())) { +if (next.getElement() == toReplace) { + /* + * If the element that we are replacing is itself a widget, then we + * cannot remove it until the new widget has been inserted, or we lose + * the location of the element to replace. Save the widget to remove + * for now, and remove it after inserting the new widget. + */ + toRemove = next; + break; +} +children.remove(); + } +} + +// Logical attach. getChildren().add(widget); -toReplace.getParentNode().replaceChild(widget.getElement(), toReplace); + +// Physical attach. +if (toRemove == null) { + toReplace.getParentNode().replaceChild(widget.getElement(), toReplace); +} else { + /* + * The element being replaced is a widget, which needs to be removed. + * First insert the new widget at the same location, then remove the old + * widget. + */ + toReplace.getParentNode().insertBefore(widget.getElement(), toReplace); + remove(toRemove); +} + +// Adopt. adopt(widget); } @@ -252,7 +298,7 @@ } /** - * Performs a {@link DOM#getElementById(String)} after attaching the panel's + * Performs a {@link Document#getElementById(String)} after attaching the panel's * element into a hidden DIV in the document's body. Attachment is necessary * to be able to use the native getElementById. The panel's element will be * re-attached to its original parent (if any) after the method returns. === --- /trunk/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java Wed Feb 16 10:10:39 2011 +++ /trunk/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java Fri Jun 24 09:50:57 2011 @@ -27,11 +27,13 @@ */ public class HTMLPanelTest extends GWTTestCase { static class Adder implements HasWidgetsTester.WidgetAdder { +@Override public void addChild(HasWidgets container, Widget child) { ((HTMLPanel) container).add(child, w00t); } } + @Override public String getModuleName() { return com.google.gwt.user.User; } @@ -79,8 +81,7 @@ */ public void testAddToElement() { Label labelA = new Label(A), labelB = new Label(B); -HTMLPanel p = new HTMLPanel( -div class=\a\/divdiv class=\b\/div); +HTMLPanel p = new HTMLPanel(div class=\a\/divdiv class=\b\/div); Element first = p.getElement().getFirstChildElement(); Element second
[gwt-contrib] Re: Introduce the Attachable interface, and add support to UiBinder's HTMLPanel parser. (issue1426805)
http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java File user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java#newcode76 user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java:76: if (null == customTag) { Please check for appropriate constructor with com.google.gwt.uibinder.rebind.TypeOracleUtils.hasCompatibleConstructor(JClassType, JType...), and call logger.die if none is found. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java File user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java#newcode84 user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java:84: childFieldWriter.setBuildPrecendence(2); This looks brittle. Shouldn't you ask for this widget's precedence and set the child's to +1? http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java#newcode99 user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java:99: elementWriter.setBuildPrecendence(2); ditto http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java File user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java#newcode123 user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java:123: childFieldWriter.setBuildPrecendence(2); Again with the magic constant http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java#newcode133 user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java:133: elementWriter.setBuildPrecendence(2); ditto http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriter.java File user/src/com/google/gwt/uibinder/rebind/FieldWriter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriter.java#newcode133 user/src/com/google/gwt/uibinder/rebind/FieldWriter.java:133: * doesn't scale well. Centralize these values, using enums or constants. FYI, field Writers already model a dependency chain, see needs(FieldWriter) above. Would that let us drop the precedence thing? Should have called this out during Hermes's review, oh well. http://gwt-code-reviews.appspot.com/1426805/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Introduce the Attachable interface, and add support to UiBinder's HTMLPanel parser. (issue1426805)
Reviewers: rjrjr, hermes, Description: Introduce the Attachable interface, and add support to UiBinder's HTMLPanel parser. Please review this at http://gwt-code-reviews.appspot.com/1426805/ Affected files: A user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java A user/src/com/google/gwt/uibinder/elementparsers/AttachableInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/InterpreterPipe.java M user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java M user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java M user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java M user/src/com/google/gwt/uibinder/rebind/FieldWriter.java M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java A user/src/com/google/gwt/user/client/ui/Attachable.java A user/src/com/google/gwt/user/client/ui/AttachableComposite.java A user/src/com/google/gwt/user/client/ui/AttachableHTMLPanel.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Introduce the Attachable interface, and add support to UiBinder's HTMLPanel parser. (issue1426805)
Thanks, guys. Another look? http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java File user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java#newcode76 user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java:76: if (null == customTag) { On 2011/04/26 17:13:47, rjrjr wrote: Please check for appropriate constructor with com.google.gwt.uibinder.rebind.TypeOracleUtils.hasCompatibleConstructor(JClassType, JType...), and call logger.die if none is found. Actually, I totally missed this, but supporting custom root elements is something I still have to add to AttachableHTMLPanel. It's not hard, but since it's not blocking for 99% of our tests, I'd like to put it together with the other 2 dozen of TODOs I'm adding with this CL... I promise I'll get to them. Scout's honor. :-) http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java File user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java#newcode84 user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java:84: childFieldWriter.setBuildPrecendence(2); On 2011/04/26 17:13:47, rjrjr wrote: This looks brittle. Shouldn't you ask for this widget's precedence and set the child's to +1? Done. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java#newcode99 user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java:99: elementWriter.setBuildPrecendence(2); On 2011/04/26 17:13:47, rjrjr wrote: ditto Done. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java File user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java#newcode123 user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java:123: childFieldWriter.setBuildPrecendence(2); On 2011/04/26 17:13:47, rjrjr wrote: Again with the magic constant Done. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java#newcode133 user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java:133: elementWriter.setBuildPrecendence(2); On 2011/04/26 17:13:47, rjrjr wrote: ditto Done. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriter.java File user/src/com/google/gwt/uibinder/rebind/FieldWriter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriter.java#newcode133 user/src/com/google/gwt/uibinder/rebind/FieldWriter.java:133: * doesn't scale well. Centralize these values, using enums or constants. On 2011/04/26 17:13:47, rjrjr wrote: FYI, field Writers already model a dependency chain, see needs(FieldWriter) above. Would that let us drop the precedence thing? Should have called this out during Hermes's review, oh well. Hermes is fixing this in a follow-up CL, but I don't think he's actually using that info. I think he's just creating enums for these constants. http://gwt-code-reviews.appspot.com/1426805/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Introduce the Attachable interface, and add support to UiBinder's HTMLPanel parser. (issue1426805)
http://gwt-code-reviews.appspot.com/1426805/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Introduce the Attachable interface, and add support to UiBinder's HTMLPanel parser. (issue1426805)
Please hold reviewing this for a sec, I'm fixing a compile error I introduced. On Tue, Apr 26, 2011 at 2:39 PM, rdcas...@google.com wrote: Thanks, guys. Another look? http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java File user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java#newcode76 user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java:76: if (null == customTag) { On 2011/04/26 17:13:47, rjrjr wrote: Please check for appropriate constructor with com.google.gwt.uibinder.rebind.TypeOracleUtils.hasCompatibleConstructor(JClassType, JType...), and call logger.die if none is found. Actually, I totally missed this, but supporting custom root elements is something I still have to add to AttachableHTMLPanel. It's not hard, but since it's not blocking for 99% of our tests, I'd like to put it together with the other 2 dozen of TODOs I'm adding with this CL... I promise I'll get to them. Scout's honor. :-) http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java File user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java#newcode84 user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java:84: childFieldWriter.setBuildPrecendence(2); On 2011/04/26 17:13:47, rjrjr wrote: This looks brittle. Shouldn't you ask for this widget's precedence and set the child's to +1? Done. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java#newcode99 user/src/com/google/gwt/uibinder/elementparsers/WidgetInterpreter.java:99: elementWriter.setBuildPrecendence(2); On 2011/04/26 17:13:47, rjrjr wrote: ditto Done. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java File user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java#newcode123 user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java:123: childFieldWriter.setBuildPrecendence(2); On 2011/04/26 17:13:47, rjrjr wrote: Again with the magic constant Done. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java#newcode133 user/src/com/google/gwt/uibinder/elementparsers/WidgetPlaceholderInterpreter.java:133: elementWriter.setBuildPrecendence(2); On 2011/04/26 17:13:47, rjrjr wrote: ditto Done. http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriter.java File user/src/com/google/gwt/uibinder/rebind/FieldWriter.java (right): http://gwt-code-reviews.appspot.com/1426805/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriter.java#newcode133 user/src/com/google/gwt/uibinder/rebind/FieldWriter.java:133: * doesn't scale well. Centralize these values, using enums or constants. On 2011/04/26 17:13:47, rjrjr wrote: FYI, field Writers already model a dependency chain, see needs(FieldWriter) above. Would that let us drop the precedence thing? Should have called this out during Hermes's review, oh well. Hermes is fixing this in a follow-up CL, but I don't think he's actually using that info. I think he's just creating enums for these constants. http://gwt-code-reviews.appspot.com/1426805/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors