Tuesday, January 31, 2012

consolidate css

i have multiple custom css in .html file. any technique to consolidate
it become one file during compilation ?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: How to set back ground color to a textfield

please try with background image 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: How to set back ground color to a textfield

I tried like you suggested but it did't work for a textfield !

On Jan 31, 10:10 pm, Qrunk <kapil2ka...@gmail.com> wrote:
> I tried the same on a button(*add *button), its working for me,
>
> try out this :
>
> @UiHandler("add")
>     void onAddClick(ClickEvent event) {
>         //addRows();
>         add.setEnabled(false);
>         if(!add.isEnabled()){
>             System.out.println("Hello");
>             add.getElement().getStyle().setBorderColor("red");
>         }
>
>     }
>
> Here add is button added using UiBinder, onClick I make it disabled and
> change the border color to red

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

PushButton in Table row??

I currently have a celltable that has data loaded from a database.  For every row, I have a Button in the row that points to a pdf.  The thing is that I wan't to put an image on the button on each row.  So exact same logic is now but instead of having text on the button, I want to put an image.  If the database brings back 20 records, there are twenty rows and thus 20 buttons.  How can I load the exact same image to all 20 buttons?  I currently am using a ButtonCell, so I am not sure how to go about this??  I know that "PushButtons"  can have images on them>  How could I load a push button to each row in a cell table??

Thanks,

Joshua

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/JLtS-kt_dhgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Catch a javascript event

I open a window and I change the value of a <input> element that I
have in the main html with javascript from the child window . How do I
catch the onChange events from GWT in parent window?

----------
Parent window

....
<body>
<input type="hidden" id="var1" value="not_init" >
....
</body>
-------------
Child window
<html>
<head>
<script type="text/javascript">
function x (){
window.parent.opener.document.getElementById('var1').value
= 'new values';
}
</script>
</head>
<body>
<form>
<input type="button" value="Cierra" name="B1" onclick="x();">
</form>
</body>
</html>
-----------------

The parent window executes: Window.open("child.html") from GWT.

When I press the button in the child window... the value of 'var' is
update... but I don't know how to catch the event from GWT in the
parent window. Could anyone help me¿

Thanks a lotQ


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Multiple constructors with UiBinder

Hi,

How do I define a class with more than one constructor to be use with
UiBinder? @UiConstructor it's not allowed to be put in more than one
constructor :S


For example... if my class is the following... How can I tell to
Uibinder that I have 4 constructors?

public class MyButton extends Button {
public MyButton(String title, ButtonType buttonType) {...}
public MyButton(Sring title, ButtonType buttonType, boolean
orientation) { ....}
public MyButton(String title, ButtonType buttonType, String imageUrl,
String imagePressedUrl, boolean orientation) {...}

public @UiConstructor
MyButton(String title) {...}
}

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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Window.ClosingEvent is not fire in iPad

Hello,

When I make a change of my window location the Window.ClosingEvent
it's not fire on Safari, iPad2, iOS 5.0.1...

I attach a example source that works in android, firefox, chrome...
but not in Safari... I don't know which is the problem... could anyone
help me¿

Thank you

--------------------------------------------------------------------------------------------------------------------------------
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootLayoutPanel;

public class Test implements EntryPoint {

public void onModuleLoad() {
Window.addWindowClosingHandler(new Window.ClosingHandler() {
public void onWindowClosing(Window.ClosingEvent closingEvent) {
closingEvent.setMessage("Are you sure?" );
}
});
Button b = new Button("Button");
RootLayoutPanel.get().add(b);
b.addClickHandler(new ClickHandler(){

@Override
public void onClick(ClickEvent event) {
change_location();
}});
}

public static native void change_location()/*-{
$wnd.location.replace('http://www.google.com');
}-*/;
}
--------------------------------------------------------------------------------------------------------------------------------


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

How can I run server initialization code in a GwtTestCase?

Hi,

I'm using GWT 2.4 and writing some integration test cases using
GwtTestCase. How can I run some initialization code on the server
side before the test cases kick off? I tried defining a servlet in my
module's .gwt.xml file and writing some code in the init method, but
it seems that alone is not enough (the init method is never getting
called).

Thanks for additional tips, - Dave

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT Developer Plugin for Firefox 8

Selenium probably doesn't use a binary component, which dev mode have to use. We talked about using js-ctypes which would allow forward compatibility, but that's not possible.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/SDfPpcqDriwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Problems with AutoBean Lists

I am having problems modifying a list property on an AutoBean
deserialized from JSON with AutoBeanCodex. When I call
List<>.add(position, value) it appears to be overwriting the value at
that position instead of shifting values right to make room for the
new item.

Here's a JUnit test that demonstrates the behavior I'm seeing:

public class AutoBeanListTest extends GWTTestCase {

@Override
public String getModuleName() {
return "com.xxx.AutoBeanListTest";
}

@Test
public void testDirectInsert() {
MyBeanFactory factory = GWT.create(MyBeanFactory.class);
MyBean bean = factory.myBean().as();
bean.setValues(new ArrayList<String>());
bean.getValues().add("A");
bean.getValues().add("C");

assertEquals(2,bean.getValues().size());

bean.getValues().add(1,"B");

assertEquals(3,bean.getValues().size()); // this one works
assertEquals("A", bean.getValues().get(0));
assertEquals("B", bean.getValues().get(1));
assertEquals("C", bean.getValues().get(2));
}

@Test
public void testSerializeInsert() {
MyBeanFactory factory = GWT.create(MyBeanFactory.class);
MyBean bean = factory.myBean().as();
bean.setValues(new ArrayList<String>());
bean.getValues().add("A");
bean.getValues().add("C");

assertEquals(2,bean.getValues().size());

String json =
AutoBeanCodex.encode(AutoBeanUtils.getAutoBean(bean)).getPayload();
bean = AutoBeanCodex.decode(factory, MyBean.class, json).as();

assertEquals(2,bean.getValues().size());

bean.getValues().add(1,"B");

assertEquals(3,bean.getValues().size()); // this one FAILS
assertEquals("A", bean.getValues().get(0));
assertEquals("B", bean.getValues().get(1));
assertEquals("C", bean.getValues().get(2));
}

public interface MyBeanFactory extends AutoBeanFactory {
AutoBean<MyBean> myBean();
AutoBean<MyBean> myBean(MyBean myBean);
}

public interface MyBean {
List<String> getValues();
void setValues(List<String> values);
}
}

The first test case (which modifies a list that I create and put into
the bean) works as I expect, but the second test (which modifies the
list returned from deserialization) does not. After the insert, the
list still has only two values in it, and the second one has been
replaced by the value I inserted.

Am I doing something wrong? Is this an issue in the underlying code?

I can't help but notice that the SplittableList class uses the same
implementation for set() and add(). That doesn't seem right to me,
but I assume I must be missing something.

James

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT: Google Map in firefox only randomly working

I am using "Maps.loadMapsApi" with an async callback. Map object is
used first time after execution of runnable. And... it's working for
all other browsers !?!

On 31 Jan., 17:32, Eric Ayers <zun...@google.com> wrote:
> Another possibility I can think of is trying to make method calls into the
> Maps API before the api is fully loaded.  How are you initializing the Maps
> API?  Are you using Maps.loadApi() and waiting for the callback to return?
>
> Look in your JS console window (firebug) - are there any exceptions there?
>
> On Tue Jan 31 11:15:35 GMT-500 2012, MeiAestro <JMAlbre...@gmx.de> wrote:
>
>
>
>
>
>
>
> > Hi Eric!
>
> > Thanks for the hint, but unfortunately it did not help.
>
> > Any other ideas?
>
> > Regrads!
>
> > On 30 Jan., 16:24, Eric Ayers <zun...@google.com> wrote:
> > > Try calling 'checkResizeAndCenter()' and see if it helps.
>
> > >http://code.google.com/p/gwt-google-apis/wiki/MapsFAQ#Why_do_I_see_th...
>
> > > On Mon Jan 30 10:09:04 GMT-500 2012, MeiAestro <JMAlbre...@gmx.de>
> > wrote:
>
> > > > Hi folks,
>
> > > > I am using the google maps api for GWT. In all browsers but firefox
> > > > (tested with ie8, ie9, chrome on different OS) the map is working
> > > > without any problems. In firefox the map randomly shows following
> > > > problems:
>
> > > > - control widgets are not shown;
> > > > - map dragging not possible
> > > > - scroll-wheel zoom not working
> > > > - ...
>
> > > > Doing continuous F5 refreshes leads at some point in time to a working
> > > > initialization of the map.
>
> > > > Any ideas? I am absolutely clueless!
> > > > cheers.
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google Web Toolkit" group.
> > > > To post to this group, send email to
> > google-web-toolkit@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-web-toolkit+unsubscribe@googlegroups.com.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

PopupPanel.showRelativeTo an individual date on a DatePicker?

Can this be done?

I am not using any extensions or other libraries, just GWT 2.4 itself.

I have a screen that is used for scheduling, and thus shows several
DatePickers next to each other, each showing a different month, and
with the month-forward and month-back buttons disabled.

Some of the individual dates will have a marking indicating that
events or meetings are scheduled.

What I would like is to be able to have the user hover over the marked
date, and have a PopupPanel appear and show the details of what's
scheduled.

More or less I have this working - however, while I can center() the
PopupPanel, it's relatively small, and I want to show it near the date
that's actually being hovered over.

The best I've been able to manage thus far is
PopupPanel.showRelativeTo(datePickerInstance). This is the sort of
behavior I want (show below, to left, to right, above, whatever, based
on how much room there is on the client), but I would like it to be
relative to the individual date within the DatePicker, rather than
relative to the entire DatePicker itself.

Is it possible to get a handle to the UIObject that shows the date
(ie: the 17, for, say, July 17th), and thus show the PopupPanel
relative to that?

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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: does CSS Sprite is default ?

If you use gwt client bundle for referencing your images in your gwt app, gwt compiler will decide how is best way of "storing" the images.

By default, it stores small images in with the content embedded in the urls, like: <img src="data:101010010100110". For bigger images, it store them as regular files and regular urls, like src="afile1.png"

In client bundles you can force the gwt compiler to a technic. For example, if I don't want the compiler to "inline" the data image in urls I annotate the ImageResource with @ImageOptions(preventInlining=true) as the following code shows.

import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.ImageResource.ImageOptions;

public interface TestImageResources extends ClientBundle {
TestImageResources INSTANCE = GWT.create(TestImageResources.class);

@ImageOptions(preventInlining=true)
@Source("smallLion.png")
ImageResource smallLion();

}

regards,


On Mon, 30 Jan 2012 18:56:10 -0800 (PST)
wahaha <ilcll@yahoo.com.cn> wrote:

> there has many small pictures in a page,does GWT will merge them by
> default?
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>


--
Sebastian Gurin <sgurin@softpoint.org>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT and method overriding

Ugh.  Never mind, user error.  Functionality works as expected.  I forgot we had an additional layer wrapping the original callback; updated that and everything works as expected.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/pCt1TTmW0twJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT Developer Plugin for Firefox 8

I also got selenium plugin and it seems to be able to auto-update after FX upgrades automatically. Is this because selenium team would have access to the xulrunner before hand? 

On Tue, Jan 31, 2012 at 12:41 PM, Alan Leung <acleung@google.com> wrote:
As much as I'd like to, that isn't possible. xulrunner 10.0 was just released an hour ago.


On Tue, Jan 31, 2012 at 9:28 AM, Samyem Tuladhar <samyem@gmail.com> wrote:
Would have been great if the gwt plugin auto-updates when FX upgrades. FX10 is already showing auto updater up on my computer. 


On Tue, Jan 31, 2012 at 3:30 AM, Peter Willert <peterwillert@gmail.com> wrote:
9 worked great, but now fx 10 is on the horizon :-/ ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/10.0/

Anyone here who can build the fx10 extension?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/xi5wxiMjCIQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT Developer Plugin for Firefox 8

As much as I'd like to, that isn't possible. xulrunner 10.0 was just released an hour ago.

On Tue, Jan 31, 2012 at 9:28 AM, Samyem Tuladhar <samyem@gmail.com> wrote:
Would have been great if the gwt plugin auto-updates when FX upgrades. FX10 is already showing auto updater up on my computer. 


On Tue, Jan 31, 2012 at 3:30 AM, Peter Willert <peterwillert@gmail.com> wrote:
9 worked great, but now fx 10 is on the horizon :-/ ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/10.0/

Anyone here who can build the fx10 extension?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/xi5wxiMjCIQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT Developer Plugin for Firefox 8

Would have been great if the gwt plugin auto-updates when FX upgrades. FX10 is already showing auto updater up on my computer. 

On Tue, Jan 31, 2012 at 3:30 AM, Peter Willert <peterwillert@gmail.com> wrote:
9 worked great, but now fx 10 is on the horizon :-/ ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/10.0/

Anyone here who can build the fx10 extension?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/xi5wxiMjCIQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Using GWT for login and extraction of data

Hello,

Me and a friend are quite new to web development and have started
developing an application with GWT.

The application shall log in on a site set by the user and get some
information from a table.

How would you go about doing this in GWT?
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: How to set back ground color to a textfield

I tried the same on a button(add button), its working for me,

try out this :

@UiHandler("add")
    void onAddClick(ClickEvent event) {
        //addRows();
        add.setEnabled(false);
        if(!add.isEnabled()){
            System.out.println("Hello");
            add.getElement().getStyle().setBorderColor("red");
        }
       
    }

Here add is button added using UiBinder, onClick I make it disabled and change the border color to red

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/OkO7IqmFJP4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT: Google Map in firefox only randomly working

Another possibility I can think of is trying to make method calls into the Maps API before the api is fully loaded.  How are you initializing the Maps API?  Are you using Maps.loadApi() and waiting for the callback to return?

Look in your JS console window (firebug) - are there any exceptions there?


On Tue Jan 31 11:15:35 GMT-500 2012, MeiAestro <JMAlbrecht@gmx.de> wrote:
Hi Eric!

Thanks for the hint, but unfortunately it did not help.

Any other ideas?

Regrads!

On 30 Jan., 16:24, Eric Ayers <zun...@google.com> wrote:
> Try calling 'checkResizeAndCenter()' and see if it helps.
>
> http://code.google.com/p/gwt-google-apis/wiki/MapsFAQ#Why_do_I_see_th...
>
> On Mon Jan 30 10:09:04 GMT-500 2012, MeiAestro <JMAlbre...@gmx.de> wrote:
>
>
>
>
>
>
>
> > Hi folks,
>
> > I am using the google maps api for GWT. In all browsers but firefox
> > (tested with ie8, ie9, chrome on different OS) the map is working
> > without any problems. In firefox the map randomly shows following
> > problems:
>
> > - control widgets are not shown;
> > - map dragging not possible
> > - scroll-wheel zoom not working
> > - ...
>
> > Doing continuous F5 refreshes leads at some point in time to a working
> > initialization of the map.
>
> > Any ideas? I am absolutely clueless!
> > cheers.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT: Google Map in firefox only randomly working

Hi Eric!

Thanks for the hint, but unfortunately it did not help.

Any other ideas?

Regrads!

On 30 Jan., 16:24, Eric Ayers <zun...@google.com> wrote:
> Try calling 'checkResizeAndCenter()' and see if it helps.
>
> http://code.google.com/p/gwt-google-apis/wiki/MapsFAQ#Why_do_I_see_th...
>
> On Mon Jan 30 10:09:04 GMT-500 2012, MeiAestro <JMAlbre...@gmx.de> wrote:
>
>
>
>
>
>
>
> > Hi folks,
>
> > I am using the google maps api for GWT. In all browsers but firefox
> > (tested with ie8, ie9, chrome on different OS) the map is working
> > without any problems. In firefox the map randomly shows following
> > problems:
>
> > - control widgets are not shown;
> > - map dragging not possible
> > - scroll-wheel zoom not working
> > - ...
>
> > Doing continuous F5 refreshes leads at some point in time to a working
> > initialization of the map.
>
> > Any ideas? I am absolutely clueless!
> > cheers.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: What is the easiest / best solution for drag and drop in GWT right now?

GWTQuery has good support for DnD too (including dragging out of and dropping into Cell widgets: CellList, etc.)

(disclaimer: I never, ever used GWTQuery)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/7US8YR3bZgkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Problème Header Custom

Bonjour,

Je bloque sur un léger problème sur un header Customisé.

Je souhaite afficher dans le header d'un datagrid une textbox et une
image pour filtrer avec un onclick dessus.
Le onClick ne fonctionne pas, avec-vous quelques idées?

Voici une partie du code:

public class PssTableView extends Header<String> implements HasText{
public PssTableView(TextInputCell input){
super(input);
}

@Override
public void render(Context context, SafeHtmlBuilder sb){
super.render(context, sb);

Image img = new Image("pssFiltre.gif");
img.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event)
{
Window.alert("Click");
}
});
sb.appendHtmlConstant(img.toString());
}
}

L'image s'affiche correctement mais le Handler ne fonctionne
malheureusement pas.

Cordialement.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: Anchor setEnabled(false) does not work in FireFox and Chrome.

Thanks, this is perfict.


On Jan 30, 4:22 pm, Jens <jens.nehlme...@gmail.com> wrote:
> Take a look at:
>
> http://code.google.com/p/google-web-toolkit/issues/detail?id=2889
>
> -- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: native javascript functions manipulation in java - overlay types

Yes there are some differences:

* raphaelgwt is based in raphaeljs 1.0 and mine in raphael2.0.

* raphaelgwt has limited support for doing native stuff it is base on gwt widgets for solving some problems. Specially there are no native event support (events are managed at gwt widget level). My library, raphael4gwt is not based on gwt widgets at all and support 100% of raphaeljs api with overlay types for zero overhead. You can put a raphael canvas object inside a widget, but contrary to raphaelgwt, the java api is only for the raphael canvas and shapes, not widgets.

last section of the wiki explains my motivations a little more: http://code.google.com/p/raphael4gwt/wiki/MainDocumentation

Nevertheless, I'm thinking on contributing some things to raphaelgwt, specially native support for event handling.

I will anounce raphael4gwt in this group once I get a more polished version.

Regards.

On Tue, 31 Jan 2012 14:25:17 +0100
Alain Ekambi <jazzmatadazz@googlemail.com> wrote:

> Any difference between your library and
> http://code.google.com/p/raphaelgwt/ ?
>
> 2012/1/31 Sebastian Gurin <sgurin@softpoint.org>
>
> > Thomas Thank you very much for your answers. You helped me al lot with my
> > first porting of a javascript toolkit to GWT: my own version of
> > raphaeljs.com (a cool javascript library for doing vector graphics) to
> > gwt:
> >
> > project page
> > http://code.google.com/p/raphael4gwt/
> >
> > demo with java sources available:
> > http://cancerbero.vacau.com/gwt/raphael4gwtGallery/
> >
> > This library was written by me in few days and from scratch.
> >
> > Initially I wanted to create a layer for "doing javascript in java", so I
> > can write javascript in java without jsni (but paying a little overhead
> > price), like something like this:
> >
> > JavaScriptObject o1 = getNativeObject();
> > JsUtils.put(o1, "property1", "value1");
> > JsUtils.put(o1, "onclick", JsUtils.FUNC(new Runnable1(){
> > public JavaScriptObject run1(NativeEvent e) {
> > ...
> > }
> > });
> >
> > JsUtil.put performs obj[1]=b, jsUtil.FUNC converts a Runnable in a
> > javascript function, etc
> >
> > But this seems to be impossiblein gwt. More, looking at generated sources,
> > I see gwt compiler do a beautifull job optimizing jsni based code. Also I'm
> > feeling very confortably programing overlay types in eclipse with gwt
> > eclipse plugin. So I discarded my initial idea of "doing javascript in
> > java", and I'm working with "normal" overlay types.
> >
> > Thanks again, I will notify the group when my gwt4raphael library supports
> > 100% of the raphaeljs api (neverthelessm,it is very usable right now)
> >
> > Regards, and thank you again.
> >
> > On Sun, 29 Jan 2012 03:23:33 -0800 (PST)
> > Thomas Broyer <t.broyer@gmail.com> wrote:
> >
> > >
> > >
> > > On Friday, January 27, 2012 5:27:10 PM UTC+1, Sebastian Gurin wrote:
> > > >
> > > > Ok I found more or less how to do what I want, the following registers
> > a
> > > > click handler in a native DOM object:
> > > >
> > > > public class DomEventTest1 {
> > > >
> > > > public static interface ClickHandler {
> > > > void notifyClick(Element source);
> > > > }
> > > >
> > > > /** call this directly from your Entry point class */
> > > > public static void test(RootPanel rootPanel) {
> > > >
> > > > //create a button using gwt DOM
> > > > ButtonElement button1 =
> > Document.get().createPushButtonElement();
> > > > button1.setInnerHTML("clickme");
> > > > Document.get().getBody().appendChild(button1);
> > > >
> > > > addClickHandler(button1, new ClickHandler() {
> > > > @Override
> > > > public void notifyClick(Element source) {
> > > > System.out.println("CLICKED");
> > > > }
> > > > });
> > > > }
> > > > public static native void addClickHandler(Element e, ClickHandler
> > > > handler)/*-{
> > > > //dirty click handler registration, only for testing
> > > > e.onclick=function() {
> > > >
> > > >
> > handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler
> > ::notifyClick(Lcom/google/gwt/dom/client/Element;)(this);
> > > > }
> > > > }-*/;
> > > >
> > >
> > > You should wrap your function in $entry() so that a) exceptions are
> > routed
> > > to the GWT.UncaughtExceptionHandler and b) Scheduler.scheduleEntry and
> > > Scheduler.scheduleFinally run appropriately. Also, note that you could
> > pass
> > > the event to your Java code as a NativeEvent:
> > >
> > > e.onclick = $entry(function(e) {
> > > handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> > > ClickHandler::notifyClick(Lcom/google/gwt/dom/client/NativeEvent;)(e);
> > > }
> > >
> > > (you might have to tweak the code for IE, which doesn't pass the event as
> > > an argument but uses window.event (or should it be $wnd.event?))
> > >
> > > }
> > > >
> > > >
> > > > Now two quiestion about jsni.
> > > >
> > > > The first question is: the statement
> > > >
> > > >
> > handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler
> > ::notifyClick(Lcom/google/gwt/dom/client/Element;)(this);
> > > > is a valid javascript statement? or is it some internal gwt compiler
> > > > language that is translated to javascript?
> > > >
> > >
> > > No, it's a special syntax for JSNI. It's not valid JavaScript.
> > >
> > >
> > > > What I would like is to be able of represent any javascript function
> > using
> > > > java objects, like Runnable or other. The main problem for this is be
> > able
> > > > to call a java instance method from javascript having the java class
> > name,
> > > > method name and signature in strings. I would like something like:
> > > >
> > > > public static native void callJavaInstMethod(Object javaThisEl, String
> > > > className, String methodName, String methodSignature,
> > Object[]params)/*-{
> > > > //and here do something like:
> > > >
> > > > javaThisEl.@
> > ${className}::${methodName}(${methodSignature})(${params})
> > > > }-*/;
> > > >
> > > > I tried to archieve something like this unssuccessfully with eval and
> > > > other hacks. A method like this, will allow me to represent any
> > javascript
> > > > function using java objects. For example, instead of writing methods
> > like
> > > > addClickHandler by hand, I could use an Artificial AbstractRunnable
> > class
> > > > for represent javascript functions as java objects and do:
> > > >
> > > > button1.addClickHandler(new AbstractRunnable1<Element>(){
> > > > public void run(Element e) {
> > > > System.out.println("CLICKED");
> > > > }
> > > > });
> > > >
> > > > Any ideas on how to call a java instance method from native javascript
> > > > having all the necesary information in Strings ?
> > > >
> > >
> > > The GWT compiler will obfuscate all class names and method names, so it's
> > > not going to work. Only solution would be to create a map, something
> > like:
> > >
> > >
> > >
> > map['org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)']
> > > =
> > > someObject.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> > > ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;);
> > >
> > > (note that we don't call the method, we only reference it!)
> > > Then:
> > >
> > > var fn = map[className + '::' + methodName + '(' + methodSignature +
> > > ')'];
> > > fn.apply(javaThisEl, params);
> > >
> > > (but note that params would have to be a JS array if you want this to
> > work
> > > in DevMode, as a Java array will be an opaque object in JS)
> > >
> > > Or of course you could do it using switch/case or if/else:
> > > switch (className + '::' + methodName) {
> > > case
> > >
> > 'org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick':
> > >
> > javaThisEl.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> > >
> > ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)(params[0]);
> > > break;
> > > }
> > >
> > > However, I'd suggest you try to find another approach, as the compiler
> > > won't be able to prune unused code and produce an optimally optimized
> > code.
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > Groups "Google Web Toolkit" group.
> > > To view this discussion on the web visit
> > https://groups.google.com/d/msg/google-web-toolkit/-/INg0raG3T48J.
> > > To post to this group, send email to google-web-toolkit@googlegroups.com
> > .
> > > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscribe@googlegroups.com.
> > > For more options, visit this group at
> > http://groups.google.com/group/google-web-toolkit?hl=en.
> > >
> >
> >
> > --
> > Sebastian Gurin <sgurin@softpoint.org>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/google-web-toolkit?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>


--
Sebastian Gurin <sgurin@softpoint.org>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: What is the easiest / best solution for drag and drop in GWT right now?

If your concern is rearranging lists using drag and drop, this can be
done by gwt-dnd package. I've used it to rearrange a list of
disclosure panels. The rearrangement is saved in the Database via
RequestBuilder.
One of the best things I found regarding how to make composite objects
(like Disclosure panel) draggable, is by inserting components in a
FocusPanel.


On Jan 31, 1:59 pm, CSchulz <csch...@acumeta.com> wrote:
> Thanks!! I actually didn't know this! This will help a ton! Do you know if
> there have been any objects created for it? Like a rearrangeable list?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: GWT and method overriding

The override has been there all along (I was hoping it wasn't), I just forgot to put it in my sample code.  The callback instance is defined as:

dispatch.execute(someAction, new MyCallback<someActionResult>() {
   // implementation of a couple abstract methods from MyCallback

  @Override
  public void handleException(SomeException ex) {
    // do actual work here
  }
});

Not sure if it matters, but the callback code above is behind an application split point.  
We're using GWT 2.4.0.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/KV5AcBDV-9UJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

How to get gwt compile error in a gwt generator

Hello,

I'm created a generator for automatically build the activityMapper. The generator scan alls Activities defined in the project and build the activityMapper.
I use the JClassType.getSubtypes() for get all subtypes of Activity in the application.
My problems is when a developper do a GWT error in his activity (like add an incorrect import), the generator didn't know the Activity didn't build the activityMapper with the error activity.
Has there are no others references in the project for this activity, the error file is ignored by GWT, and the compilation work well (there are just a NOTICE logged not displayed if the developpers use WARN has debug level).
When the developper test his application, there nothing displayed, there no error.

How can I get all file with error in my generator and stop the compilation, if there are an error in an activity file.

I'm trying to do this with java reflection, but I can't have all subtype from an super class or interface, I trying to scan all classes in the class path, load the class and check if the class is present in the type oracle, but when I load a file with static GWT code (like GWT.create) it's not loaded in Java.

Thanks for the response,

Patrice de Saint Stéban

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/EyF0-e60tngJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: native javascript functions manipulation in java - overlay types

Any difference between your library and  http://code.google.com/p/raphaelgwt/  ? 

2012/1/31 Sebastian Gurin <sgurin@softpoint.org>
Thomas Thank you very much for your answers. You helped me al lot with my first porting of a javascript toolkit to GWT: my own version of raphaeljs.com (a cool javascript library for doing vector graphics) to gwt:

project page
http://code.google.com/p/raphael4gwt/

demo with java sources available:
http://cancerbero.vacau.com/gwt/raphael4gwtGallery/

This library was written by me in few days and from scratch.

Initially I wanted to create a layer for "doing javascript in java", so I can write javascript in java without jsni (but paying a little overhead price), like something like this:

JavaScriptObject o1 = getNativeObject();
JsUtils.put(o1, "property1", "value1");
JsUtils.put(o1, "onclick", JsUtils.FUNC(new Runnable1(){
       public JavaScriptObject run1(NativeEvent e) {
               ...
       }
});

JsUtil.put performs obj[1]=b, jsUtil.FUNC converts a Runnable in a javascript function, etc

But this seems to be impossiblein gwt. More, looking at generated sources, I see gwt compiler do a beautifull job optimizing jsni based code. Also I'm feeling very confortably programing overlay types in eclipse with gwt eclipse plugin. So I discarded my initial idea of "doing javascript in java", and I'm working with "normal" overlay types.

Thanks again, I will notify the group when my gwt4raphael library supports 100% of the raphaeljs api (neverthelessm,it is very usable right now)

Regards, and thank you again.

On Sun, 29 Jan 2012 03:23:33 -0800 (PST)
Thomas Broyer <t.broyer@gmail.com> wrote:

>
>
> On Friday, January 27, 2012 5:27:10 PM UTC+1, Sebastian Gurin wrote:
> >
> > Ok I found more or less how to do what I want, the following registers a
> > click handler in a native DOM object:
> >
> > public class DomEventTest1 {
> >
> > public static interface ClickHandler {
> >         void notifyClick(Element source);
> > }
> >
> > /** call this directly from your Entry point class */
> > public static void test(RootPanel rootPanel) {
> >
> >         //create a button using gwt DOM
> >         ButtonElement button1 = Document.get().createPushButtonElement();
> >         button1.setInnerHTML("clickme");
> >         Document.get().getBody().appendChild(button1);
> >
> >         addClickHandler(button1, new ClickHandler() {
> >                 @Override
> >                 public void notifyClick(Element source) {
> >                         System.out.println("CLICKED");
> >                 }
> >         });
> > }
> > public static native void addClickHandler(Element e, ClickHandler
> > handler)/*-{
> >         //dirty click handler registration, only for testing
> >         e.onclick=function() {
> >
> > handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)(this);
> >         }
> > }-*/;
> >
>
> You should wrap your function in $entry() so that a) exceptions are routed
> to the GWT.UncaughtExceptionHandler and b) Scheduler.scheduleEntry and
> Scheduler.scheduleFinally run appropriately. Also, note that you could pass
> the event to your Java code as a NativeEvent:
>
> e.onclick = $entry(function(e) {
>    handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> ClickHandler::notifyClick(Lcom/google/gwt/dom/client/NativeEvent;)(e);
> }
>
> (you might have to tweak the code for IE, which doesn't pass the event as
> an argument but uses window.event (or should it be $wnd.event?))
>
> }
> >
> >
> > Now two quiestion about jsni.
> >
> > The first question is: the statement
> >
> > handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)(this);
> > is a valid javascript statement? or is it some internal gwt compiler
> > language that is translated to javascript?
> >
>
> No, it's a special syntax for JSNI. It's not valid JavaScript.
>
>
> > What I would like is to be able of represent any javascript function using
> > java objects, like Runnable or other. The main problem for this is be able
> > to call a java instance method from javascript having the java class name,
> > method name and signature in strings. I would like something like:
> >
> > public static native void callJavaInstMethod(Object javaThisEl, String
> > className, String methodName, String methodSignature, Object[]params)/*-{
> >         //and here do something like:
> >
> >         javaThisEl.@${className}::${methodName}(${methodSignature})(${params})
> > }-*/;
> >
> > I tried to archieve something like this unssuccessfully with eval and
> > other hacks. A method like this, will allow me to represent any javascript
> > function using java objects. For example, instead of writing methods like
> > addClickHandler by hand, I could use an Artificial AbstractRunnable class
> > for represent javascript functions as java objects and do:
> >
> > button1.addClickHandler(new AbstractRunnable1<Element>(){
> >         public void run(Element e) {
> >                 System.out.println("CLICKED");
> >         }
> > });
> >
> > Any ideas on how to call a java instance method from native javascript
> > having all the necesary information in Strings ?
> >
>
> The GWT compiler will obfuscate all class names and method names, so it's
> not going to work. Only solution would be to create a map, something like:
>
>
>  map['org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)']
> =
>       someObject.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;);
>
> (note that we don't call the method, we only reference it!)
> Then:
>
>    var fn = map[className + '::' + methodName + '(' + methodSignature +
> ')'];
>    fn.apply(javaThisEl, params);
>
> (but note that params would have to be a JS array if you want this to work
> in DevMode, as a Java array will be an opaque object in JS)
>
> Or of course you could do it using switch/case or if/else:
>    switch (className + '::' + methodName) {
>       case
> 'org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick':
>          javaThisEl.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)(params[0]);
>          break;
>    }
>
> However, I'd suggest you try to find another approach, as the compiler
> won't be able to prune unused code and produce an optimally optimized code.
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/INg0raG3T48J.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>


--
Sebastian Gurin <sgurin@softpoint.org>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: setFocus in SelectionChangeEvent

is there a way to do this ?

Thank you,
Martin

On Jan 27, 8:27 pm, k2s <martin.mi...@gmail.com> wrote:
> There is samplehttp://gwt.google.com/samples/Showcase/Showcase.html#!CwCellList.
> How to set focus to "First Name" field after SelectionChangeEvent on
> cell list was fired ?
>
> Thank you,
> Martin

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: native javascript functions manipulation in java - overlay types

Thomas Thank you very much for your answers. You helped me al lot with my first porting of a javascript toolkit to GWT: my own version of raphaeljs.com (a cool javascript library for doing vector graphics) to gwt:

project page
http://code.google.com/p/raphael4gwt/

demo with java sources available:
http://cancerbero.vacau.com/gwt/raphael4gwtGallery/

This library was written by me in few days and from scratch.

Initially I wanted to create a layer for "doing javascript in java", so I can write javascript in java without jsni (but paying a little overhead price), like something like this:

JavaScriptObject o1 = getNativeObject();
JsUtils.put(o1, "property1", "value1");
JsUtils.put(o1, "onclick", JsUtils.FUNC(new Runnable1(){
public JavaScriptObject run1(NativeEvent e) {
...
}
});

JsUtil.put performs obj[1]=b, jsUtil.FUNC converts a Runnable in a javascript function, etc

But this seems to be impossiblein gwt. More, looking at generated sources, I see gwt compiler do a beautifull job optimizing jsni based code. Also I'm feeling very confortably programing overlay types in eclipse with gwt eclipse plugin. So I discarded my initial idea of "doing javascript in java", and I'm working with "normal" overlay types.

Thanks again, I will notify the group when my gwt4raphael library supports 100% of the raphaeljs api (neverthelessm,it is very usable right now)

Regards, and thank you again.

On Sun, 29 Jan 2012 03:23:33 -0800 (PST)
Thomas Broyer <t.broyer@gmail.com> wrote:

>
>
> On Friday, January 27, 2012 5:27:10 PM UTC+1, Sebastian Gurin wrote:
> >
> > Ok I found more or less how to do what I want, the following registers a
> > click handler in a native DOM object:
> >
> > public class DomEventTest1 {
> >
> > public static interface ClickHandler {
> > void notifyClick(Element source);
> > }
> >
> > /** call this directly from your Entry point class */
> > public static void test(RootPanel rootPanel) {
> >
> > //create a button using gwt DOM
> > ButtonElement button1 = Document.get().createPushButtonElement();
> > button1.setInnerHTML("clickme");
> > Document.get().getBody().appendChild(button1);
> >
> > addClickHandler(button1, new ClickHandler() {
> > @Override
> > public void notifyClick(Element source) {
> > System.out.println("CLICKED");
> > }
> > });
> > }
> > public static native void addClickHandler(Element e, ClickHandler
> > handler)/*-{
> > //dirty click handler registration, only for testing
> > e.onclick=function() {
> >
> > handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)(this);
> > }
> > }-*/;
> >
>
> You should wrap your function in $entry() so that a) exceptions are routed
> to the GWT.UncaughtExceptionHandler and b) Scheduler.scheduleEntry and
> Scheduler.scheduleFinally run appropriately. Also, note that you could pass
> the event to your Java code as a NativeEvent:
>
> e.onclick = $entry(function(e) {
> handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> ClickHandler::notifyClick(Lcom/google/gwt/dom/client/NativeEvent;)(e);
> }
>
> (you might have to tweak the code for IE, which doesn't pass the event as
> an argument but uses window.event (or should it be $wnd.event?))
>
> }
> >
> >
> > Now two quiestion about jsni.
> >
> > The first question is: the statement
> >
> > handler.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)(this);
> > is a valid javascript statement? or is it some internal gwt compiler
> > language that is translated to javascript?
> >
>
> No, it's a special syntax for JSNI. It's not valid JavaScript.
>
>
> > What I would like is to be able of represent any javascript function using
> > java objects, like Runnable or other. The main problem for this is be able
> > to call a java instance method from javascript having the java class name,
> > method name and signature in strings. I would like something like:
> >
> > public static native void callJavaInstMethod(Object javaThisEl, String
> > className, String methodName, String methodSignature, Object[]params)/*-{
> > //and here do something like:
> >
> > javaThisEl.@${className}::${methodName}(${methodSignature})(${params})
> > }-*/;
> >
> > I tried to archieve something like this unssuccessfully with eval and
> > other hacks. A method like this, will allow me to represent any javascript
> > function using java objects. For example, instead of writing methods like
> > addClickHandler by hand, I could use an Artificial AbstractRunnable class
> > for represent javascript functions as java objects and do:
> >
> > button1.addClickHandler(new AbstractRunnable1<Element>(){
> > public void run(Element e) {
> > System.out.println("CLICKED");
> > }
> > });
> >
> > Any ideas on how to call a java instance method from native javascript
> > having all the necesary information in Strings ?
> >
>
> The GWT compiler will obfuscate all class names and method names, so it's
> not going to work. Only solution would be to create a map, something like:
>
>
> map['org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)']
> =
> someObject.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;);
>
> (note that we don't call the method, we only reference it!)
> Then:
>
> var fn = map[className + '::' + methodName + '(' + methodSignature +
> ')'];
> fn.apply(javaThisEl, params);
>
> (but note that params would have to be a JS array if you want this to work
> in DevMode, as a Java array will be an opaque object in JS)
>
> Or of course you could do it using switch/case or if/else:
> switch (className + '::' + methodName) {
> case
> 'org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.ClickHandler::notifyClick':
> javaThisEl.@org.sgx.gwtraphaljstest.client.js.test.DomEventTest1.
> ClickHandler::notifyClick(Lcom/google/gwt/dom/client/Element;)(params[0]);
> break;
> }
>
> However, I'd suggest you try to find another approach, as the compiler
> won't be able to prune unused code and produce an optimally optimized code.
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/INg0raG3T48J.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>


--
Sebastian Gurin <sgurin@softpoint.org>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

How to set back ground color to a textfield

Here I'm trying to create a textfield as disabled with background
color as a red/green!
i can able to make it as a disabled but color doesn't rendering in
browser...
i'm using

textfield.setStyleAttribute("backgroundColor","green"); method but
it's not rendering into browser !

any idea about this kind of issue .

Thanks in advance

Vijay Katta

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: How to wrap a “submit button” with GWT?

Document.get().getElementById() simply maps to document.getElementById(), so you'll have to use your browser's debugging tools to debug it.

First, I'd try to change the ID of the button.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Hxbltd1zlG8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: does CSS Sprite is default ?

As I often say: there's no magic.

GWT will only do something if you somehow "tell" it to do it: it won't try to optimize images unless they are in an ImageBundle or ClientBundle.

Note however that the default behavior for ClientBundle is actually not to create a "CSS sprite" but to use data: URIs directly embedded in the JS (and/or in the CSS for a CssResource, which is also embedded as a String in the JS) for all browsers that support it (all but IE6/7, also, IE8 will fallback to loading images from the server –without any optimization at all, IIRC– when using HTTPS, because data: URIs in an HTTPS-served page would result in a "mixed content" warning)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/bqx9ilJHJ5YJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: DataGrid: нow to center loading indicator?

iside = inside)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/6AwBZi-B4isJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

DataGrid: нow to center loading indicator?

Hello! How to center loading indicator? By default it displays with top align iside. I made DataGrid with AbstractCellTableBuilder. 


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/a9q_agbpBRQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: what version does the firefox development extendion suppot?

Read the thread again: download from the SVN.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/K9_AeOw7i_sJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: Capturing “Cancel” selection from GWT Activity.mayStop() response

With a CellTable, you can also use a CellPreviewEvent.Handler instead of a custom cell (or you can use a custom SelectionModel that won't update from methods called by the CellTable, and you'll update it "manually" using another specific method, in response to a PlaceChangeEvent).

See also (for those who don't read StackOverflow) http://stackoverflow.com/questions/9074497/request-factory-is-sending-back-the-entire-listentityproxy-even-if-only-one-el

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/oy6-ymtZYSQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Is it possible to programmatically catch all events on the page in the browser?

In here in says we can:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/aaf3896af8a10969/13b07a31440532ce?lnk=gst&q=catch+all+events#13b07a31440532ce

But here they say it is easy way in javascript:
http://stackoverflow.com/questions/5107232/is-it-possible-to-programmatically-catch-all-events-on-the-page-in-the-browser

In Java, for AWT and SWT there is an event bus so a programmer can
catch all GUI events without explicitly adding event listener to all
widgets.

Is it possible to programmatically catch all events on the
page in the browser? Even if the developer uses preventdefault or
stopbubbling, can I catch the event?

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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: RequestFactory , ServiceLocator and Generic Dao class , NoSuchMethodFound

Can you look in the Deobfuscator.Builder generated by the RF ValidationTool (if you configured annotation processing in Eclipse, it should be in a .apt_generated folder unless you changed it; and note that if you ValidationTool from the command line, it won't output the Java code, only the compiled class, so don't use it here), what are the lines related to the 'persist' method from your RequestContext?

(I mean, it might very well be a bug in the ValidationTool)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/PuCdsYT2eUAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Facing exception: java.lang.RuntimeException: Deferred binding failed for 'com.google.test.client.CustomDataGridResources' (did you forget to inherit a required module

Hello All,

I have created the interface

import com.google.gwt.user.cellview.client.DataGrid;
import com.google.gwt.user.cellview.client.DataGrid.Resources;
import com.google.gwt.user.cellview.client.DataGrid.Style;


public interface CustomDataGridResources extends Resources {

       
   @Source("../public/css/necComponent.css")
    Style dataGridStyle();

}

}

In my other class in the same package i have used like this:

DataGrid.Resources resources = GWT.create(CustomDataGridResources.class);
dataGrid = new DataGrid<T>(40, resources);

In my xml file i have written like this:

<inherits name='com.google.gwt.user.User'/>
<inherits name="com.google.gwt.user.cellview.CellView"/>


but i am facing the  exception

java.lang.RuntimeException: Deferred binding failed for 'com.google.test.client.CustomDataGridResources' (did you forget to inherit a required module)



Regards,
vaibhav

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: What is the easiest / best solution for drag and drop in GWT right now?

Thanks!! I actually didn't know this! This will help a ton! Do you know if there have been any objects created for it? Like a rearrangeable list? 

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/gEKy5NoUtOYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Re: How to build a simple GWT event bus using Generators

Here's the size breakdown of the generated Javascript (*.cache.html)
under GWT 2.4 for the example app.

When the event bus' code generation is enabled, it includes all event
publishers whether or not they are used in the final app. When
disabled, only an empty PublisherFactoryRegistryImpl is generated to
satisfy the compiler. None of the publishers are generated.

Normal compile:
- Event bus disabled: 90 KB
- Event bus enabled: 110 KB

Compile without obfuscation (-style PRETTY):
- Event bus disabled: 250 KB
- Event bus enabled: 310 KB

Under a normal compile, the event bus overhead for each permutation is
about 20 KB on disk. This includes the event bus engine, the 17 built-
in GWT EventListeners, the ExceptionListener, and the SearchListener.
The actual overhead for unused EventListeners is somewhere below 20
KB, I'm guessing it's even below 10 KB.

I'm willing to live with a 10 KB overhead to use a simpler event bus.

Cheers,
Dele

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.