Re: Amazon Web Services / Continuous Integration

2015-08-04 Thread Phil O
Hi Mohammed,

I'm trying to manually deploy a GWT app to AWS also.  I don't understand 
your step 4.  What does Create GWT apps EAR mean, unless EAR is the name of 
your web app? 

Thanks,
Phil

On Thursday, May 28, 2015 at 11:57:26 PM UTC-6, Mohammed Sameen wrote:

 Hi Ariel,
 I have experience in GWT apps deploying in AWS.Manually i did it

1. Create AWS Instance
2. Setup AWS with installing Server and Databases(Mysql),configuration
3. Expose the Instance 
4. Create GWT apps EAR
5. Transfer EAR to AWS through FTP or copy nd paste manually from 
local to remote AWS
6. Deploy the EAR in AWS server(tomcat/jboss)
7. Hit the URL


 On Thursday, May 28, 2015 at 6:23:34 PM UTC+5:30, Ariel Janover wrote:

 Hello everyone! We are working with GWT in a project with my Team, using 
 it for the client-side features and combining it with PHP + MySQL. 

 Does anybody have any experience deploying GWT Apps to Amazon Web 
 Services? We are interested in being able to automatically deploy to 
 development and production instances there after pushing to the 
 corresponding branches either with Git or Mercurial.

 All help is appreciated!

 Best,

 Ari



-- 
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: Where to store global (application) variables?

2012-02-13 Thread phil
Take a look here :
http://code.google.com/p/gwt-client-storage/

or use com.google.gwt.storage.client.Storage

Regards.

Phi

-- 
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.



arbitrary html not in a div

2011-12-19 Thread Phil McDonnell
I found the HTML class allows me to insert arbitrary html.  This is great,
but the html class puts my html in a div. Is there something similar that
does not have this constraint? If I have some arbitrary html I'd like to
insert at the start and end of the page, is it possible to do so without
closing it in a div?

I'm looking to do something roughly as follows:

   - completely arbitrary html that leaves some divs open
   - gwt magic
   - completely arbitrary html that closes the divs that were left open

Thanks,
Phil

-- 
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.



Changing history token from external js

2011-12-18 Thread Phil McDonnell
I have a GWT app that is wrapped in an iframe within a base html page. I'd
like to add a few navigational links (not actual links, but js powered
ones) in the outer html part of the page that allow me to change the state
of the GWT app.  I was thinking that I could change the src attribute in
the iframe that wraps the entire GWT app to navigate to a desired history
token.

Is this a good idea? Is there a better way to do this navigation from
outside gwt, apart from putting everything in gwt?

Thanks,
Phil

-- 
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: User visible urls

2011-12-05 Thread Phil McDonnell
Looks great!  Thanks!

On Mon, Dec 5, 2011 at 3:13 AM, Thomas Broyer t.bro...@gmail.com wrote:

 Historyhttp://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.htmlis
  made for that.

 If you want to use HTML5's pushState/popstate, that should be possible
 using deferred-binding (to replace the underlying implementation using
 onhashchange with one using pushState).

 If you're using 
 Placeshttp://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html(which
  I strongly recommend), the default
 Historianhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/place/shared/PlaceHistoryHandler.Historian.htmluses
  History, but you can easily make one that uses HTML5's
 pushState/onpopstate (I did just that, works very well; I didn't implement
 fallback to on hashchange though). Note that it's easier to make an HTML5
 Historian than to make History use HTML5.

 --
 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/-/2WDDm4FrOj8J.

 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.



User visible urls

2011-12-04 Thread Phil McDonnell
I like the concept of GWT being a webapp, but users still want
bookmark-able urls in many situations.  Does anyone have a pointer for best
ways to expose urls that can bookmark somewhere deep in a gwt app?

For instance, a shopping site might have the url 
my-gwt-app.com/products/stuffed-bunny so that a user can return to their
favorite stuffed bunny product.  Any idea how I can implement this?

Thanks,
Phil

-- 
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 DataTable issue

2011-11-29 Thread Phil McDonnell
I'm trying to use OrgChart from google's visualization api. I get the
includes and jars setup alright, but anytime I try to initialize a
DataTable (which is needed to populate the OrgChart) I get a very opaque
error that is pasted below.  Has any one seen something like this?

I'm literally just copy and pasting a few lines of sample code from various
places online. I have include my sample code below as well as the error I
am seeing. I believe I'm including the visualization jar and I've added
the corresponding xml line for the visualization library to my *.gwt.xml
file.  I searched around quite a bit, but can't seem to find this error
elsewhere.  I'm on GWT 2.2 and AppEngine 1.5.1.

Thanks,
Phil

*Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError):
Cannot read property 'visualization' of undefined __gwt_ObjectId: 13 at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
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.visualization.client.DataTable$.create(DataTable.java) at
dorsata.client.Dorsata.createDataTable(Dorsata.java:264) at
dorsata.client.Dorsata.drawOrgChart(Dorsata.java:224) at
dorsata.client.Dorsata.onModuleLoad(Dorsata.java:81) ... 9 more*

Sample code I'm using:
  public void drawOrgChart() {
Widget widget;
Options options = Options.create();
options.setAllowHtml(true);
options.setAllowCollapse(true);
options.setColor(#00FF00);
options.setSelectionColor(#FF);
widget = new OrgChart(createDataTable(), options);
RootPanel.get().add(widget);
   }
  private AbstractDataTable createDataTable() {
DataTable data = DataTable.create();
data.addColumn(ColumnType.STRING, Name);
data.addColumn(ColumnType.STRING, Manager);
data.addRows(5);
data.setValue(0, 0, Mike);
data.setValue(1, 0, Jim);
data.setValue(1, 1, Mike);
data.setValue(2, 0, Alice);
data.setValue(2, 1, Mike);
data.setValue(3, 0, Bob);
data.setValue(3, 1, Jim);
data.setValue(4, 0, Carol);
data.setValue(4, 1, Bob);
return data;
 }

-- 
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 DataTable issue

2011-11-29 Thread Phil McDonnell
To answer my own question...  I needed to load the visualization api
explicitly in GWT for it to work.  Below is the code for the next guy that
hits this.

Thanks,
Phil


// Create a callback to be called when the visualization API
// has been loaded.
Runnable onLoadCallback = new Runnable() {
  public void run() {
  drawOrgChart();
  }
};

// Load the visualization api, passing the onLoadCallback to be called
// when loading is done.
VisualizationUtils.loadVisualizationApi(onLoadCallback,
OrgChart.PACKAGE);

On Mon, Nov 28, 2011 at 1:23 AM, Phil McDonnell
phil.a.mcdonn...@gmail.comwrote:

 I'm trying to use OrgChart from google's visualization api. I get the
 includes and jars setup alright, but anytime I try to initialize a
 DataTable (which is needed to populate the OrgChart) I get a very opaque
 error that is pasted below.  Has any one seen something like this?

 I'm literally just copy and pasting a few lines of sample code from
 various places online. I have include my sample code below as well as the
 error I am seeing. I believe I'm including the visualization jar and I've
 added the corresponding xml line for the visualization library to my
 *.gwt.xml file.  I searched around quite a bit, but can't seem to find this
 error elsewhere.  I'm on GWT 2.2 and AppEngine 1.5.1.

 Thanks,
 Phil

 *Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError):
 Cannot read property 'visualization' of undefined __gwt_ObjectId: 13 at
 com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
 at
 com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
 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.visualization.client.DataTable$.create(DataTable.java) at
 dorsata.client.Dorsata.createDataTable(Dorsata.java:264) at
 dorsata.client.Dorsata.drawOrgChart(Dorsata.java:224) at
 dorsata.client.Dorsata.onModuleLoad(Dorsata.java:81) ... 9 more*

 Sample code I'm using:
   public void drawOrgChart() {
 Widget widget;
 Options options = Options.create();
 options.setAllowHtml(true);
 options.setAllowCollapse(true);
 options.setColor(#00FF00);
 options.setSelectionColor(#FF);
 widget = new OrgChart(createDataTable(), options);
 RootPanel.get().add(widget);
}
   private AbstractDataTable createDataTable() {
 DataTable data = DataTable.create();
 data.addColumn(ColumnType.STRING, Name);
 data.addColumn(ColumnType.STRING, Manager);
 data.addRows(5);
 data.setValue(0, 0, Mike);
 data.setValue(1, 0, Jim);
 data.setValue(1, 1, Mike);
 data.setValue(2, 0, Alice);
 data.setValue(2, 1, Mike);
 data.setValue(3, 0, Bob);
 data.setValue(3, 1, Jim);
 data.setValue(4, 0, Carol);
 data.setValue(4, 1, Bob);
 return data;
  }




-- 
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: RequestFactory and Value Proxy for Objectify Key problem

2011-07-11 Thread Phil C
Look into Appengine Objectify project to answer that question.

-- 
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/-/qxXvPxv4tggJ.
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.



RequestFactory and Value Proxy for Objectify Key problem

2011-07-10 Thread Phil C
I am trying to convert our application to use RequestFactory (GWT 2.3
using all com.google.web.bindery.requestfactory.shared references).  I
am running into issues when trying to use an entity proxy for the
objectify key class.

@ProxyFor(Key.class)
public interface KeyProxyT extends EntityProxy extends ValueProxy{
long getId();
String getKindClassName();
String getName();
KeyProxy? getParent();
V extends EntityProxy KeyProxyV getRoot();
}

the entity class then has a reference to the key like this

public interface BarProxy{
  KeyBarProxy getKey();
}

we end up with an error like

java.lang.AssertionError: Incorrect size: 2
at com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl
$CoderCreator.getCoder(AutoBeanCodexImpl.java:124)
at com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl
$PropertyCoderCreator.maybeCreateCoder(AutoBeanCodexImpl.java:354)
at com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl
$PropertyCoderCreator.visitReferenceProperty(AutoBeanCodexImpl.java:
341)
at

when looking at it in the deubugger, there appear to be 2 coders.  The
first is for BarProxy, and the second is for the Key.

Any help appreciated.

-- 
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: Putting TabLayoutPanel into VerticalPanel in UIBinder

2010-04-12 Thread Phil
Hi there,

You are mixing a VerticalPanel (older panel type, uses tables for
layout) and the TabLayoutPanel, which is newer (GWT2.0) and relies on
divs and CSS for layout.

In general, you shouldn't mix the two types of Panels.

 but the result is awful, even when I tried some styling - I can't make
 the tabbed layout fit into the vertical panel. Also, the styling
 itself seems a little stubborn, it's really difficult change the
 outlook of the tabs, they keep place one above the another instead of
 placing in line.

Hmm. Using the *LayoutPanels requires:

1. standards mode !DOCTYPE in the host html page.
2. attaching the panel to the RootLayoutPanel rather than RootPanel.

The fact that the tabs stack on top of each other probably means that
you are not using Standards mode correctly[1].

The *LayoutPanels were introduced in GWT 2.0. They use divs instead
of tables to create layout. Refer to the UI docs[2] for more
details.

[1] http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Standards
[2] 
http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#LayoutPanels

Good luck. I re-read the DevGuideUiPanels several times before I
figured out the gotchas above (I'm a bit dense).

Cheers, Phil


On Apr 2, 5:48 am, mh mhaligow...@googlemail.com wrote:
 Hi,
 I need to put a some kind of tabbed menu into my VerticalPanel, using
 declarative layout.

 I tried to simply :

 g:VerticalPanel
   g:TabLayoutPanel /
 /g:VerticalPanel/

 but the result is awful, even when I tried some styling - I can't make
 the tabbed layout fit into the vertical panel. Also, the styling
 itself seems a little stubborn, it's really difficult change the
 outlook of the tabs, they keep place one above the another instead of
 placing in line.

 One of my ideas was to use TabBar instead, but I couldn't have find a
 way to put that in an XML file.

 Any ideas how to solve it?

 Regards,
 mh

-- 
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-tool...@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: Starting a new blank project in Eclipse.

2010-04-12 Thread Phil
Hi,

This is a fine question. The default Web App Project created by the
Google Eclipse plugin includes some sample code... it is no problem to
delete it from your projects and it is not required at all. It is just
there for the first time user, really.

I agree that cleaning it out is kind of a pain. :)  For my own use I
created a maven archetype that creates a blank slate project, which
fixed this issue for me... Why not create your own blank slate project
and check it into a source repo somewhere for your own use?

Cheers, Phil


On Apr 8, 6:34 am, tamooch tamo...@gmail.com wrote:
  I'm new to GWT so forgive me for asking such a elementary question.
 I'm using GWT 2.0 and Eclipse V. 1.2.1. When I create a new Web App
 Project, it creates the project with functionality already built it
 that prompts for a username and then tests server communication
 (responding with hello world type popup).

 Why is this the default for project creation? Is there a reason I
 should leave these pieces in? It would seem like it wouldn't be
 included unless there was a reason. I like that it creates the module
 and the entry point class, but beyond that I would prefer a blank
 project. When I start a new project I have to go in and clean out all
 of the content I don't need before I get started.

  I'm sure I am lacking understanding here. Please advise.

 Thanks.

-- 
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-tool...@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: DockLayoutPanel: UIBinder and Style.Unit

2010-02-15 Thread Phil


On Feb 15, 3:03 pm, Ahmed Ashour a.ash...@gmail.com wrote:
 Hi all,

     - First, why Style.Unit [1] is not documenting the values?
     - How to make DockLayoutPanel fully occupies the screen (100%
 width, 100% height), I tried to use the far below example.

A couple things to check:
- DockLayoutPanels only work with RootLayoutPanel().
- all the *LayoutPanels require the standards mode doctype: !DOCTYPE
html. check your html file.

Cheers Phil


-- 
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-tool...@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: TabLayoutPanel doesn't work

2010-02-11 Thread Phil


On Feb 11, 2:04 pm, Kevin Qiu kevin.jing@gmail.com wrote:


 I am already using standards mode (this is my doctype: !DOCTYPE HTML
 PUBLIC -//W3C//DTD HTML 4.01//EN
 http://www.w3.org/TR/html4/strict.dtd;)

Unfortunately, that is not the standards mode doctype. Use !DOCTYPE
HTML instead.

http://www.filsa.net/2010/01/21/gwt-notes-tablayoutpanel/

Best regards, Phil

-- 
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-tool...@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: Styling TabLayoutPanel

2010-01-27 Thread Phil

On Jan 28, 12:33 pm, Nick nix...@gmail.com wrote:
 +1  are there any examples using UiBinder+TabLayoutPanel
 +ObfuscatedCss?

I blogged about TabLayoutPanel recently, and posted some sample ui.xml
code:
http://www.filsa.net/2010/01/23/more-on-tablayoutpanel/

Hope it is helpful.

Phil
http://filsa.net/

-- 
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-tool...@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: Widget.clear() method not clearing properly

2009-08-04 Thread Phil

Hi Jason.

This is definitely the easier and faster solution. :)
I don't even know why I came up with the DOM iterating stuff...

/Phil

On Jul 31, 4:55 pm, Jason Essington jason.essing...@gmail.com wrote:
 wouldn't it be easier (and perhaps faster) to do something like:

    RootPanel rp = RootPanel.get(sample);
    rp.clear(); // remove any widgets to be safe
    rp.getElement().setInnerHTML(); // and clear any remaining contents

 -jason
 On Jul 30, 2009, at 1:55 AM, Thamizharasu S wrote:





  Hi Phil,

  This is working fine. Thanks for your answer.

  On Jul 27, 3:18 pm, Phil couch...@googlemail.com wrote:
  Hi Thamizharasu.

  Panel.clear() does only remove child-widgets. As the innerHTML  
  'sample
  content' is not considered a widget, it won't be affected.
  You may do the following to completelyclearthe contents of your div
  element:
  ---*snip*---
  RootPanel samplePanel = RootPanel.get(sample);
  //Clear
  Element element = samplePanel.getElement();
  NodeListNode childNodes = element.getChildNodes();
  for (int i = 0; i  childNodes.getLength(); i++) {
          element.removeChild(childNodes.getItem(i));}

  ---*snip*---

  Regards,
  Phil

  On Jul 27, 6:37 am, Thamizharasu S zaru...@gmail.com wrote:

  Hi All,

  I have defined one div id=samplesample content/div control in
  static html file. In my Entry point class i have a button, if i  
  click
  the button i have toclearall the contents from the div and put my
  own widget inside.

  So what i did was RootPanel.get(sample).clear(); Then i add my
  widget inside RootPanel.get(sample).add(widget);

  This is adding my new widget. But not clearing my old content  
  (sample
  content) from the div.

  Could any one help me on this?

  Thanks,
  Thamizharasu S
--~--~-~--~~~---~--~~
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: new line to break from textarea

2009-07-29 Thread Phil

How about simply using String's replaceAll() method?
String html = textArea.getText().replaceAll((\r\n|\r|\n), br/);


On Jul 28, 5:04 pm, Tobe tobias.jungnic...@googlemail.com wrote:
 Hi,
 how can I activate that new lines in a TextArea become breaks directly
 on the web page? In short I need the nl2br() function from PHP in GWT.
--~--~-~--~~~---~--~~
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: Widget.clear() method not clearing properly

2009-07-27 Thread Phil

Hi Thamizharasu.

Panel.clear() does only remove child-widgets. As the innerHTML 'sample
content' is not considered a widget, it won't be affected.
You may do the following to completely clear the contents of your div
element:
---*snip*---
RootPanel samplePanel = RootPanel.get(sample);
// Clear
Element element = samplePanel.getElement();
NodeListNode childNodes = element.getChildNodes();
for (int i = 0; i  childNodes.getLength(); i++) {
element.removeChild(childNodes.getItem(i));
}
---*snip*---

Regards,
Phil

On Jul 27, 6:37 am, Thamizharasu S zaru...@gmail.com wrote:
 Hi All,

 I have defined one div id=samplesample content/div control in
 static html file. In my Entry point class i have a button, if i click
 the button i have to clear all the contents from the div and put my
 own widget inside.

 So what i did was RootPanel.get(sample).clear(); Then i add my
 widget inside RootPanel.get(sample).add(widget);

 This is adding my new widget. But not clearing my old content (sample
 content) from the div.

 Could any one help me on this?

 Thanks,
 Thamizharasu S

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---