Re: Alignment of widgets

2010-02-01 Thread Joe Cole
If you are using flextables for forms you will want to set the width
of the first column widgets:

flextable.getCellFormatter().setWidth(0, "200px");

On Feb 2, 7:26 pm, Name256  wrote:
> Hello to you all,
> it is my first time trying out GWT and I am using version 1.7. I have
> been trying to create a login widget that contains help information on
> the left and a login form on the right. I have been unable to align
> the login SImple Panel to the centre of the east side of the
> dockpanel. My code is below. Kindly assist on a way that this could be
> possible.
>
> kind regards.
> Abel
>
> public void createInformationWidget() {
>         HTML html = new HTML();
>         html.setWordWrap(true);
>         html.setHTML("Lorem ipsum dolor sit amet, consectetur
> adipiscing elit. " +
>                 "Pellentesque sit amet eros. Fusce dui. Duis aliquet
> dapibus dui. Mauris vitae eros. " +
>                 "Morbi euismod felis eget tellus. Maecenas ut metus
> a nunc congue molestie. Nulla odio. " +
>                 "Aenean sollicitudin. Duis eu massa feugiat enim
> egestas ultrices. Nulla facilisi. Vestibulum " +
>                 "ante ipsum primis in faucibus orci luctus et ultrices
> posuere cubilia Curae; Nunc dictum risus a " +
>                 "lacus. Fusce tempus arcu non tortor. Nulla
> pellentesque lectus eu dui." +
>                 " Donec ac mi id massa accumsan sollicitudin. Donec
> consequat sapien ut augue. " +
>                 "Nullam erat dui, ultricies a, ullamcorper et, congue
> at, nisi. Fusce porta convallis augue. " +
>                 "Phasellus ullamcorper pharetra nisi. ");
>
>         dockPanel.add(html);
>         html.setWidth("50%");
>     }
>
>     public void createLoginForm() {
>         SimplePanel panel = new SimplePanel();
>
>         FlexTable flexTable = new FlexTable();
>         flexTable.setCellSpacing(10);
>         flexTable.setWidget(0, 0, new Label("Email: "));
>         flexTable.setWidget(0, 1, new TextBox());
>         flexTable.setWidget(1, 0, new Label("Password: "));
>         flexTable.setWidget(1, 1, new PasswordTextBox());
>
>         //panel.add(flexTable);
>         dockPanel.add(flexTable);
>         dockPanel.setCellHorizontalAlignment(flexTable,
> HasHorizontalAlignment.ALIGN_CENTER);
>     }

-- 
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: UiHandlers in Extended Abstract Class

2010-02-01 Thread damians
Yea i can bind UI elements as well but the error i got is on binding
@UiHandler("okButton") and that "okButton" and handler is not in
extended class but in base class.

-- 
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: SuggestBox hides RootLayoutPanel and all its contents

2010-02-01 Thread hriess
Is there in the meantime a solution for this problem? I am using a
DockLayoutPanel for the layout of the application. A SuggestBox (and
other PopupPanels) blanks the complete screen in IE7. After upgrade to
GWT 2.0, UiBinder and LayoutPanels I haven't tested my application
with IE7 for a long time. Have I to go back in time and check out a
rather old SVN version of my application?

Thank you
Holger

-- 
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: UiHandlers in Extended Abstract Class

2010-02-01 Thread matttai
Hi Damien,

I thought u were just asking about binding UI elements across extended
and abstract classes which I have been able to successfully do
(example code above).
The UIHandlers however are a different story and don't work.

On Feb 2, 6:11 pm, damians  wrote:
> Hello matttai,
>
> Is just the same question that you answered me few post before about
> UiBinder and Abstract class. The error i posted is from the same
> thing.
> Extended class does'nt see UiHandlers from base class. Anyone knows is
> it posible to make it work?
>
> Thanks GWT Users.

-- 
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: UiHandlers in Extended Abstract Class

2010-02-01 Thread damians

Hello matttai,

Is just the same question that you answered me few post before about
UiBinder and Abstract class. The error i posted is from the same
thing.
Extended class does'nt see UiHandlers from base class. Anyone knows is
it posible to make it work?

Thanks GWT Users.

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



UiHandlers in Extended Abstract Class

2010-02-01 Thread matttai
Having trouble having UiHandlers register when extending from an
abstract class.

I can register UiHandlers in the abstract class fine, however the
extending class cannot register it's handles. Sample code below:

Abstract Class:

public abstract class GenericWidget extends Composite
{
@UiTemplate("template/GenericTemplate.ui.xml")
public interface GenericWidgetUiBinder extends UiBinder {}
private static GenericWidgetUiBinder uiBinder = GWT.create
(GenericWidgetUiBinder.class);

@UiField FlowPanel chromePane;
@UiField Panel contentPane;
@UiField Label title;
@UiField Button toggleButton;

public GenericWidget(boolean hasChrome, String chromeTitle)
{
initWidget(uiBinder.createAndBindUi(this));
contentPane.add(initContent());
}

@UiHandler("toggleButton")
public void handleClick(ClickEvent event)
{
//do stuff
}

protected abstract Widget initContent();
}

Extending class:

public class AddPersonWidget extends GenericWidget {

@UiTemplate("template/AddPersonTemplate.ui.xml")
public interface AddPersonUiBinder extends UiBinder {}
private static AddPersonUiBinder uiBinder = GWT.create
(AddPersonUiBinder.class);

@UiField private TextBox firstname;
@UiField private TextBox lastname;
@UiField private HTML errorMsg;
@UiField private Button submit;

public AddPersonWidget()
{
super(true, ADD_PERSON_WIDGET_TITLE);
}

@Override
protected Widget initContent()
{
Widget content = new Widget();
content = uiBinder.createAndBindUi(content);
return content;
}

@UiHandler("submit")
public void submitButtonIsClicked(ClickEvent event)
{
submit.setVisible(false);
}
}

The UiHandler in the extending class does not register? Thanks GWT
Users.

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



Alignment of widgets

2010-02-01 Thread Name256
Hello to you all,
it is my first time trying out GWT and I am using version 1.7. I have
been trying to create a login widget that contains help information on
the left and a login form on the right. I have been unable to align
the login SImple Panel to the centre of the east side of the
dockpanel. My code is below. Kindly assist on a way that this could be
possible.

kind regards.
Abel


public void createInformationWidget() {
HTML html = new HTML();
html.setWordWrap(true);
html.setHTML("Lorem ipsum dolor sit amet, consectetur
adipiscing elit. " +
"Pellentesque sit amet eros. Fusce dui. Duis aliquet
dapibus dui. Mauris vitae eros. " +
"Morbi euismod felis eget tellus. Maecenas ut metus
a nunc congue molestie. Nulla odio. " +
"Aenean sollicitudin. Duis eu massa feugiat enim
egestas ultrices. Nulla facilisi. Vestibulum " +
"ante ipsum primis in faucibus orci luctus et ultrices
posuere cubilia Curae; Nunc dictum risus a " +
"lacus. Fusce tempus arcu non tortor. Nulla
pellentesque lectus eu dui." +
" Donec ac mi id massa accumsan sollicitudin. Donec
consequat sapien ut augue. " +
"Nullam erat dui, ultricies a, ullamcorper et, congue
at, nisi. Fusce porta convallis augue. " +
"Phasellus ullamcorper pharetra nisi. ");

dockPanel.add(html);
html.setWidth("50%");
}

public void createLoginForm() {
SimplePanel panel = new SimplePanel();

FlexTable flexTable = new FlexTable();
flexTable.setCellSpacing(10);
flexTable.setWidget(0, 0, new Label("Email: "));
flexTable.setWidget(0, 1, new TextBox());
flexTable.setWidget(1, 0, new Label("Password: "));
flexTable.setWidget(1, 1, new PasswordTextBox());

//panel.add(flexTable);
dockPanel.add(flexTable);
dockPanel.setCellHorizontalAlignment(flexTable,
HasHorizontalAlignment.ALIGN_CENTER);
}

-- 
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: Issues with Embedded History Changes

2010-02-01 Thread Michael Mullen
I just figured out my problem.  Although this does not strike me as a
good solution...

My onModuleLoad() function had to be changed to the following:

public onModuleLoad() {
   VerticalPanel vp = new VerticalPanel();
   vp.add(new MenuObject());
   RootPanel.get().add(vp);
   String initToken = History.getToken();
   if(initToken.length() > 0) {
  onHistoryChanged(initToken);
   } else {
  onHistoryChanged("Home");
   }
   History.addValueChangeHandler(this);
}

It appears that I cannot just add an object to the root panel outside
of another panel.


On Feb 1, 7:37 pm, Michael Mullen  wrote:
> I checked a few other things.
>
> In my loading html document, I've got the following line in the body
> section to add history support:
>  style="position:absolute;width:0;height:0;border:0">
>
> Is this the correct location to have this?
>
> I also just noticed that HistoryListener was depreciated, so I updated
> to ValueChangeHandler.  My main section is, for the most part:
>
> public class entry implements EntryPoint, ValueChangeHandler {
>    public onModuleLoad() {
>       RootPanel.get().add(new MenuObject());
>       String initToken = History.getToken();
>       if(initToken.length() > 0) {
>          onHistoryChanged(initToken);
>       } else {
>          onHistoryChanged("Home");
>       }
>       History.addValueChangeHandler(this);
>    }
>    public void onValueChange(ValueChangeEvent event) {
>       onHistoryChanged((String) event.getValue());
>    }
>    public void onHistoryChanged(String token) {
>       Window.alert("Testing " + token);
>    }
>
> }
>
> When the page loads, a window appears alerting me to the name of the
> token being loaded.  This also occurs while refreshing.  However with
> the MenuBar that is displayed, the choice changes the token in the
> URL, however no window appears.  If I select Reload in my browser, the
> page loads and the window appears.
>
> I've gone back and looked at the previous tutorials I was using for
> reference, but it appears that I've got everything.  I could not find
> anything in the Showcase example - it looks like I've got everything.
>
> I'm using Chrome 4.0.302.3 dev, as well as Firefox 3.6 for testing.
>
> By chance is there something that I'm missing?
>
> On Jan 30, 2:31 am, Michael Mullen  wrote:
>
>
>
> > I was unable to find a solution in the discussion group, and I've been
> > unable to find a solution on my own.  I probably missed something and
> > apologize ahead of time for draining someone's time.
>
> > Here is some code in question:
> > ...
> > public class entry implements EntryPoint, HistoryListener {
> >    public onModuleLoad() {
> >       RootPanel.get().add(new MenuObject());
> >       History.addHistoryListener(this);
> >    }
> >    public void onHistoryChanged(String token) {
> >       Window.alert("Testing " + token);
> >    }
> >    ...
>
> > }
>
> > --- New Class ---
> > public class MenuObject extends MenuBar implements Command {
> >    public MenuObject() {
> >       super();
> >       this.addItem(new MenuItem("Test", new Command() {
> >          public void execute() {
> >             History.newItem("Test");
> >          }
> >       ));
> >       this.addItem(new MenuItem("Test1", new Command() {
> >          public void execute() {
> >             History.newItem("Test1");
> >          }
> >       ));
> >    }
>
> > }
>
> > In this case, I've found that the selection of any MenuItem in my
> > custom MenuBar will not cause a change history event to occur.  If I
> > were to place a complete MenuBar object in my entry point (not
> > separated into a different class), the change history event will
> > occur.
>
> > At the same time, the history token updates in either case.  There are
> > no problems with the tokens in my browsers.
>
> > Is there anything that you guys could recommend to get history changes
> > by the external MenuBar class to trigger the history change event?

-- 
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: Struts2 GWT and classpath

2010-02-01 Thread finneycanhelp
Hi,

I confirmed I am not getting a classpath issue.

Using firebug and firefox, I see the URL
http://localhost:/org.struts2kata.S2?gwt.codesvr=10.0.0.2:9997
does a redirect to http://localhost:/S2/  Not sure why

Then I see the following:
http://localhost:/S2/
http://localhost:/S2/S2.nocache.js
http://localhost:/S2/S2.nocache.js?compiled
http://localhost:/S2/gwt/standard/standard.css

The source of the page mentions  "Your web browser must have
JavaScript enabled" in the source.  My JavaScript works fine ( checked
using http://jsbin.com/ )


At this point, I am thinking of starting over with a non-maven struts2
application which is my ultimate goal anyway.  I am thinking of having
the two apps be totally separate somehow too.
http://www.vogella.de/articles/GWT/article.html#firstgwt_run perhaps.

Thanks.

On Feb 1, 1:25 pm, Henry  wrote:
> You're probably getting a classpath problem.
> Can you confirm its a classpath exception?
>
> What's the error on the Development Mode window printing?
>
> In the
> Run->Debug Configurations...->g(oogle) Web Application
> window there is a Classpath Tab
> Make **SURE** that under the
> User Entries Tree you have
> "src"
> This can be added via Advanced...->Add Folders
> Yes, you add "src" to your classpath - this is strictly for GWT
>
> Cheers,
> Henry
>
> On Jan 31, 6:29 pm, finneycanhelp  wrote:
>
>
>
> > Thank you. I am farther along now.  I learned much from -help as you
> > suggested.
>
> > I also think I understand that one runs two servers; 1 is run for GWT
> > (such as using a debug configuration) and the other server for the
> > struts 2 web server (via eclipse project right click - Run As - Run on
> > Server).
>
> > I was pretty excited to see eclipse 
> > offer:http://localhost:/s2?gwt.codesvr=10.0.0.2:9997
> > as a url to use when running in Debug mode for GWT. That's progress.
>
> > The web browser redirects 
> > fromhttp://localhost:/s2?gwt.codesvr=10.0.0.2:9997
> > tohttp://localhost:/s2/That'sdifferent than the hello-world GWT
> > app URL which has ".html" in it; See Sgwt.html 
> > -->http://localhost:53650/Sgwt.html?gwt.codesvr=10.0.0.2:9997
>
> > I wanted the host page to come up with the typical hello world GWT app
> > of "Please enter your name: " that a new GWT project via eclipse
> > plugin gives you. However I get a blank web browser page.  I am not
> > sure why the browser redirects to the module root like that.
>
> > Help?  :)
>
> > On Jan 31, 12:30 am, Henry  wrote:
>
> > > Hi Finney,
>
> > > You can specify args to DevMode
>
> > > Run->Debug Configurations...->g(oogle) Web Application->New
> > > in the Arguments tab, you can add the name of your module(s)
> > > If in doubt, add the
> > > -help
> > > arguments in the Arguments tab
>
> > > Cheers,
> > > Henry
> > > p.s. checkouthttp://code.google.com/p/struts2gwtplugin
> > > and let me know what you think of that plugin
>
> > > On Jan 30, 7:34 pm, finneycanhelp  wrote:> Quick 
> > > follow up / add on:
>
> > > >  I see the post about Maven and GWT 
> > > > athttp://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
> > > > However, my real concern is with a struts2 project (s2project) that
> > > > has:
> > > >   - /s2project/WebContent folder which contains index.jsp, WEB-
> > > > INF, ...
>
> > > >   - /s2project/WebContent/WEB-INF/classes is the output folder
>
> > > >   - /s2project/src folder which contains java source and struts.xml
>
> > > >   - /s2project/ivy.xml file
>
> > > > Thanks again for any help.
>
> > > > On Jan 30, 9:16 pm, finneycanhelp  wrote:
>
> > > > > Hi,
>
> > > > > My goal is to GWT-ize a struts2 (S2) project.  I read the archives of
> > > > > this list. Although email threads were quite informative, I do not see
> > > > > the answer to this situation regarding the Java classpath and GWT.
>
> > > > > Tools:
> > > > >   I am using eclipse Java EE IDE for Web Developers (3.5.1) and the
> > > > > GWT eclipse plugin (1.2.0) with GWT 2.0.
>
> > > > >   I created a GWT hello world application to compare to the small
> > > > > struts 2 application I am trying to enhance.
>
> > > > > Project layout:
> > > > >   - In the struts2 project, the S2 web application has its WEB-INF in 
> > > > > /
> > > > > s2/src/main/webapp/WEB-INF and its output (.class files) go into "s2/
> > > > > target/classes"  It's a standard maven project.
>
> > > > >   - I see GWT has its WEB-INF located in /sgwt/war/WEB-INF and the
> > > > > output of the project is "sgwt/war/WEB-INF/classes"
>
> > > > > What I did:
>
> > > > >   - I changed the S2 project properties in the Google Web Toolkit
> > > > > dialog box to Use Google Web Toolkit.
>
> > > > >   - I also did the following:
>
> > > > >   + read the document at:
> > > > >    
> > > > > http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjec...
>
> > > > >   + copied/modified over components from the brand new GWT web
> > > > > application
>
> > > > > My current obstacle / challenge 

UiBinder and non standard CSS properties.

2010-02-01 Thread Carlos Aguayo
Hi,
UiBinder can't seem to take non standard CSS properties.

I have the following:



  
  .test {
-moz-border-radius: 4px;
  }
  

  

  


And it shows the following warning when trying to display the page:
21:01:53.994 [WARN] [gwtsandbox] Line 3 column 20: encountered "-".
Was expecting one of: "}" ";" 

Is this as designed that you can't use non standard CSS properties?
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.



onBlur called twice because of FocusWidget.setFocus implementation

2010-02-01 Thread Stuart
My use case:

I have a TextBox which I want to validate onBlur. If validation fails,
I want to setFocus on it again. Which makes onBlur fire again, hence
the validation routine runs again (not ideal, in fact, a defect in my
mind).

My code:
== snip ==
public void onBlur(BlurEvent event) {
  TextBox tb = (TextBox) event.getSource();
  try {
Long longValue = Long.valueOf(tb.getText());
  } catch (NumberFormatException e) {
// warn the user in the UI
// set the focus back on the TextBox
tb.setFocus(true);
  }
}
== end snip ==

The onBlur is running again because FocusWidget does this:

== snip ==
public void setFocus(boolean focused) {
if (focused) {
  impl.focus(getElement());
} else {
  impl.blur(getElement());
}
  }
== end snip ==

So, when I insert non-digits in my text box, and tab or click into the
next form element, onBlur fires once. In my catch block, I set the
focus again, which triggers onBlur again because of how
FocusWidget.setFocus is implemented.

This defect prevents me from displaying a message to the user just
once (ie, with an alert) or setting and clearing a message on fail/
pass of the validation.

Anyone have a workaround?

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



UiBinder + HTML + Widgets

2010-02-01 Thread Eric
Hello all,

I hope this is obvious and I'm just missing it, but I can't figure out
how to add a Widget to a DivElement or TableCellElement that I get
back from my uiBinder template.  Here is what I have:




[lots of eye candy that came from a graphic designer]

Logout
[more html]

   

[lots more stuff]




then in Java:
  @UiField
  LinkElement logoutLink;
  @UiField
  DivElement contentArea;

  public HasClickHandlers getLogoutLink() {
// This was easy
return Anchor.wrap(logoutLink);
  }

  public HasWidgets getContentArea() {
// I can't figure out what to put here.  Help! Please!
return null;
  }

How do I turn an Element into some kind of Panel?  Or add a Widget to
a container Element? Do I have to put ids on the elements and use
RootPanel.get("contentArea")?

Thanks in advance,
Eric

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



A Sexy/Slick GWT Application?

2010-02-01 Thread Andy
I've been looking at a lot of the demos for the 3rd party GWT plugins;
for example, SmartGWT, and read the various postings on this forum
about who's actually using GWT, but I was wondering if anyone knows of
a really sexy/slick GWT application that not only has a great design,
but uses animation in a meaningful way (rather than for the sake of
it), and even has custom widgets that are more than a collection of
assets arranged in a nice way.

I'm thinking of something along the lines of the Roambi iPhone app
(http://www.roambi.com) or theCappuccino-based Almost.as app (http//
almost.at) (in particular the timeline widget at the bottom of the
screen).

-- 
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: Blur event on FocusPanel is triggered immediately following MouseDown event

2010-02-01 Thread Sky
Wow! Now another FocusPanel's MouseDown event doesn't even fire!
Except I can make it fire if I do the following. When I click on this
element (object B) another element (object A) is losing focus, so if I
put a breakpoint in the onBlur event on that item (object A), then
when I click on the other item (object B) Eclipse breaks into that
code, I hit F8 to continue and what do you know, the MouseDown event
actually fires and everything runs. Do you understand? The MouseDown
event on object B ONLY fires if I have a breakpoint in OnBlur event
for object A!

These problems are ONLY in chrome. All other browsers act as expected.

I can't possibly fix something like this. Can anyone help me? These
problems must be a GWT bug(s).

I'm using GWT 2.0.0, the latest Eclipse, Stable channel of Chrome.

On Feb 1, 6:15 pm, Sky  wrote:
> I click on my FocusPanel and before MouseUp event fires, but after
> MouseDown event, the Blur event is fired, which is very much
> undesired.
>
> This only happens in Chrome, so it may be a Chrome bug. It does not
> happen in FF and IE.
>
> It may be my fault, but I am not explicitly setting focus on any
> elements in my MouseDown code. I do set other aspects of other
> elements, like visibility.
>
> Has anyone else experienced something like this before?

-- 
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: Question regarding presenter in MVP pattern

2010-02-01 Thread Eric
This is in no way an authoritative answer, but I've decided for my app
that defining a Model class and setting and getting a list of that
model is the right way to go:

So I would add
 void setRecipeItems( List items) ;
 List getRecipeItem() ;

to your Display interface.  I'm not totally happy with it, but I think
it beats the parallel arrays solution hands down, especially when you
realize that you need a unit of measure.

Good luck,
Eric

On Jan 31, 4:47 pm, gugguson  wrote:
> Hello.
>
> I'm creating an gwt app which will enable the user to enter recipes.
> I have a presenter with all the basic information like description,
> directions etc. which is defined like this:
>
>   public interface Display {
>     HasClickHandlers getSaveButton();
>     HasClickHandlers getCancelButton();
>     HasValue getRecipeTitle();
>     HasValue getDescription();
>     HasValue getDirections();
>     HasValue getServings();
>     HasValue getTime();
>     HasValue getCourse();
>     Widget asWidget();
>   }
>
> What I'm going to add to this is the recipe lines which are basically
> pair of the ingradient and the amount.  What is the preferred way of
> adding lines to this interface when there can be x many lines?
>
> One method would be to do similar to the gwt samples and add two
> lines, one with the ingradients (list of strings) and other with the
> amount (list of double).  The other method would be to create a class
> which would contain the recipe lines with all information.  If I go
> that route should I have the class in the presenter package?
>
> Regards,
> Johann

-- 
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: Issues with Embedded History Changes

2010-02-01 Thread Michael Mullen
I checked a few other things.

In my loading html document, I've got the following line in the body
section to add history support:


Is this the correct location to have this?

I also just noticed that HistoryListener was depreciated, so I updated
to ValueChangeHandler.  My main section is, for the most part:

public class entry implements EntryPoint, ValueChangeHandler {
   public onModuleLoad() {
  RootPanel.get().add(new MenuObject());
  String initToken = History.getToken();
  if(initToken.length() > 0) {
 onHistoryChanged(initToken);
  } else {
 onHistoryChanged("Home");
  }
  History.addValueChangeHandler(this);
   }
   public void onValueChange(ValueChangeEvent event) {
  onHistoryChanged((String) event.getValue());
   }
   public void onHistoryChanged(String token) {
  Window.alert("Testing " + token);
   }
}

When the page loads, a window appears alerting me to the name of the
token being loaded.  This also occurs while refreshing.  However with
the MenuBar that is displayed, the choice changes the token in the
URL, however no window appears.  If I select Reload in my browser, the
page loads and the window appears.

I've gone back and looked at the previous tutorials I was using for
reference, but it appears that I've got everything.  I could not find
anything in the Showcase example - it looks like I've got everything.

I'm using Chrome 4.0.302.3 dev, as well as Firefox 3.6 for testing.

By chance is there something that I'm missing?


On Jan 30, 2:31 am, Michael Mullen  wrote:
> I was unable to find a solution in the discussion group, and I've been
> unable to find a solution on my own.  I probably missed something and
> apologize ahead of time for draining someone's time.
>
> Here is some code in question:
> ...
> public class entry implements EntryPoint, HistoryListener {
>    public onModuleLoad() {
>       RootPanel.get().add(new MenuObject());
>       History.addHistoryListener(this);
>    }
>    public void onHistoryChanged(String token) {
>       Window.alert("Testing " + token);
>    }
>    ...
>
> }
>
> --- New Class ---
> public class MenuObject extends MenuBar implements Command {
>    public MenuObject() {
>       super();
>       this.addItem(new MenuItem("Test", new Command() {
>          public void execute() {
>             History.newItem("Test");
>          }
>       ));
>       this.addItem(new MenuItem("Test1", new Command() {
>          public void execute() {
>             History.newItem("Test1");
>          }
>       ));
>    }
>
> }
>
> In this case, I've found that the selection of any MenuItem in my
> custom MenuBar will not cause a change history event to occur.  If I
> were to place a complete MenuBar object in my entry point (not
> separated into a different class), the change history event will
> occur.
>
> At the same time, the history token updates in either case.  There are
> no problems with the tokens in my browsers.
>
> Is there anything that you guys could recommend to get history changes
> by the external MenuBar class to trigger the history change event?

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



Blur event on FocusPanel is triggered immediately following MouseDown event

2010-02-01 Thread Sky
I click on my FocusPanel and before MouseUp event fires, but after
MouseDown event, the Blur event is fired, which is very much
undesired.

This only happens in Chrome, so it may be a Chrome bug. It does not
happen in FF and IE.

It may be my fault, but I am not explicitly setting focus on any
elements in my MouseDown code. I do set other aspects of other
elements, like visibility.

Has anyone else experienced something like this before?

-- 
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: Resymbolization

2010-02-01 Thread Andy
I'm not sure if this is (or is contributing to) the problem, but I'm
using HTTPS.

On Jan 29, 11:46 am, Andy  wrote:
> I'm trying to use the HttpThrowableReporter to send exception
> information to the server, but it isn't working for me.
>
> The HttpThrowableReporter is building the JSON payload correctly, and
> calling my Servlet, but when I debug the HttpServletRequest, there's
> no JSON string in it!
>
> Does anyone have any suggestions?

-- 
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: UiBinder and abstract class

2010-02-01 Thread matttai
You are probably setting setWidget(uiBinder.createAndBindUi(this)); in
the extended class. I don't see your bind statement for the second
class so i cannot tell so it is just a guess.

Bind the loginbox content for the LoginDialogBox as a widget and pass
it in for your bind in the setContent(content); statement

On Feb 1, 10:22 pm, damians  wrote:
> Hello,
>
> I've got a problem and i googled lots of pages to see if anyone got
> the same problem but i didn't find anything.
>
> I've got class AbstractDialog that extends DialogBox with some
> standart buttons like OK CANCEL that are bound by UiBinder. I've got
> another class that extends AbstractDialog with another declarative xml
> file, that contains only the main content of that DialogBox.
>
> When am trying to lunch application i got this error:
> Rebinding .UiBinder
>   Invoking com.google.gwt.dev.javac.standardgeneratorcont...@a51c3c
>     Method 'ok' can not be bound. You probably missed
> ui:field='okButton' in the template.
>
> Method ok and UiHandler for button okVutton is declared in
> AbstractDialog. From class that extends AbstractDialog the UiField is
> not visible. Am i doing something wrong or i just didnt saw any
> information that you can not extends an object tha got his own
> UiBinder and extended class got their own UiBinder as well.
>
> My code:
>
> AbstractDialogBox.java
>
> public abstract class AbstractDialogBox extends DialogBox
> {
>         private static AbstractDialogBoxUiBinder uiBinder = GWT.create
> (AbstractDialogBoxUiBinder.class);
>
>         interface AbstractDialogBoxUiBinder extends UiBinder AbstractDialogBox>
>         {
>         }
>
>         @UiField Button okButton;
>         @UiField Button cancelButton;
>         @UiField Label emptyLabel;
>         @UiField VerticalPanel main;
>
>         public AbstractDialogBox()
>         {
>                 setWidget(uiBinder.createAndBindUi(this));
>                 setStyleName("oe-DialogBox");
>
>                 okButton.setText("OK");
>                 cancelButton.setText("CANCEL");
>         }
>
>         public void setContent(Widget content)
>         {
>                 main.add(content);
>         }
>
>         @UiHandler("okButton")
>         void ok(ClickEvent e)
>         {
>                 onOK();
>         }
>
>         @UiHandler("cancelButton")
>         void cancel(ClickEvent e)
>         {
>                 onCancel();
>         }
>
>         public void keyPress(KeyPressEvent event)
>         {
>                 if (event.getCharCode() == 13)
>                         onOK();
>                 else if (event.getCharCode() == 27)
>                         onCancel();
>         }
>
>         public abstract void onOK();
>         public abstract void onCancel();
>
> }
>
> AbstractDialog.ui.xml
>
> http://dl.google.com/gwt/DTD/xhtml.ent";>
>          xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
>         
>         
>                 
>                          width="100%"/> td>
>                 
>                 
>                          width="140px"/>
>                          styleName="dialogButton"/>
>                          styleName="dialogButton"/> td>
>                 
>         
>         
> 
>
> LoginOptionDialog.java that extends AbstractDialog
>
> public class LoginOptionDialog extends AbstractDialogBox
> {
>         private static LoginOptionDialogUiBinder uiBinder = GWT.create
> (LoginOptionDialogUiBinder.class);
>         interface LoginOptionDialogUiBinder extends UiBinder LoginOptionDialog>   {}
>
>         @UiField Image icon;
>         @UiField Label descIp;
>         @UiField TextBox ip;
>         @UiField HTMLPanel content;
>
>         public LoginOptionDialog()
>         {
>                 super();
>
>                 setText("Login options");
>
>                 descIp.setText("Server IP:");
>                                 ip.setText("Enter ip");
>
>                                 setContent(content);
>         }
>
>         @UiHandler("ip")
>         public void press(KeyPressEvent event)
>         {
>                 keyPress(event);
>         }
>
>         public void onCancel()
>         {
>                 // restore ip text from application context
>                 hide();
>         }
>
>         public void onOK()
>         {
>                 // set ip in application context
>                 hide();
>         }
>
> }
>
> LoginOptionDialog.ui.xml
>
> http://dl.google.com/gwt/DTD/xhtml.ent";>
>          xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
>  
>   
>    
>      height="23px"/>
>      styleName="dialogText" wordWrap="false" width="126px"/>
>     
>
>    
>   
>  
>
> 
>
> Enviroment that am using to launch it:
>
> public class Application implement EntryPoint
> {
>     private LoginOptionDialog loginOptionDialog;
>     private Button optionButton;
>
>     public void onModuleLoad()
>     {
>        optionButton = new Button("Options");
>        optionButton.addClickHandler(new ClickHan

Re: Is it possible to detect if a popup (opened by Window.open(..) ) has been closed?

2010-02-01 Thread darkflame
For other peoples reference I found a solution/work-around;

Triggered from the popup window itself, I added code that could
communicate back to that which opened it.

Native javascript like this would trigger the history;
window.opener.location.hash = "meep2";

Or something like this to trigger a native function on the source
window;
window.opener.sendFunctionToMainFrame('retestlogin','retestlogin');

Thanks for trying to help.
-Thomas

On Feb 1, 3:15 pm, Thomas Wrobel  wrote:
> I think that only monitors the current window :-/
>
> On 1 February 2010 14:39, mariyan nenchev  wrote:
>
>
>
> > Hi,
>
> > what about Window.addCloseHandler(...);?
>
> > --
> > 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.

-- 
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: Suggestions for dealing with Timers

2010-02-01 Thread Sean
Thanks Vitali, I just made a test with IncrementalCommand, and you are
correct. I wasn't seeing the behavior I was looking for.

And I misunderstood where you wanted to use the timers. I am smacking
my forehead for not figuring that out before. Thank you very much.
That is exactly what I need to do!

On Feb 1, 3:15 pm, Vitali Lovich  wrote:
> So you would obviously have to change it.  Incremental command wouldn't help
> you since you are doing animation Incremental commands are just a way of
> allowing long-running data processes to maintain an interactive UI -
> otherwise the UI would block while you did your processing. Thus they don't
> help you here since you cannot control the interval.
>
> MyBinClass [] unsortedBins;
> int interval = 1000;
>
> new Timer() {
>     private final MyBinClass [] bins = unsortedBins;
>     private int bin = 0;
>     public void run()
>     {
>                     if (bin >= bins.length) {
>                            return;
>                     }
>                     moveBinToCorrectSpot(bins[bin]);
>                     bin++;
>                     schedule(interval); // schedule the next step to run a
> second after this one
>     }
>
> }).schedule(0); // start the animation now.
>
> This way, you can even adjust the sort interval between each step (if you
> want to speed up during the animation or allow control by a slider).
>
> Also, I'd take a look at the Animation
> class as well which might help you with saying this animation must
> complete in 10 seconds, and
> base your calculations of the progress (since computer speed is variable)
>
> On Mon, Feb 1, 2010 at 11:37 AM, Sean  wrote:
> > Hi Vitali,
>
> > That is what I'm doing now. However, I'm going to have something like
> > //For example
> > for(bin : bins)
> > {
> >   moveBinToCorrectSpot(bin)
>
> > }
>
> > So each Bin will get it's own timer in moveBinToCorrectSpot that moves
> > it to it's right spot. However, they'll all animate at the same time.
>
> > Jeff,
>
> > I will have to check out IncrementalCommand, I've never seen that
> > before.
>
> > Thanks for the tips all!
>
> > On Feb 1, 12:53 pm, Sean  wrote:
> > > I"m trying to do a visual sort. Imagine a bubble sort where you see
> > > the items move from one bucket to the next. The way I would move them
> > > visually is use a Timer with an AbsolutePanel and move them up.
>
> > > However, I wouldn't want to move the next guy until my last one has
> > > finished animating. If I do that, then everything will animate at once
> > > making a big mess that ends up correct, but you can't see the process
> > > happening clearly.
>
> > > What I would want is, on the timer finishing, I'd like to do a
> > > CallBack and say, I'm done, u can do the next one.
>
> > > What's the correct way to handle this? a While(Timer!=null){sleep}
> > > type thing or somehow fake an AsyncCallback or some other way?
>
> > > Thanks in advance for your suggestions!
>
> > --
> > 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.

-- 
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: Suggestions for dealing with Timers

2010-02-01 Thread Vitali Lovich
So you would obviously have to change it.  Incremental command wouldn't help
you since you are doing animation Incremental commands are just a way of
allowing long-running data processes to maintain an interactive UI -
otherwise the UI would block while you did your processing. Thus they don't
help you here since you cannot control the interval.

MyBinClass [] unsortedBins;
int interval = 1000;

new Timer() {
private final MyBinClass [] bins = unsortedBins;
private int bin = 0;
public void run()
{
if (bin >= bins.length) {
   return;
}
moveBinToCorrectSpot(bins[bin]);
bin++;
schedule(interval); // schedule the next step to run a
second after this one
}
}).schedule(0); // start the animation now.

This way, you can even adjust the sort interval between each step (if you
want to speed up during the animation or allow control by a slider).

Also, I'd take a look at the Animation
class as well which might help you with saying this animation must
complete in 10 seconds, and
base your calculations of the progress (since computer speed is variable)

On Mon, Feb 1, 2010 at 11:37 AM, Sean  wrote:

> Hi Vitali,
>
> That is what I'm doing now. However, I'm going to have something like
> //For example
> for(bin : bins)
> {
>   moveBinToCorrectSpot(bin)
>
> }
>
> So each Bin will get it's own timer in moveBinToCorrectSpot that moves
> it to it's right spot. However, they'll all animate at the same time.
>
> Jeff,
>
> I will have to check out IncrementalCommand, I've never seen that
> before.
>
> Thanks for the tips all!
>
> On Feb 1, 12:53 pm, Sean  wrote:
> > I"m trying to do a visual sort. Imagine a bubble sort where you see
> > the items move from one bucket to the next. The way I would move them
> > visually is use a Timer with an AbsolutePanel and move them up.
> >
> > However, I wouldn't want to move the next guy until my last one has
> > finished animating. If I do that, then everything will animate at once
> > making a big mess that ends up correct, but you can't see the process
> > happening clearly.
> >
> > What I would want is, on the timer finishing, I'd like to do a
> > CallBack and say, I'm done, u can do the next one.
> >
> > What's the correct way to handle this? a While(Timer!=null){sleep}
> > type thing or somehow fake an AsyncCallback or some other way?
> >
> > Thanks in advance for your suggestions!
>
> --
> 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.
>
>

-- 
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: Suggestions for dealing with Timers

2010-02-01 Thread Sean
Hi Vitali,

That is what I'm doing now. However, I'm going to have something like
//For example
for(bin : bins)
{
   moveBinToCorrectSpot(bin)

}

So each Bin will get it's own timer in moveBinToCorrectSpot that moves
it to it's right spot. However, they'll all animate at the same time.

Jeff,

I will have to check out IncrementalCommand, I've never seen that
before.

Thanks for the tips all!

On Feb 1, 12:53 pm, Sean  wrote:
> I"m trying to do a visual sort. Imagine a bubble sort where you see
> the items move from one bucket to the next. The way I would move them
> visually is use a Timer with an AbsolutePanel and move them up.
>
> However, I wouldn't want to move the next guy until my last one has
> finished animating. If I do that, then everything will animate at once
> making a big mess that ends up correct, but you can't see the process
> happening clearly.
>
> What I would want is, on the timer finishing, I'd like to do a
> CallBack and say, I'm done, u can do the next one.
>
> What's the correct way to handle this? a While(Timer!=null){sleep}
> type thing or somehow fake an AsyncCallback or some other way?
>
> Thanks in advance for your suggestions!

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



Usage of two modules that share sessions id ?

2010-02-01 Thread Nico
Hi,

I am building a website with GWT. There is a login page on this
website that send a session id to client when user is logged in. I'm
using the Servlet HttpSession object to get id.

Somewhere in the website, there is a link that load a new GWT module
page. This is a different module because this a big part of the
application that is very independant and could be packaged without the
website. Now, I would like that both module use same Session (do not
want to login user twice).

To do this, I store my session id in a cookie and when an application
loads, it reads cookie to know session Id (or send the client to the
login page if no cookie), then session it is checked on server.
This system works if I merge the two modules insite a single tomcat
application. They will use the same HttpSession.

But If I want to use the mechanism with Hosted mode, it does not work
since both application modules are running in a different Thread, and
each one have a different HttpSession.

Do you have an idea about how to have a such working system in Hosted
mode ?
Do you know too, if it is possible to debug two application at the
same time?
Eclipse allows to selects a port to start an application, (default is
) but we can't selects a port for the debug connection (default
9997). Is there a way to chose something difference than 9997 ?

Thanks,

Nicolas.

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



How Do I Change the Welcome File?

2010-02-01 Thread Russ
I created an app, and now I want to run it in a different HTML file. I
created the new HTML file, placed it in the war directory, made sure
the new HTML file has the correct RootPanels and changed the  in the web.xml file to refer to the new HTML file.

But my app is still not displaying in the new page. I even tried re-
compiling. Hosted mode loads the new page, but the app doesn't show.

What other changes do I need to make in order to have my app use a
different welcome file?

Thank you,
-Russ

-- 
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: Struts2 GWT and classpath

2010-02-01 Thread Henry
You're probably getting a classpath problem.
Can you confirm its a classpath exception?

What's the error on the Development Mode window printing?

In the
Run->Debug Configurations...->g(oogle) Web Application
window there is a Classpath Tab
Make **SURE** that under the
User Entries Tree you have
"src"
This can be added via Advanced...->Add Folders
Yes, you add "src" to your classpath - this is strictly for GWT

Cheers,
Henry


On Jan 31, 6:29 pm, finneycanhelp  wrote:
> Thank you. I am farther along now.  I learned much from -help as you
> suggested.
>
> I also think I understand that one runs two servers; 1 is run for GWT
> (such as using a debug configuration) and the other server for the
> struts 2 web server (via eclipse project right click - Run As - Run on
> Server).
>
> I was pretty excited to see eclipse 
> offer:http://localhost:/s2?gwt.codesvr=10.0.0.2:9997
> as a url to use when running in Debug mode for GWT. That's progress.
>
> The web browser redirects 
> fromhttp://localhost:/s2?gwt.codesvr=10.0.0.2:9997
> tohttp://localhost:/s2/That's different than the hello-world GWT
> app URL which has ".html" in it; See Sgwt.html 
> -->http://localhost:53650/Sgwt.html?gwt.codesvr=10.0.0.2:9997
>
> I wanted the host page to come up with the typical hello world GWT app
> of "Please enter your name: " that a new GWT project via eclipse
> plugin gives you. However I get a blank web browser page.  I am not
> sure why the browser redirects to the module root like that.
>
> Help?  :)
>
> On Jan 31, 12:30 am, Henry  wrote:
>
> > Hi Finney,
>
> > You can specify args to DevMode
>
> > Run->Debug Configurations...->g(oogle) Web Application->New
> > in the Arguments tab, you can add the name of your module(s)
> > If in doubt, add the
> > -help
> > arguments in the Arguments tab
>
> > Cheers,
> > Henry
> > p.s. checkouthttp://code.google.com/p/struts2gwtplugin
> > and let me know what you think of that plugin
>
> > On Jan 30, 7:34 pm, finneycanhelp  wrote:> Quick 
> > follow up / add on:
>
> > >  I see the post about Maven and GWT 
> > > athttp://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
> > > However, my real concern is with a struts2 project (s2project) that
> > > has:
> > >   - /s2project/WebContent folder which contains index.jsp, WEB-
> > > INF, ...
>
> > >   - /s2project/WebContent/WEB-INF/classes is the output folder
>
> > >   - /s2project/src folder which contains java source and struts.xml
>
> > >   - /s2project/ivy.xml file
>
> > > Thanks again for any help.
>
> > > On Jan 30, 9:16 pm, finneycanhelp  wrote:
>
> > > > Hi,
>
> > > > My goal is to GWT-ize a struts2 (S2) project.  I read the archives of
> > > > this list. Although email threads were quite informative, I do not see
> > > > the answer to this situation regarding the Java classpath and GWT.
>
> > > > Tools:
> > > >   I am using eclipse Java EE IDE for Web Developers (3.5.1) and the
> > > > GWT eclipse plugin (1.2.0) with GWT 2.0.
>
> > > >   I created a GWT hello world application to compare to the small
> > > > struts 2 application I am trying to enhance.
>
> > > > Project layout:
> > > >   - In the struts2 project, the S2 web application has its WEB-INF in /
> > > > s2/src/main/webapp/WEB-INF and its output (.class files) go into "s2/
> > > > target/classes"  It's a standard maven project.
>
> > > >   - I see GWT has its WEB-INF located in /sgwt/war/WEB-INF and the
> > > > output of the project is "sgwt/war/WEB-INF/classes"
>
> > > > What I did:
>
> > > >   - I changed the S2 project properties in the Google Web Toolkit
> > > > dialog box to Use Google Web Toolkit.
>
> > > >   - I also did the following:
>
> > > >   + read the document at:
> > > >    
> > > > http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjec...
>
> > > >   + copied/modified over components from the brand new GWT web
> > > > application
>
> > > > My current obstacle / challenge is knowing how to add s2.gwt.xml,
> > > > s2.html, s2.css so they are visible to the Jetty development mode of
> > > > GWT.
>
> > > > By hand, I copied over the s2.gwt.xml file into /s2/src/main/
> > > > resources   However things did not work quite right. Trying a url
> > > > like:http://localhost:/Sgwt.html?gwt.codesvr=10.0.0.2:9997 but
> > > > for the s2 project did not work.
>
> > > > How do I change the development mode of GWT in eclipse to use the s2
> > > > resources ( \s2\target\classes ) ?
>
> > > > I will have a similar issue with another struts2 project but it is not
> > > > in a standard maven project setup. It has a WebContent folder which
> > > > contains a WEB-INF folder and so on.
>
> > > > Thank you for your help.
>
> > > > Sincerely,
> > > > 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
Fo

Re: Suggestions for dealing with Timers

2010-02-01 Thread Vitali Lovich
The way I would do it would be:

Timer t = new Timer() {

  public void run() {
 // do one pass of the sort
  }
};

// Schedule the timer to run once in 5 seconds.
t.schedule(interval);

where interval is how frequently you wish to animate.

Remeber - javascript is single threaded.  There is no sleep mechanism.

On Mon, Feb 1, 2010 at 9:53 AM, Sean  wrote:

> I"m trying to do a visual sort. Imagine a bubble sort where you see
> the items move from one bucket to the next. The way I would move them
> visually is use a Timer with an AbsolutePanel and move them up.
>
> However, I wouldn't want to move the next guy until my last one has
> finished animating. If I do that, then everything will animate at once
> making a big mess that ends up correct, but you can't see the process
> happening clearly.
>
> What I would want is, on the timer finishing, I'd like to do a
> CallBack and say, I'm done, u can do the next one.
>
> What's the correct way to handle this? a While(Timer!=null){sleep}
> type thing or somehow fake an AsyncCallback or some other way?
>
> Thanks in advance for your suggestions!
>
> --
> 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.
>
>

-- 
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: Upgrade to GWT 2.0 => java.lang.NullPointerException: No API environment is registered for this thread

2010-02-01 Thread Cyril
Error on my side.
When upgrading I unchecked the "Use Google App Engine" option under
project properties/Google/App engine.


On Jan 31, 12:01 pm, Cyril  wrote:
> I just upgraded my working app from GWT 1.7.0 to GWT 2.0 and now when
> I try to run it in dev mode I have the following error message:
> [WARN] /j_spring_security_check
> java.lang.NullPointerException: No API environment is registered for
> this thread.
>         at
> com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId
> (DatastoreApiHelper.java:67)
>         at
> com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamesp 
> ace
> (DatastoreApiHelper.java:77)
> etc...
>
> Any pointer is welcome.
>
> Thanks a lot
>
> Cyril

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



Using a widget that requires constructor args

2010-02-01 Thread Lorenzo
Hi all,
can someone put an example of how using a widget that requires
constructor args in UiBinder?

I tried starting from the (very poor) documentation, but I couldn't do
it

I'm a newbie of GWT...

Thanks,
Lorenzo

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



Suggestions for dealing with Timers

2010-02-01 Thread Sean
I"m trying to do a visual sort. Imagine a bubble sort where you see
the items move from one bucket to the next. The way I would move them
visually is use a Timer with an AbsolutePanel and move them up.

However, I wouldn't want to move the next guy until my last one has
finished animating. If I do that, then everything will animate at once
making a big mess that ends up correct, but you can't see the process
happening clearly.

What I would want is, on the timer finishing, I'd like to do a
CallBack and say, I'm done, u can do the next one.

What's the correct way to handle this? a While(Timer!=null){sleep}
type thing or somehow fake an AsyncCallback or some other way?

Thanks in advance for your suggestions!

-- 
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: Ext/GXT/ExtGWT v2.1.0 vs. SmartGWT v2.0

2010-02-01 Thread ckendrick
@Tercio I'm not able to follow the distinction you wish to make
between "behavior" and "functionality", but in terms of what the Java
language calls an override, yes SmartGWT supports it.  Demonstrated
here among many other places:

   http://www.smartclient.com/smartgwt/showcase/#grid_appearance_hilite_add

As far SmartGWT's free vs commercial breakdown is exceeding the
simple: the commercial versions include Java Server functionality.
It's explained clearly here:

   http://www.smartclient.com/product/

We also make a nice clean, clear distinction in the showcases.
Everything in this one is free:

   http://www.smartclient.com/smartgwt/showcase/

This one has commercial functionality:

   http://www.smartclient.com/smartgwtee/showcase/

There is no "mystery" or "risk" regarding what is free and what is
not, or whether it's useful.

Some other mis-statements in this thread:

1. the free version of SmartGWT supports databinding as well.
Approaches are covered here:

   
http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/ClientDataIntegration.html

2. someone mentioned "already having" a server.  SmartGWT's server-
side functionality integrates with any pre-existing server-side
functionality and provides features that don't exist in any server-
side library, so it applies regardless of whether you have a server or
not.  Two examples:

Client and server-side validation driven from a single definition, so
you don't have to set up validation logic in both places:

   
http://www.smartclient.com/smartgwtee/showcase/#data_integration_form_validation

Automated aggregation of client-side requests into a compound request
to make transaction handling easier, cut down on HTTP requests and
simplify the re-use of data services:

   http://www.smartclient.com/smartgwtee/showcase/#row_drag_save

And a deeper explanation of how SmartGWT's server-side features apply
even if you have a pre-existing persistence system and business logic:

   
http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/FeaturesCustomPersistence.html

OK, that's it from the misconception police for today :)

On Feb 1, 6:24 am, Tom Schindl  wrote:
> Though many people think that Overloading/Overwriting and JSNI don't
> really fit together.
> I think they do if you are a bit creative.
>
> If you are interested in how I solved this problem for QxWT you should
> take a look at this series of posts.
>
> [1]http://tomsondev.bestsolution.at/2010/01/05/background-to-qxwt-and-gw...
> [2]http://tomsondev.bestsolution.at/2010/01/10/qxwt-explained-part-2/
> [3]http://tomsondev.bestsolution.at/2010/01/12/qxwt-explained-part-3/
> [4]http://tomsondev.bestsolution.at/2010/01/15/qxwt-explained-part-4/
>
> The overloading/overwriting use case is discussed in [3]. I have no
> deeper insights in SmartGWT but I guess writing something like this is
> possible for their set of widgets as well (Probably one can extract
> the code I've written for QxWT and make it useable to any JSNI-Wrapper
> and even improve the functionality e.g. calling back to JavaScript
> without writing any line of code, ... a rather advanced example can be
> found here [5]).
>
> BTW QxWT is completely free - everything is dual licensed under EPL and LGPL.
>
> Tom
>
> [5]https://svn.tomsondev.com/svn/ufacekit/qx/org.ufacekit.qx.viewers/src...
>
> On Mon, Feb 1, 2010 at 2:44 PM, Tercio  wrote:
> >>    - Both GXT and Smart GWT are pure gwt (no underlying native JS library,
> >>    so expect equivalent speed/performance from the GWT compiler).
>
> > Nope, SmartGWT is a wrapper to SmartClient JS Library.
>
> > ckendrick and I have different understandings about override ... :-P
> > We already discussed this some time ago ...
>
> > SmartGWT you can't override it's functionality, just it's behavior.
>
> > SmartGWT is more feature rich than GXT, but I don't like their
> > licensing terms, I prefer GXT one, not only because the price, but the
> > features, we just need a UI framework, the server we already have one.
>
> > Regards.
>
> > --
> > 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 
> > athttp://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-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: How to apply MVP in Views inside View situation?

2010-02-01 Thread Jeff Chimene
On Sun, Jan 31, 2010 at 11:35 AM, Jethro Lai  wrote:

> I am new to this GWT MVP pattern even though I've been doing GWT for a
> while.
>
> Let me explain the problem I have. There is view in my application
> which is a list of words and the info within them.
> It's pretty much like the home page of UrbanDictionary. There are a
> list of words, and each word has much more info and UI components than
> ContactsView in Contacts example on Google's MVP tutorial page. My
> question is if we should not let View know about the data model, then
> how I can pass those info to this view


I'd really recommend adding gin to your toolkit. It'll make all this stuff
much easier.

Are you using the gwt-presenter framework? If so, inside your presenter:
display.addToList(word);



> and also I want to user to
> navigate to another view when they click word's title, and they can
> rate each word when they click thumb up or down.
>

So you want a sub-view? Create a "Rate This Word" event. Have a RateThisWord
presenter listen for the event and popup a RateThisWord view.


>
> So right now I have a DailyWordsView and DailyWordsPresenter. In this
> view, there should be couple items and each of them represents one
> word of a day.  Now there are two things I can do after I retrieve a
> list of word infos from server (List).
>
> 1, I can create a view for each DefinitionInfo and add it to
> DailyWordsView. So simply DailyWordsView is a vertical panel and
> couple WordOfDayViews reside in it.
>

No. Way too complicated. Keep the VerticalPanel and have your view add words
on request from your presenter.


> Two problems if I do this. One, there is no action I need from
> DailyWordsView, because all interactions I need are within each
> WordOfDayView. Two, when I pass a DefinitionInfo to a WordOfDayView,
> it doesn't attach to the view-does-not-know-data-model rule anymore.
> It's more coupled this way.
>
> 2, I can only have one view which is DailyWordsView, and awkwardly
> pass a list of lists of info,
> it could look something like:
>  void setData(ArrayList dates, ArrayList titles,
>ArrayList definers,
> ArrayList contents,
>ArrayList examples,
> ArrayList rateUps,
>ArrayList rateDowns);
>

I'd flatten this into a setData call inside an iterator over dates.
(for i = 0; i < dates.length(); i++) {
  setData(dates(i), titles(i), definers(i)...);
}

Somebody is going to have to iterate over those arrays. Your presenter knows
that they're arrays. Hide that info from the view; there's no reason it
needs to know those details.

and then create each item, but not new views, and add them to
> DailyWordsView. Now it becomes hard for me to keep track on which item
> is reacting to user's action. So I must have
> int getClickedRateUpId(ClickEvent event);
> int getClickedRateDownId(ClickEvent event);
> int getClickedTitleId(ClickEvent event);
> in my Display interface in DailyWordsView,
>

So? The event keeps track of the source of each event. You'd need those
events anyway. The events fire a message to the Presenter which then updates
the Model.


> and also keep the list of DefinitionInfo for the moment I fire an
> event.
>

In the presenter? That's correct.


> This is more decoupled but very awkward.
>

Probably not as awkward as you think, and definitely easier to test.

-- 
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: Supported Browsers

2010-02-01 Thread R.Domingo
Thank you all for replying!

My question was triggered about the news flash that google will stop
supporting IE6 and some other older browsers as described on:
http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html

But it seems this has no immediate impact on GWT (at this time...).


On Feb 1, 4:15 pm, Thomas Broyer  wrote:
> On Feb 1, 3:55 pm, "R.Domingo"  wrote:
>
>
>
> > Is there any documentation available about which browsers are
> > supported by gwt 2.0 ?
> > If so, could you please inform me where to find it.
>
> http://code.google.com/webtoolkit/doc/latest/FAQ_GettingStarted.html#...
>
> Seems a bit out of date though, as I've heard that only the latest
> Opera version was supported (which means Opera 10.x nowadays); and
> Firefox 3.6 is obviously supported (I'm not sure unit tests are being
> run in Firefox 3.6 though, but as long as it doesn't break compat'
> with 3.5, it should work –and I haven't seen any bug report here apart
> from the DevMode not working, which is a different story–)

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



Co-existing 1.7.1 projects and 2.0 projects

2010-02-01 Thread Pieter Breed
Hi,

Our team have several version of our software going at the same time.
The current version runs on GWT 1.7.1; our next version will maybe
ship with GWT 2.0 so we are trying to do the upgrade. We have
installed the new google eclipse plugin, but now we can't get our
1.7.1 apps to work anymore in hosted mode. It keeps on trying to load
the browser plugin system of GWT2, which obviously wont work.

I can't find the old plugin which I will happily use, can somebody
here maybe point me to a mirror of it? Is there something else that I
am missing? I've tried to remove the hosted.html file; it has no
effect.

Regards,
P

-- 
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: Some question about Serialization tricks...

2010-02-01 Thread Paul Robinson
You don't *have* to use IsSerializable. Serializable is also supported. See
http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideSerializableTypes

and

http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html#Does_the_GWT_RPC_system_support_the_use_of_java.io.Serializable

Paul

BM wrote:
> Hi, folks.
> I have a little question that I haven't figured out myself (mea
> culpa). Since GWT requires IsSerializable, how better I can avoid
> hassle with duplicating redundant Java Beans? The way it works for me
> now: one JavaBean is for database, another is for GWT, but both of
> them are identical (GWT's one IsSerializable — that's the only a
> difference so far).
>
> I will explain you how I am doing now (not sure it is best way, but it
> works so far). For example, suppose I have a completely separated
> library, called "Database Operations". It looks like this:
>
> DatabaseOperations op = new DatabaseOperations(jndiStringOfJDBC);
> List hellos = op.getABunchOfHellos();
>
> Now, the code above will return me a list of HelloBean that has a
> method .getHelloWorldText() for example. So far, so good. Now, in
> order to display these beans from the GWT callback in the javascript
> client, I need make sure HelloBean implements IsSerializable and its
> source is in GWT tree, otherwise GWT Compiler will complain and fail.
> Bo!, but that's _another_ project with _another_ namespace etc
> etc. So what I do is simply create a stupid clone of HelloBean for GWT
> that implements IsSerializable and then import HelloBean-not-
> serializable to HelloBean-that-is-serializable. I don't like this way,
> because if I changed something in the service, I have to change a lot
> of stuff elsewhere etc. It is also redundant beans... OTOH, I can not
> find how to avoid this either... :-(
>
> So the question is: how I can get rid of these redundant beans, having
> my HelloBean made once and forever made or where to RTFM about this,
> since I can not find any doc regarding this?
>
> Please note, I don't use ORM due to my own point of view that ORM
> (Hibernate, Top-Link etc) is just a plain wrong idea for actually
> amplify your hassle, rather then solve it. So I have no problem to
> twist my JavaBeans in any direction, basically. I am fine storing in a
> Database any POJO that implements anything (Serializable,
> IsSerializable or nothing at all).
>
> P.S. I am using NetBeans for the development, if this would help.
> Probably not.
>
> --
> BM
>
>   

-- 
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: Supported Browsers

2010-02-01 Thread Thomas Broyer

On Feb 1, 3:55 pm, "R.Domingo"  wrote:
>
> Is there any documentation available about which browsers are
> supported by gwt 2.0 ?
> If so, could you please inform me where to find it.

http://code.google.com/webtoolkit/doc/latest/FAQ_GettingStarted.html#What_browsers_does_GWT_support?

Seems a bit out of date though, as I've heard that only the latest
Opera version was supported (which means Opera 10.x nowadays); and
Firefox 3.6 is obviously supported (I'm not sure unit tests are being
run in Firefox 3.6 though, but as long as it doesn't break compat'
with 3.5, it should work –and I haven't seen any bug report here apart
from the DevMode not working, which is a different story–)

-- 
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: How to write a simple overlay implementation?

2010-02-01 Thread Tom Schindl
My current work on a GWT-Wrapper for Raphael might be interesting to you [1].

Tom

[1]http://tomsondev.bestsolution.at/2010/01/31/qxwt-1-0-1-0-rc1-and-other-cool-stuff/

On Tue, Jan 26, 2010 at 6:45 PM, markww  wrote:
> Ok this is what I came up with:
>
>  public class SVGRect extends Node
>  {
>      protected SVGRect() {}
>
>      public static final native SVGRect create() /*-{
>          var rect = document.createElementNS('http://www.w3.org/2000/
> svg', 'rect');
>          return rect;
>      }-*/;
>  }
>
>  public class SVGPanel extends Node
>  {
>      protected SVGRect() {}
>
>      public native SVGPanel create(String width, String height) /*-{
>          var svg = document.createElementNS('http://www.w3.org/2000/
> svg', 'svg');
>          svg.setAttribute('width', width);
>          svg.setAttribute('height', height);
>          return svg;
>      }-*/;
>  }
>
>  // main module
>  public void onModuleLoad() {
>
>      SVGPanel panel = SVGPanel.create("100%", "100%");
>      Document doc = Document.get();
>      doc.getBody().appendChild(panel);
>
>      SVGRect rect = SVGRect.create();
>      rect.setWidth(100);
>       create / manipulate shapes etc ...
>
>      panel.appendChild(rect);
>  }
>
> I wanted to use overlays since they're supposed to introduce zero
> overhead. If I derive from Widget (like gwt-svg does), then don't we
> have to pay for the extra member variables used in the Widget class?
> I'm worried that if I want to create a large number of rectangles for
> example, then each will have extra data associated with it. The Widget
> implementation looks like this at the start:
>
>  public abstract class Widget {
>        int style, state;
>        Display display;
>        EventTable eventTable;
>        Object data;
>
> so I'm just imaging each rectangle I create in my svg having all that
> extra data associated with it.
>
> @DaveC's comment:
> "Your create method is returning an Element - not an SVGPanel..."
> Yeah I'm not sure if this is right - runs ok (programming by chance) -
> should I really return a Node, then cast it to my SVGRect type? Since
> it's just an overlay, I thought it would be ok.
>
> I may be completely off on all this, any more thoughts would be great.
> I've got dragging svg shapes built in now and all that fun stuff, I'd
> like to make this library available when complete, svg is really cool.
> I also hooked it up to SVG Web, so that if on Internet Explorer, it'll
> use that library to emulate SVG using Flash,
>
> Thanks
>
>
> On Jan 26, 3:19 am, Brett Morgan  wrote:
>> It might be worth checking out the gwt svg implementation in gwt-widget
>> library:
>>
>> http://gwt-widget.sourceforge.net/docs/xref/org/gwtwidgets/client/svg...
>>
>>
>>
>>
>>
>> On Tue, Jan 26, 2010 at 6:22 AM, markww  wrote:
>> > Hi,
>>
>> > I'd like to make some really simple overlay classes in GWT to wrap
>> > some SVG stuff. I'd basically like to get a rectangle drawn, this is
>> > how I do it in javascript:
>>
>> >  var svg = document.createElementNS('http://www.w3.org/2000/svg',
>> > 'svg');
>> >  svg.setAttribute('width', '100%');
>> >  svg.setAttribute('height', '100%');
>> >  document.body.appendChild(svg);
>>
>> >  var rect = document.createElementNS('http://www.w3.org/2000/
>> > svg','rect');
>> >  rect.setAttribute("width","300");
>> >  rect.setAttribute("height","100");
>> >  svg.appendChild(rect);
>>
>> > and now I'm having trouble translating that to GWT. I was hoping I
>> > could do a really thin overlay around all those calls, something like
>> > this:
>>
>> > public class SVGPanel extends JavaScriptObject {
>> >    protected SVGPanel() {}
>>
>> >    public static native SVGPanel create(String width, String height) /
>> > *-{
>> >        var svg = document.createElementNS('http://www.w3.org/2000/
>> > svg', 'svg');
>> >        svg.setAttribute('width', width);
>> >        svg.setAttribute('height', height);
>> >        return svg;
>> >    }-*/;
>> > }
>>
>> > public MyProject implements EntryPoint {
>>
>> >    public void onModuleLoad() {
>> >        SVGPanel panel = SVGPanel.create("100%", "100%");
>> >        Document.get().getBody().appendChild(panel);
>> >    }
>> > }
>>
>> > yeah but I do not have a grasp on how we can jump from the javascript
>> > representation of the SVG stuff to GWT java classes. For one, the
>> > SVGPanel class extends JavaScriptObject, but I can't simply add it to
>> > the Document body class because it's expecting an Element type. If
>> > someone could just point out the right way to do that bridge I should
>> > be able to get going after that.
>>
>> > Also, I'm not sure if this the optimal way to incorporate some simple
>> > SVG classes, should I be modeling them using the DOM classes instead
>> > of trying to use JSNI ?
>>
>> > 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.
>> >

Re: Supported Browsers

2010-02-01 Thread Alexander
http://code.google.com/webtoolkit/gettingstarted.html

Bottom of page

"IE, Chrome, Firefox, Safari, and Opera" I hope this is enough to amaze you.

On 1 February 2010 20:59, mariyan nenchev  wrote:

> All major browsers are supported.
>
>
> On Mon, Feb 1, 2010 at 4:55 PM, R.Domingo  wrote:
>
>> Hello,
>>
>> Is there any documentation available about which browsers are
>> supported by gwt 2.0 ?
>> If so, could you please inform me where to find it.
>>
>> thnx,
>> Raymond
>>
>> --
>> 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.
>>
>>
>  --
> 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.
>



-- 
Regards,
Alexander

-- 
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: Supported Browsers

2010-02-01 Thread mariyan nenchev
All major browsers are supported.

On Mon, Feb 1, 2010 at 4:55 PM, R.Domingo  wrote:

> Hello,
>
> Is there any documentation available about which browsers are
> supported by gwt 2.0 ?
> If so, could you please inform me where to find it.
>
> thnx,
> Raymond
>
> --
> 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.
>
>

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



Supported Browsers

2010-02-01 Thread R.Domingo
Hello,

Is there any documentation available about which browsers are
supported by gwt 2.0 ?
If so, could you please inform me where to find it.

thnx,
Raymond

-- 
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: Can't remove 0 index in ArrayList

2010-02-01 Thread Christian Goudreau
You're right, I'm gonna redo all my views with UiBinder, it'll be a good
time to take a deeper look into this.

Thanks again for your comments

Christian

On Mon, Feb 1, 2010 at 8:34 AM, Martin Trummer wrote:

> I think you should take some time to find out what the problem is/was.
>
> it's quite unlikely that something in the GWT code changed, so that
> such a simple thing would stop working.
> Maybe you just had different data before.
> Thus it may be an indication that you got something wrong in your
> code - difficult to say what when you can't reproduce it.
>
> maybe you got some of your hashCode/equals functions wrong which
> could lead to strange behaviour like this.
>
> however, if it's a project that's not critical or if you
> just feel fine with this, don't waste your time :)
>
> On 1 Feb., 13:11, Christian Goudreau 
> wrote:
> > Yeah, but the thing is that code was working fine prior to gwt 2.0, so I
> > just don't understand why lol
> >
> > Anyway I also tried a simple example like yours and it was working fine,
> so
> > I just gave up finding a solution to a problem that I alreay resolved by
> > doing the alternative way.
> >
> > Thanks
> >
> > Christian
> >
> > On Mon, Feb 1, 2010 at 5:03 AM, Martin Trummer  >wrote:
> >
> > > seems to work for me - here's a little test:
> >
> > >  List list = new ArrayList();
> > >  list.add(6);
> > >  list.add(7);
> >
> > >  list.remove(0);
> > >  list.remove(0);
> >
> > > after that the list is empty again.
> > > tested in development mode with gwt 2.0.0
> >
> > > just a guess: make sure, you call the right function
> > > remove is overloaded.
> >
> > > so if you would call:
> > >  list.remove(new Integer(0));
> > > then nothing would be removed, because there's no integer
> > > object 0 in the list.
> >
> > > On 29 Jan., 20:04, Christian Goudreau 
> > > wrote:
> > > >  protected void removeFacultySucceeded() {
> > > >
> display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
> > > > faculties.remove(faculty);
> > > >  if (!faculties.isEmpty()) {
> > > > faculty = faculties.get(display.getFacultyListSelectedIndex());
> > > > refreshDisplay();}
> >
> > > >  modification = true;
> >
> > > > }
> >
> > > > I was using the selected index instead of object faculty. While
> debugging
> > > I
> > > > confirmed that the first position was 0 ans was an integer... Every
> other
> > > > position was working fine.
> >
> > > > I don't understand that bug either, I've worked around by using an
> > > object.
> >
> > > > Anyway it's not that important, but I wanna know it's just me or it's
> > > > something that should be corrected.
> >
> > > > Christian
> >
> > > > On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer <
> martin.trum...@24act.at
> > > >wrote:
> >
> > > > > show some code or a small test case
> >
> > > > > On 28 Jan., 18:16, Christian Goudreau <
> goudreau.christ...@gmail.com>
> > > > > wrote:
> > > > > > Does anyone had that same problem ? Everything works fine when it
> > > comes
> > > > > to
> > > > > > other indexes, but when I do ArrayList.remove(0), the object is
> still
> > > in
> > > > > > here ! But When I try : ArrayList.remove(object), it work again.
> >
> > > > > > Everything was working well prior to GWT 2.0.
> >
> > > > > --
> > > > > 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.
> >
> > > --
> > >  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.
> >
> >
>
> --
> 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.
>
>

-- 
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: Ext/GXT/ExtGWT v2.1.0 vs. SmartGWT v2.0

2010-02-01 Thread Tom Schindl
Though many people think that Overloading/Overwriting and JSNI don't
really fit together.
I think they do if you are a bit creative.

If you are interested in how I solved this problem for QxWT you should
take a look at this series of posts.

[1]http://tomsondev.bestsolution.at/2010/01/05/background-to-qxwt-and-gwt-generator-integration/
[2]http://tomsondev.bestsolution.at/2010/01/10/qxwt-explained-part-2/
[3]http://tomsondev.bestsolution.at/2010/01/12/qxwt-explained-part-3/
[4]http://tomsondev.bestsolution.at/2010/01/15/qxwt-explained-part-4/

The overloading/overwriting use case is discussed in [3]. I have no
deeper insights in SmartGWT but I guess writing something like this is
possible for their set of widgets as well (Probably one can extract
the code I've written for QxWT and make it useable to any JSNI-Wrapper
and even improve the functionality e.g. calling back to JavaScript
without writing any line of code, ... a rather advanced example can be
found here [5]).

BTW QxWT is completely free - everything is dual licensed under EPL and LGPL.

Tom

[5]https://svn.tomsondev.com/svn/ufacekit/qx/org.ufacekit.qx.viewers/src/main/java/org/ufacekit/qx/viewers/internal/TreeDataCellRenderer.java

On Mon, Feb 1, 2010 at 2:44 PM, Tercio  wrote:
>>    - Both GXT and Smart GWT are pure gwt (no underlying native JS library,
>>    so expect equivalent speed/performance from the GWT compiler).
>
> Nope, SmartGWT is a wrapper to SmartClient JS Library.
>
>
> ckendrick and I have different understandings about override ... :-P
> We already discussed this some time ago ...
>
> SmartGWT you can't override it's functionality, just it's behavior.
>
> SmartGWT is more feature rich than GXT, but I don't like their
> licensing terms, I prefer GXT one, not only because the price, but the
> features, we just need a UI framework, the server we already have one.
>
> Regards.
>
> --
> 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.
>
>

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



UiBinder and abstract class

2010-02-01 Thread damians
Hello,

I've got a problem and i googled lots of pages to see if anyone got
the same problem but i didn't find anything.

I've got class AbstractDialog that extends DialogBox with some
standart buttons like OK CANCEL that are bound by UiBinder. I've got
another class that extends AbstractDialog with another declarative xml
file, that contains only the main content of that DialogBox.

When am trying to lunch application i got this error:
Rebinding .UiBinder
  Invoking com.google.gwt.dev.javac.standardgeneratorcont...@a51c3c
Method 'ok' can not be bound. You probably missed
ui:field='okButton' in the template.

Method ok and UiHandler for button okVutton is declared in
AbstractDialog. From class that extends AbstractDialog the UiField is
not visible. Am i doing something wrong or i just didnt saw any
information that you can not extends an object tha got his own
UiBinder and extended class got their own UiBinder as well.

My code:

AbstractDialogBox.java

public abstract class AbstractDialogBox extends DialogBox
{
private static AbstractDialogBoxUiBinder uiBinder = GWT.create
(AbstractDialogBoxUiBinder.class);

interface AbstractDialogBoxUiBinder extends UiBinder
{
}

@UiField Button okButton;
@UiField Button cancelButton;
@UiField Label emptyLabel;
@UiField VerticalPanel main;

public AbstractDialogBox()
{
setWidget(uiBinder.createAndBindUi(this));
setStyleName("oe-DialogBox");

okButton.setText("OK");
cancelButton.setText("CANCEL");
}

public void setContent(Widget content)
{
main.add(content);
}

@UiHandler("okButton")
void ok(ClickEvent e)
{
onOK();
}

@UiHandler("cancelButton")
void cancel(ClickEvent e)
{
onCancel();
}

public void keyPress(KeyPressEvent event)
{
if (event.getCharCode() == 13)
onOK();
else if (event.getCharCode() == 27)
onCancel();
}

public abstract void onOK();
public abstract void onCancel();
}

AbstractDialog.ui.xml

http://dl.google.com/gwt/DTD/xhtml.ent";>
















LoginOptionDialog.java that extends AbstractDialog

public class LoginOptionDialog extends AbstractDialogBox
{
private static LoginOptionDialogUiBinder uiBinder = GWT.create
(LoginOptionDialogUiBinder.class);
interface LoginOptionDialogUiBinder extends UiBinder  {}

@UiField Image icon;
@UiField Label descIp;
@UiField TextBox ip;
@UiField HTMLPanel content;

public LoginOptionDialog()
{
super();

setText("Login options");

descIp.setText("Server IP:");
ip.setText("Enter ip");

setContent(content);
}

@UiHandler("ip")
public void press(KeyPressEvent event)
{
keyPress(event);
}

public void onCancel()
{
// restore ip text from application context
hide();
}

public void onOK()
{
// set ip in application context
hide();
}
}

LoginOptionDialog.ui.xml

http://dl.google.com/gwt/DTD/xhtml.ent";>


 
  
   



   
  
 




Enviroment that am using to launch it:

public class Application implement EntryPoint
{
private LoginOptionDialog loginOptionDialog;
private Button optionButton;

public void onModuleLoad()
{
   optionButton = new Button("Options");
   optionButton.addClickHandler(new ClickHandler()
  {
   public void onClick(ClickEvent event)
   {
   loginOptionDialog.setPopupPosition(optionButton.getAbsoluteLeft()
- 100,
 
optionButton.getAbsoluteTop() - 60);

   loginOptionDialog.show();
   }
  });
   loginOptionDialog = new LoginOptionDialog();

RootPanel.get("optionButton").add(optionButton);
}
}

-- 
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: Building GWT from source

2010-02-01 Thread Karan Bhatnagar
I have intentionally not set CLASSPATH, as
http://ant.apache.org/manual/install.html#classpath says so.
Thus I feel it is wrong to specify classpaths using ant argument -lib
path-to-tools-subdir-1 -lib path-to-tools-subdir-2

On Mon, Feb 1, 2010 at 7:41 AM, Karan Bhatnagar
wrote:

> Hi,
>  I am an ant newbie. I am trying to build GWT from source following steps
> as mentioned at http://code.google.com/webtoolkit/makinggwtbetter.html
>  I am facing problem doing that and could not get solution in ant forums.
> 
>  Now when I invoke ant from trunk directory, it first says that a file is
> duplicate.
> BUILD FAILED
> /home/karan/work/gwt/trunk/build.xml:91: The following error occurred while
> executing this line:
> /home/karan/work/gwt/trunk/build.xml:27: The following error occurred while
> executing this line:
> /home/karan/work/gwt/trunk/build.xml:54: The following error occurred while
> executing this line:
> /home/karan/work/gwt/trunk/dev/build.xml:107: The following error occurred
> while executing this line:
> /home/karanb/work/gwt/trunk/common.ant.xml:148: Duplicate file
> org/apache/COPYING was found and the duplicate attribute is 'fail'.
>
> When I re invoke ant without ant clean, it fails to find classes in tools
> directory, for example it says:
> compile:
> [gwt.javac] /home/karan/work/gwt/trunk/dev/build.xml:199: warning:
> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
> to false for repeatable builds
> [gwt.javac] Compiling 138 source files to
> /home/karan/work/gwt/trunk/build/out/dev/bin
> [gwt.javac]
> /home/karanb/work/gwt/trunk/dev/core/src/com/google/gwt/dev/ServletValidator.java:21:
> package org.mortbay.jetty.servlet does not exist
> [gwt.javac] import org.mortbay.jetty.servlet.ServletHandler;
>  {Many such errors}
>
> I reinvoke ant, specifying -lib /home/karan/work/gwt/tools/lib/jetty, then
> jetty package issue is resolved, but rest packages continue giving errors.
> [gwt.javac] /home/karan/work/gwt/trunk/dev/build.xml:199: warning:
> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
> to false for repeatable builds
> [gwt.javac] Compiling 138 source files to
> /home/karan/work/gwt/trunk/build/out/dev/bin
> [gwt.javac]
> /home/karan/work/gwt/trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java:47:
> package org.apache.commons.collections.map does not exist
> [gwt.javac] import org.apache.commons.collections.map.AbstractReferenceMap;
>
> Why do I have to manually give lib path, why can't ant get it by itself as
> the guide makinggwtbetter says. I am also mentioning system info below for
> any hints:
>  Ant is in home/karan/Downloads/
> ka...@karanb:~/Downloads/apache-ant-1.8.0RC1$ ls
> INSTALL  KEYS  LICENSE  NOTICE  README  WHATSNEW  bin  docs  etc  fetch.xml
>  get-m2.xml  lib
>
>  ant is installed properly as I see:
>  ka...@karan:~/work/gwt/trunk$ ant -version
>  Apache Ant version 1.8.0RC1 compiled on January 5 2010
>
> The environment variables are set as :
>  GWT_TOOLS=/home/karan/work/gwt/tools
>  ANT_HOME=/home/karan/Downloads/apache-ant-1.8.0RC1
>
>  The directory /home/karan/work/gwt contains tools and trunk
> subdirectories.
>
>  ka...@karan:~/work/gwt/tools$ ls
>  antlib  lib  redist  sdk
>
>  ka...@karan:~/work/gwt/trunk$ ls
>  build-tools  build.xml  common.ant.xml  dev  dev-ext  distro-source  doc
>  eclipse  jni  platforms.ant.xml  plugins  reference  samples  servlet
>  tools  user
>
> Thanks in advance.
>

-- 
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: UiBinder Templates - Adding a series of HTML elements

2010-02-01 Thread damians
This is normal  creates that.
 it is like .

Try to do :

* DateBox.ui.xml ***


 
 
 
 
 



* MyLayout.ui.xml **




   Leading Stuff 
  
   Trailing Stuff 
   
 




Be carefull of padding and spacing for those tables becouse am sure
you dont wana see the difference in paiting the cells of outer table
and inner tables. Second important thing is the size of that inner
table columns. If this is a date so you are sure that the fileds got
fixed length so you can do like this:

* DateBox.ui.xml ***
...
 
 
 
...

and

* MyLayout.ui.xml **
...
 
...

If you want some padding and spacing you need to change the width
attribute in MyLayout.ui.xml to proper value.

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



Building GWT from source

2010-02-01 Thread Karan Bhatnagar
Hi,
 I am an ant newbie. I am trying to build GWT from source following steps as
mentioned at http://code.google.com/webtoolkit/makinggwtbetter.html
 I am facing problem doing that and could not get solution in ant forums.

 Now when I invoke ant from trunk directory, it first says that a file is
duplicate.
BUILD FAILED
/home/karan/work/gwt/trunk/build.xml:91: The following error occurred while
executing this line:
/home/karan/work/gwt/trunk/build.xml:27: The following error occurred while
executing this line:
/home/karan/work/gwt/trunk/build.xml:54: The following error occurred while
executing this line:
/home/karan/work/gwt/trunk/dev/build.xml:107: The following error occurred
while executing this line:
/home/karanb/work/gwt/trunk/common.ant.xml:148: Duplicate file
org/apache/COPYING was found and the duplicate attribute is 'fail'.

When I re invoke ant without ant clean, it fails to find classes in tools
directory, for example it says:
compile:
[gwt.javac] /home/karan/work/gwt/trunk/dev/build.xml:199: warning:
'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
to false for repeatable builds
[gwt.javac] Compiling 138 source files to
/home/karan/work/gwt/trunk/build/out/dev/bin
[gwt.javac]
/home/karanb/work/gwt/trunk/dev/core/src/com/google/gwt/dev/ServletValidator.java:21:
package org.mortbay.jetty.servlet does not exist
[gwt.javac] import org.mortbay.jetty.servlet.ServletHandler;
 {Many such errors}

I reinvoke ant, specifying -lib /home/karan/work/gwt/tools/lib/jetty, then
jetty package issue is resolved, but rest packages continue giving errors.
[gwt.javac] /home/karan/work/gwt/trunk/dev/build.xml:199: warning:
'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
to false for repeatable builds
[gwt.javac] Compiling 138 source files to
/home/karan/work/gwt/trunk/build/out/dev/bin
[gwt.javac]
/home/karan/work/gwt/trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java:47:
package org.apache.commons.collections.map does not exist
[gwt.javac] import org.apache.commons.collections.map.AbstractReferenceMap;

Why do I have to manually give lib path, why can't ant get it by itself as
the guide makinggwtbetter says. I am also mentioning system info below for
any hints:
 Ant is in home/karan/Downloads/
ka...@karanb:~/Downloads/apache-ant-1.8.0RC1$ ls
INSTALL  KEYS  LICENSE  NOTICE  README  WHATSNEW  bin  docs  etc  fetch.xml
 get-m2.xml  lib

 ant is installed properly as I see:
 ka...@karan:~/work/gwt/trunk$ ant -version
 Apache Ant version 1.8.0RC1 compiled on January 5 2010

The environment variables are set as :
 GWT_TOOLS=/home/karan/work/gwt/tools
 ANT_HOME=/home/karan/Downloads/apache-ant-1.8.0RC1

 The directory /home/karan/work/gwt contains tools and trunk subdirectories.

 ka...@karan:~/work/gwt/tools$ ls
 antlib  lib  redist  sdk

 ka...@karan:~/work/gwt/trunk$ ls
 build-tools  build.xml  common.ant.xml  dev  dev-ext  distro-source  doc
 eclipse  jni  platforms.ant.xml  plugins  reference  samples  servlet
 tools  user

Thanks in advance.

-- 
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: SuggestBox doesnt work in IE 6

2010-02-01 Thread Bogdan Maryniuck
Screw MSIE 6. It is not supported anymore neither by Microsoft, nor by Google.


On Mon, Feb 1, 2010 at 4:22 PM, forewar  wrote:
> When I try to show suggestion list in Internet Explorer 6, I just get
> Javascrpt error "Invalid class string" and suggestion list doesnt
> appear of
> course. IE7 and all other browsers work fine.
>
> AsyncCallback callback = new AsyncCallback() {
>          public void onSuccess(ArrayList result){
>            ...
>            // my function works fine
>            SuggestBox sbb = getSuggestBoxByElementId
> (innerSuggesterId);
>            // suggestbox value and 'success1' appear successfully
>            Window.alert(sbb.getValue());
>            Window.alert("success1");
>            sbb.showSuggestionList();
>            // alert 'success2' never appears
>            Window.alert("success2");
>          }
>            ...
>
> This problem also occures even in GWT examples.
> http://gwt.google.com/samples/Showcase/Showcase.html#CwSuggestBox
> Their
> suggestBox doesnt work in my IE6
>
> I also created an issue 
> http://code.google.com/p/google-web-toolkit/issues/detail?id=4544
> but havent got the solution yet. Does someone have the same problem?
> Are there any ways to fix it?
>
> --
> 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.
>
>



-- 
bo

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



Question regarding presenter in MVP pattern

2010-02-01 Thread gugguson
Hello.

I'm creating an gwt app which will enable the user to enter recipes.
I have a presenter with all the basic information like description,
directions etc. which is defined like this:

  public interface Display {
HasClickHandlers getSaveButton();
HasClickHandlers getCancelButton();
HasValue getRecipeTitle();
HasValue getDescription();
HasValue getDirections();
HasValue getServings();
HasValue getTime();
HasValue getCourse();
Widget asWidget();
  }

What I'm going to add to this is the recipe lines which are basically
pair of the ingradient and the amount.  What is the preferred way of
adding lines to this interface when there can be x many lines?

One method would be to do similar to the gwt samples and add two
lines, one with the ingradients (list of strings) and other with the
amount (list of double).  The other method would be to create a class
which would contain the recipe lines with all information.  If I go
that route should I have the class in the presenter package?

Regards,
Johann

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



Some question about Serialization tricks...

2010-02-01 Thread BM
Hi, folks.
I have a little question that I haven't figured out myself (mea
culpa). Since GWT requires IsSerializable, how better I can avoid
hassle with duplicating redundant Java Beans? The way it works for me
now: one JavaBean is for database, another is for GWT, but both of
them are identical (GWT's one IsSerializable — that's the only a
difference so far).

I will explain you how I am doing now (not sure it is best way, but it
works so far). For example, suppose I have a completely separated
library, called "Database Operations". It looks like this:

DatabaseOperations op = new DatabaseOperations(jndiStringOfJDBC);
List hellos = op.getABunchOfHellos();

Now, the code above will return me a list of HelloBean that has a
method .getHelloWorldText() for example. So far, so good. Now, in
order to display these beans from the GWT callback in the javascript
client, I need make sure HelloBean implements IsSerializable and its
source is in GWT tree, otherwise GWT Compiler will complain and fail.
Bo!, but that's _another_ project with _another_ namespace etc
etc. So what I do is simply create a stupid clone of HelloBean for GWT
that implements IsSerializable and then import HelloBean-not-
serializable to HelloBean-that-is-serializable. I don't like this way,
because if I changed something in the service, I have to change a lot
of stuff elsewhere etc. It is also redundant beans... OTOH, I can not
find how to avoid this either... :-(

So the question is: how I can get rid of these redundant beans, having
my HelloBean made once and forever made or where to RTFM about this,
since I can not find any doc regarding this?

Please note, I don't use ORM due to my own point of view that ORM
(Hibernate, Top-Link etc) is just a plain wrong idea for actually
amplify your hassle, rather then solve it. So I have no problem to
twist my JavaBeans in any direction, basically. I am fine storing in a
Database any POJO that implements anything (Serializable,
IsSerializable or nothing at all).

P.S. I am using NetBeans for the development, if this would help.
Probably not.

--
BM

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



Can we use TooltipText for a TreeGridField

2010-02-01 Thread Aki
I want to use TooltipText for a TreeGridField.Is it possible .But I
did not find any API supporting this for TreeGridField.

waiting for the reply.
Aki.

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



GWT 1.7 upgrade Issue in Linux

2010-02-01 Thread has
I try to upgrade from GWT 1.5.3 to 1.7, it works fine in Windows but
in Linux HostedMode shows blank page while it display the Title but
not the contents.

-- 
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: Is it possible to detect if a popup (opened by Window.open(..) ) has been closed?

2010-02-01 Thread Thomas Wrobel
I think that only monitors the current window :-/

On 1 February 2010 14:39, mariyan nenchev  wrote:
> Hi,
>
> what about Window.addCloseHandler(...);?
>
> --
> 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.
>

-- 
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: How to create a Grid with Picture as a type of column?

2010-02-01 Thread mariyan nenchev
How do you load your images from the server?

-- 
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: Ext/GXT/ExtGWT v2.1.0 vs. SmartGWT v2.0

2010-02-01 Thread Tercio
>    - Both GXT and Smart GWT are pure gwt (no underlying native JS library,
>    so expect equivalent speed/performance from the GWT compiler).

Nope, SmartGWT is a wrapper to SmartClient JS Library.


ckendrick and I have different understandings about override ... :-P
We already discussed this some time ago ...

SmartGWT you can't override it's functionality, just it's behavior.

SmartGWT is more feature rich than GXT, but I don't like their
licensing terms, I prefer GXT one, not only because the price, but the
features, we just need a UI framework, the server we already have one.

Regards.

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



Difference in FF and Chrome GWT 2.0

2010-02-01 Thread dinosaurus
I'm evaluating GWT 2.0. I've created a very simple application (see
below).
I execute it from Eclipse GWT 2.0 plug-in.

DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
p.addNorth(new Button("north"), 2);
p.addSouth(new Button("south"), 2);
p.addEast(new Button("east"), 2);
p.addWest(new Button("west"), 2);
p.add(new Button("center"));

RootLayoutPanel rp = RootLayoutPanel.get();
rp.add(p);

Chrome displays everything correctly while Firefox displays some
clutter (I'm not talking about IE).
Could anybody explain what happens?

Thanks in advance

-- 
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: Is it possible to detect if a popup (opened by Window.open(..) ) has been closed?

2010-02-01 Thread mariyan nenchev
Hi,

what about Window.addCloseHandler(...);?

-- 
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: Can't remove 0 index in ArrayList

2010-02-01 Thread Martin Trummer
I think you should take some time to find out what the problem is/was.

it's quite unlikely that something in the GWT code changed, so that
such a simple thing would stop working.
Maybe you just had different data before.
Thus it may be an indication that you got something wrong in your
code - difficult to say what when you can't reproduce it.

maybe you got some of your hashCode/equals functions wrong which
could lead to strange behaviour like this.

however, if it's a project that's not critical or if you
just feel fine with this, don't waste your time :)

On 1 Feb., 13:11, Christian Goudreau 
wrote:
> Yeah, but the thing is that code was working fine prior to gwt 2.0, so I
> just don't understand why lol
>
> Anyway I also tried a simple example like yours and it was working fine, so
> I just gave up finding a solution to a problem that I alreay resolved by
> doing the alternative way.
>
> Thanks
>
> Christian
>
> On Mon, Feb 1, 2010 at 5:03 AM, Martin Trummer wrote:
>
> > seems to work for me - here's a little test:
>
> >  List list = new ArrayList();
> >  list.add(6);
> >  list.add(7);
>
> >  list.remove(0);
> >  list.remove(0);
>
> > after that the list is empty again.
> > tested in development mode with gwt 2.0.0
>
> > just a guess: make sure, you call the right function
> > remove is overloaded.
>
> > so if you would call:
> >  list.remove(new Integer(0));
> > then nothing would be removed, because there's no integer
> > object 0 in the list.
>
> > On 29 Jan., 20:04, Christian Goudreau 
> > wrote:
> > >  protected void removeFacultySucceeded() {
> > > display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
> > > faculties.remove(faculty);
> > >  if (!faculties.isEmpty()) {
> > > faculty = faculties.get(display.getFacultyListSelectedIndex());
> > > refreshDisplay();}
>
> > >  modification = true;
>
> > > }
>
> > > I was using the selected index instead of object faculty. While debugging
> > I
> > > confirmed that the first position was 0 ans was an integer... Every other
> > > position was working fine.
>
> > > I don't understand that bug either, I've worked around by using an
> > object.
>
> > > Anyway it's not that important, but I wanna know it's just me or it's
> > > something that should be corrected.
>
> > > Christian
>
> > > On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer  > >wrote:
>
> > > > show some code or a small test case
>
> > > > On 28 Jan., 18:16, Christian Goudreau 
> > > > wrote:
> > > > > Does anyone had that same problem ? Everything works fine when it
> > comes
> > > > to
> > > > > other indexes, but when I do ArrayList.remove(0), the object is still
> > in
> > > > > here ! But When I try : ArrayList.remove(object), it work again.
>
> > > > > Everything was working well prior to GWT 2.0.
>
> > > > --
> > > > 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.
>
> > --
> >  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.
>
>

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



PopupPanel.AnimationType

2010-02-01 Thread Johan Rydberg

Why isn't it public? Is that part of the API still considered unstable?

--
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: Is it possible to detect if a popup (opened by Window.open(..) ) has been closed?

2010-02-01 Thread darkflame
thanks, but I'm affaird I wasn't clear enough :(

I meant a popup window, not a popup panel. (that is, an actual
separate browser window triggered by a Window.open), and not a
internal PopupPanel within the same window.

Sorry for the confusion.

On Feb 1, 1:42 pm, mariyan nenchev  wrote:
> Hi,
>
> popup.addCloseHandler(new CloseHandler() {
>         @Override
>         public void onClose(CloseEvent arg0) {
>             // do something on close
>         }
>     });
>
> if you use eventbus you may create your own PopupClosedEvent and onClose do
> :
>          eventBus.fireEvent(new PopupClosedEvent())

-- 
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: Is it possible to detect if a popup (opened by Window.open(..) ) has been closed?

2010-02-01 Thread mariyan nenchev
Hi,

popup.addCloseHandler(new CloseHandler() {
@Override
public void onClose(CloseEvent arg0) {
// do something on close
}
});

if you use eventbus you may create your own PopupClosedEvent and onClose do
:
 eventBus.fireEvent(new PopupClosedEvent())

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



Is it possible to detect if a popup (opened by Window.open(..) ) has been closed?

2010-02-01 Thread darkflame
I'm integrating a OpenID system into my site, and for part of it, I'm
triggering a popup to login to various openID providers.

This popup is opened by a simple;
Window.open(url, "_blank",
"menubar=1,resizable=1,width=480,height=400");

Is it possible to know when the user close's this popup? Either by a
listener, or (if necessary) by checking periodical for the window's
existence.

Thanks,
Thomas

-- 
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: Can't remove 0 index in ArrayList

2010-02-01 Thread Christian Goudreau
Yeah, but the thing is that code was working fine prior to gwt 2.0, so I
just don't understand why lol

Anyway I also tried a simple example like yours and it was working fine, so
I just gave up finding a solution to a problem that I alreay resolved by
doing the alternative way.

Thanks

Christian

On Mon, Feb 1, 2010 at 5:03 AM, Martin Trummer wrote:

> seems to work for me - here's a little test:
>
>  List list = new ArrayList();
>  list.add(6);
>  list.add(7);
>
>  list.remove(0);
>  list.remove(0);
>
> after that the list is empty again.
> tested in development mode with gwt 2.0.0
>
> just a guess: make sure, you call the right function
> remove is overloaded.
>
> so if you would call:
>  list.remove(new Integer(0));
> then nothing would be removed, because there's no integer
> object 0 in the list.
>
> On 29 Jan., 20:04, Christian Goudreau 
> wrote:
> >  protected void removeFacultySucceeded() {
> > display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
> > faculties.remove(faculty);
> >  if (!faculties.isEmpty()) {
> > faculty = faculties.get(display.getFacultyListSelectedIndex());
> > refreshDisplay();}
> >
> >  modification = true;
> >
> > }
> >
> > I was using the selected index instead of object faculty. While debugging
> I
> > confirmed that the first position was 0 ans was an integer... Every other
> > position was working fine.
> >
> > I don't understand that bug either, I've worked around by using an
> object.
> >
> > Anyway it's not that important, but I wanna know it's just me or it's
> > something that should be corrected.
> >
> > Christian
> >
> > On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer  >wrote:
> >
> > > show some code or a small test case
> >
> > > On 28 Jan., 18:16, Christian Goudreau 
> > > wrote:
> > > > Does anyone had that same problem ? Everything works fine when it
> comes
> > > to
> > > > other indexes, but when I do ArrayList.remove(0), the object is still
> in
> > > > here ! But When I try : ArrayList.remove(object), it work again.
> >
> > > > Everything was working well prior to GWT 2.0.
> >
> > > --
> > > 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.
> >
> >
>
> --
>  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.
>
>

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



java applet integration

2010-02-01 Thread ben fenster
i load a java applet in my gwt project and some of the fetures in the
applet works fine but some of ther throws the following  errors
altough they work when i run them in a non browser form
i am using gwt2.0  and i get the following error
13:30:10.386 [ERROR] [vzooo] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (Error): ÒÙéÔ àÓ×ê
âÑÕè  ÜçÑÜê ÞÐäÙÙß HTMLHtmlElement.nodeType ÞÐê .
 fileName: http://localhost
 lineNumber: 62
 stack: ([object XPCCrossOriginWrapper])@http://localhost:62
@:0
(null,327808,[object MouseEvent])@http://localhost/vzooo/hosted.html?
vzooo:56
([object MouseEvent])@http://localhost:32
((function (evt) {if (!__gwt_makeJavaInvoke(1)(null, 327808, evt))
{evt.stopPropagation();evt.preventDefault();return false;}return
true;}),null,[object Object])@http://localhost:50
@:0
(null,65563,(function (evt) {if (!__gwt_makeJavaInvoke(1)(null,
327808, evt)) {evt.stopPropagation();evt.preventDefault();return
false;}return true;}),[object GWTJavaObject],[object Object])@http://
localhost/vzooo/hosted.html?vzooo:56
([object MouseEvent])@http://localhost:38
([object MouseEvent])@http://localhost:20
((function (evt) {if (__static[196659](evt)) {var cap = __static
[196658];if (cap && cap.__listener) {if (__gwt_makeJavaInvoke(1)(null,
262177, cap.__listener)) {__gwt_makeJavaInvoke(3)(null, 327709, evt,
cap, cap.__listener);evt.stopPropagation();),[object
XPCCrossOriginWrapper],[object Object])@http://localhost:50
@:0
(null,65563,(function (evt) {if (__static[196659](evt)) {var cap =
__static[196658];if (cap && cap.__listener) {if (__gwt_makeJavaInvoke
(1)(null, 262177, cap.__listener)) {__gwt_makeJavaInvoke(3)(null,
327709, evt, cap, cap.__listener);evt.stopPropagation();),[object
XPCCrossOriginWrapper],[object Object])@http://localhost/vzooo/
hosted.html?vzooo:56
([object MouseEvent])@http://localhost:38
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript
(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke
(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative
(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject
(ModuleSpace.java:264)
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:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:157)
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn
(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript
(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke
(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative
(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject
(ModuleSpace.java:264)
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:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages
(BrowserChannel.java:1668)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection
(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run
(BrowserChannelServer.java:222)
at java.lang.Thread.run(Unknown Source)

-- 
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: Some general questions

2010-02-01 Thread vdimitrov
Thank you for your replies!

> Depends what you call "the old programmatic approach", but it'll do
> its best to never be *worse* than what you'd have written by hand
> (@UiHandler might be an exception, but it has also room for
> improvement in future GWT releases).

It means that I already have my widgets implemented and I was
wondering if it's a good idea to convert them into xml.

> Try to always do a single call (just return an object with 2
> properties: the total count and the page of results)

Perhaps that's the best approach, although I will need the count
property just once, which will result in 2 remote methods (one with
the count and one with only the results). I'll аlso see the benefits
of a command pattern.

Thank you!

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



How to create a Grid with Picture as a type of column?

2010-02-01 Thread Bhavesh Shah
Hi all,

I need to implement a Grid which will have one column which will show
the picutre of the users.

Can any body give me hint or reference to such kind of
implementation ?

Thanks in advance,
Bhavesh Shah

-- 
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: How do I make the server RPC to client?

2010-02-01 Thread Martin Trummer
more generally speaking, you want server push
http://en.wikipedia.org/wiki/Server_push

On 31 Jan., 21:27, Paul Robinson  wrote:
> Search for comet. It's the closest technique to what you want.
>
> JA wrote:
> > Might be a silly question, but how do you make this scenario work
> > efficiently:
>
> > The client sends a message to the server, then displays the server
> > status.  Now I'm expecting some other client to respond to my message
> > at a later time, but I don't want to keep polling to see whether the
> > server status has changed.  Is there a way for the server to call a
> > procedure on the client when the second client has clicked?
>
> > Thx.
>
>

-- 
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: Can't remove 0 index in ArrayList

2010-02-01 Thread Martin Trummer
seems to work for me - here's a little test:

  List list = new ArrayList();
  list.add(6);
  list.add(7);

  list.remove(0);
  list.remove(0);

after that the list is empty again.
tested in development mode with gwt 2.0.0

just a guess: make sure, you call the right function
remove is overloaded.

so if you would call:
  list.remove(new Integer(0));
then nothing would be removed, because there's no integer
object 0 in the list.

On 29 Jan., 20:04, Christian Goudreau 
wrote:
>  protected void removeFacultySucceeded() {
> display.removeItemFromFacultyList(display.getFacultyListSelectedIndex());
> faculties.remove(faculty);
>  if (!faculties.isEmpty()) {
> faculty = faculties.get(display.getFacultyListSelectedIndex());
> refreshDisplay();}
>
>  modification = true;
>
> }
>
> I was using the selected index instead of object faculty. While debugging I
> confirmed that the first position was 0 ans was an integer... Every other
> position was working fine.
>
> I don't understand that bug either, I've worked around by using an object.
>
> Anyway it's not that important, but I wanna know it's just me or it's
> something that should be corrected.
>
> Christian
>
> On Fri, Jan 29, 2010 at 4:23 AM, Martin Trummer 
> wrote:
>
> > show some code or a small test case
>
> > On 28 Jan., 18:16, Christian Goudreau 
> > wrote:
> > > Does anyone had that same problem ? Everything works fine when it comes
> > to
> > > other indexes, but when I do ArrayList.remove(0), the object is still in
> > > here ! But When I try : ArrayList.remove(object), it work again.
>
> > > Everything was working well prior to GWT 2.0.
>
> > --
> > 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.
>
>

-- 
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: how to use Comet on Gwt?

2010-02-01 Thread mariyan nenchev
Is this game opensourced :).

On Sun, Jan 31, 2010 at 7:48 PM, KeremTiryaki wrote:

> check instant messeger application's source from http://gwtapps.com/
> it is a book web site...
> I think it is very good. I used that book when I was developing this:
> http://tr.im/iflagame
>
> --
> 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.
>
>

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



google-web-toolkit@googlegroups.com

2010-02-01 Thread Stine
Hi!

I am trying to introduce Gin in my GWT project and have added



in my gwt.xml.

I am being told that I am missing the above inherits statement in my
gwt.xml when I try to create an injector though:

import com.google.gwt.inject.client.Ginjector;

public interface IMGinjector extends Ginjector {
IMStatusView getIMStatusView();
}

Has anyone experienced anything like that?

Thanks,
Stine

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



Javascript errors GWT 2.0 / Firefox 3.0

2010-02-01 Thread rmuller
I am using GWT 2.0 and Firefox 3.0.17

I get these two errors, reported by the Firefox error console:

Error: $entry(__gwt_makeTearOff(null, 7667759, 0)) is not a function
Source File: http://localhost:
Line: 7

and:

Error: Permission denied to get property HTMLInputElement.tagName
Source File: XPCSafeJSObjectWrapper.cpp
Line: 450

Are these GWT bugs?

Regards,

Ronald

-- 
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: SuggestBox doesnt work in IE 6

2010-02-01 Thread Thomas Broyer

On Feb 1, 8:22 am, forewar  wrote:
> When I try to show suggestion list in Internet Explorer 6, I just get
> Javascrpt error "Invalid class string" and suggestion list doesnt
> appear of
> course. IE7 and all other browsers work fine.
>
> AsyncCallback callback = new AsyncCallback() {
>           public void onSuccess(ArrayList result){
>             ...
>             // my function works fine
>             SuggestBox sbb = getSuggestBoxByElementId
> (innerSuggesterId);
>             // suggestbox value and 'success1' appear successfully
>             Window.alert(sbb.getValue());
>             Window.alert("success1");
>             sbb.showSuggestionList();
>             // alert 'success2' never appears
>             Window.alert("success2");
>           }
>             ...
>
> This problem also occures even in GWT 
> examples.http://gwt.google.com/samples/Showcase/Showcase.html#CwSuggestBox
> Their
> suggestBox doesnt work in my IE6
>
> I also created an 
> issuehttp://code.google.com/p/google-web-toolkit/issues/detail?id=4544
> but havent got the solution yet. Does someone have the same problem?
> Are there any ways to fix it?

Showcase works OK in the IE6 that ships in Microsoft's Virtual PC "IE
Compatibility" images, so it's likely an issue in *your* IE6, maybe a
plugin?
http://go.microsoft.com/fwlink?LinkID=70868

(also noteworthy, we have an app deployed in production for more than
a year, compiled with GWT 1.5, 1.7 and now 2.0, used *exclusively*
with IE6, and no-one ever reported an issue with our SuggestBoxes)

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



Facing problem during compiling my project with GWT 1.6.4

2010-02-01 Thread chill_hus
I am sorry the issue is not with rocket
it has to do with gwt compling. i went through the discussion on
http://code.google.com/p/google-web-toolkit/issues/detail?id=3510
I was able to compile for one permutation but was facing error when
compiling for all 5 permutations

   Compiling 5 permutations
   Worker permutation 1 of 5
  [ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error
during visit.
at com.google.gwt.dev.jjs.ast.JVisitor.translateException
(JVisitor.java:74)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:151)
at com.google.gwt.dev.jjs.ast.JProgram.traverse(JProgram.java:
816)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:132)
at com.google.gwt.dev.jjs.impl.ResolveRebinds.execImpl
(ResolveRebinds.java:101)
at com.google.gwt.dev.jjs.impl.ResolveRebinds.exec
(ResolveRebinds.java:72)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation
(JavaToJavaScriptCompiler.java:131)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:
181)
at com.google.gwt.dev.ThreadedPermutationWorkerFactory
$ThreadedPermutationWorker.compile(ThreadedPermutationWork
erFactory.java:47)
at com.google.gwt.dev.PermutationWorkerFactory$Manager
$WorkerThread.run(PermutationWorkerFactory.java:72)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove
(JModVisitor.java:166)
at com.google.gwt.dev.jjs.ast.JClassType.traverse
(JClassType.java:61)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:146)
... 9 more
 [ERROR] at transient source for
byte_Array_Rank_1_FieldSerializer(2): final class
byte_Array_Rank_1_FieldSerial
izer extends Object
com.google.gwt.dev.jjs.ast.JClassType
 [ERROR] : 
com.google.gwt.dev.jjs.ast.JProgram
  [ERROR] Unrecoverable exception, shutting down
com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.logAndTranslateException
(JavaToJavaScriptCompiler.java:616)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation
(JavaToJavaScriptCompiler.java:214)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:
181)
at com.google.gwt.dev.ThreadedPermutationWorkerFactory
$ThreadedPermutationWorker.compile(ThreadedPermutationWork
erFactory.java:47)
at com.google.gwt.dev.PermutationWorkerFactory$Manager
$WorkerThread.run(PermutationWorkerFactory.java:72)
at java.lang.Thread.run(Unknown Source)
   [ERROR] Not all permutation were compiled , completed (1/5)

Pls can anyone help me with this

On Jan 29, 7:51 pm, chill_hus  wrote:
> I am working on a project in which rocket-gwt (more specifically
> comet) is heavily used. The project is using GWT 1.5.3
> When i upgraded it to GWT 1.6, I am facing compile errors. I used the
> Rocket-GWT1.6.zip  which was 
> availablehttp://code.google.com/p/rocket-gwt/issues/detail?id=64
> The compilation starts but then after some time it gives
> StackOverflowError. This happens when binding of a class that extends
> CometClient is going on.
> Can anyone pls help

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



Compiling in subdirectory

2010-02-01 Thread cromoteca
Hi,

when I compile my module, it gets compiled into /something in the war
folder. Is there any way to compile it into /some/thing and run it
from there?

Thank you.

-- 
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: DOM

2010-02-01 Thread Jaswanth
and ya forgot to ask what about using Gquery instead of the above..??.

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