Wednesday, February 29, 2012

Help understanding component size

Hi,

this seems to be a simple question, but maybe I miss something basic
here. I try to understand why the ListBox in the following layout
always has a fixed height of 1.5 items:

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:DockLayoutPanel unit="PX" width="400px" height="400px">
<g:center>
<g:ListBox visibleItemCount="5">
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
<g:item>ifuheihfihwgswswfwsrehfg</g:item>
</g:ListBox>
</g:center>
</g:DockLayoutPanel>
</ui:UiBinder>

With that template I would expect the ListBox to have a height of 5
items? Changing the value of visibleItemCount does nothing, the same
with defining explicit height on the ListBox. Can anyone give me a
hint?
I use GWT 2.3.0.

Regards,
Udo

--
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: Session Tracking

Write a service on Server side which extends RemoteServiceServlet.
Create an object of type HttpSession as a member.
Write methods to serAttribute and getAttribute.


On client side. Inject the service and call setAttribute and
getAttribute methods wherever you want to add data to session or read
data from session.


Refer sample code below:


SessionService ( On server side)


import java.awt.List;


import javax.servlet.http.HttpSession;


import com.google.gwt.user.server.rpc.RemoteServiceServlet;


@SuppressWarnings("serial")
public class SessionImpl extends RemoteServiceServlet implements
ISession {

       public static HttpSession httpSession;


       @Override
       public String getStrAttribue(String attribute) {
              httpSession = getThreadLocalRequest().getSession(true);
              return  (String) httpSession.getAttribute(attribute);
       }


       @Override
       public void setAttribue(String attribute, String attValue) {
              httpSession = getThreadLocalRequest().getSession(true);
              httpSession.setAttribute(attribute, attValue);

       }

}


To use session (on client side)


@Inject
       public ISessionAsync session;


                                 
session.setAttribue("User","Sujit",new  AsyncCallback<Void>() {

                                         @Override
                                         public void onSuccess(Void
result) {
                                                //some event
                                         }

                                         @Override
                                         public void
onFailure(Throwable caught) {
                                                // TODO Auto-generated
method stub

                                         }
                                  });

--
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 POST in REST web service

Hi all,
I am trying to  make a REST call to get the response from Web Service. The code is as below and it works.
public static String makeRestCall(String service)  {
StringBuilder sb = new StringBuilder();
String baseURL = urlsrc;
try {
//set URL
URL url = new URL(baseURL + service);
//make connection
URLConnection urlc = url.openConnection();
BufferedReader br = new BufferedReader(new InputStreamReader(urlc.getInputStream()));
String l = null;
while ((l=br.readLine())!=null) {
sb.append(l);
}
br.close();
} catch (Exception ex){
ex.getMessage();
}
return sb.toString();
}


But what are the changes that i need to make so that i can make  a POST call to Web service.
Any help is appreciated.

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.

Session Tracking

Hi

I am working on gwt. I want to know how to handle sessions(Session
Tracking like in servlets). Can anyone help me.

--
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 application freezes when new version is deployed while using it

Joe,

We've done something similar. Rather than show a pretty dialog, we embedded some JSNI code in the onAsyncCallFail call. This shows a standard "window.confirm" dialog, then calls $wnd.location.href = href (I seem to recall window.location.reload didn't work). We also deploy in the wee weekend hours as well.

I'm liking a lot of the suggestions here, particularly the one about a heartbeat call. The problem I've been wrestling with is: Whenever we want the user to use the new version, we have to wait until they actual do something (i.e. make an RPC call or hit a code-split point). Which means they're trying to get something done and we're interrupting them. A heartbeat mitigates this a little. And assuming we structure things properly, we could notify the user of the new version without actually forcing them to reload. Maybe with a message at the top. I believe Google Groups does this now, yesno?

That's the theory anyway...


On Wed, Feb 29, 2012 at 8:55 PM, Joseph Lust <lifeoflust@gmail.com> wrote:
Kyle,

Can you hardcode the onclick="window.location.reload();" method in the
"OK" button, so it should still work even if the GWT frontend is
hosed?

Sincerely,
Joe

On Jan 11, 8:56 am, Kyle Baley <k...@baley.org> wrote:
> We've gone Thomas's original suggest route of informing the user. But in
> our original pass at this, we threw up a dialog with an OK button on it. It
> said something to the effect of "There's a new version. Please log in
> again". Clicking OK is intended to log the user out and forcibly refresh
> the page.
>
> What we're finding is that for the code-splitting case, the dialog does
> indeed come up but the whole page becomes unresponsive afterward. That is,
> you can't click the OK button. I've verified that this happens regardless
> of whether we put a dialog up or not. Nothing on the page is clickable at
> all. Wondering if this is what others see as well and if so, if there's a
> way around 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-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.

about css style in gwt

in gwt developer guilde http://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html

complex style section:


 .gwt-MenuBar {         /* properties applying to the menu bar itself */     }    .gwt-MenuBar .gwt-MenuItem {         /* properties applying to the menu bar's menu items */     }    .gwt-MenuBar .gwt-MenuItem-selected {         /* properties applying to the menu bar's selected menu items */    }

I cannout underatand, why the css rule is
.gwt-MenuBar .gwt-MenuItem
but not
.gwt-MenuItem
?
I am not good in css, is
.gwt-MenuBar .gwt-MenuItem is equal to just one css class? not any special meaning for the prefix .gwt-MenuBar, that is
we can rename it as
.gwt-MenuBargwt-MenuItem will not any different?


--
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/-/6i_kAKsfeLYJ.
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: the output of DialogBox is very strange

I don't think setSize is really supported for the content area of the
DialogBox since setSize is inherited from UIObject. I believe the
size you're setting is the actual dialog box's outer dimensions (ie.
the DecoratorPanel's table) and not your content's dimensions.

What you'll really want to do is have your dialog box's main content
widget sized how you want it and let dialog box size itself based on
that - as RKP Pisters suggested.

On Feb 28, 8:21 pm, tong123123 <tong123...@gmail.com> wrote:
> thanks for the reply.
> I found the problem seems related to Dialogbox.setsize(), if call this
> method, the dialogBox will be very strange, just try the following to
> simulate:
>
> public class GWTTest1 implements EntryPoint, ClickHandler {
>
>           private static class MyDialog extends DialogBox {
>
>             public MyDialog() {
>               // Set the dialog box's caption.
>               setText("My First Dialog");
>
>               // Enable animation.
>               setAnimationEnabled(true);
>
>               // Enable glass background.
>               setGlassEnabled(true);
>
>               // DialogBox is a SimplePanel, so you have to set its widget
> property to
>               // whatever you want its contents to be.
>               ScrollPanel scrollPanel1 = new ScrollPanel();
>               //scrollPanel1.setSize("1800px", "500px");
>               setWidget(scrollPanel1);
>               Button ok = new Button("OK");
>
>               ok.addClickHandler(new ClickHandler() {
>                 @Override
>                 public void onClick(ClickEvent event) {
>                   MyDialog.this.hide();
>                 }
>               });
>               scrollPanel1.add(ok);
>
>             }
>           }
>
>           public void onModuleLoad() {
>             Button b = new Button("Click me");
>             b.addClickHandler(this);
>
>             RootPanel.get().add(b);
>           }
>
>           public void onClick(ClickEvent event) {
>             // Instantiate the dialog box and show it.
>             MyDialog myDialog1 = new MyDialog();
>             // if myDialog1.setSize(), will throw very strange result!!
>             myDialog1.setSize("1800px", "500px");
>             myDialog1.show();
>           }
>         }
>
> if comment out the statement "myDialog1.setSize("1800px", "500px");"
> and uncomment the statement //scrollPanel1.setSize("1800px", "500px");
> everything is ok.
> so I think the DialogBox.setSize() has some problem.

--
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 look the widget's html code generated by gwt

as captioned, any method to know what html is generated for a widget
by gwt?
I see many post can create a subclass of widget and override the
render() method, but seem they know what is the original html
generated by the widget, how could they got this information?

--
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 load an external JS-file without calling a function in there

newnoise,

I thought you could just place the <script> tag in your manifest file
and that external library would be loaded into the page. Perhaps
you've already tried this, but I did not see it mentioned above.

i.e.

<module rename-to='app'>
...
<script src="advert.js"></script>
...

Otherwise, can you just look at their API as JoseM pointed out and
write a few lines of JNSI to wrap it and then have your own java
addAdvert(Element div) method? That would be the cleanest solution.
You should be able to use a JS Beautifier (many browser based versions
available) to deobfuscate it if it's not document and find the
functions you need to call.

Since it might not be a supported API, also add some GwtTestCases to
confirm proper functionality of the JNSI hook so you know if an
upgrade from the advertiser breaks it.


Sincerely,
Joe

On Feb 29, 11:55 am, JoseM <jose.a.marti...@gmail.com> wrote:
> Check their API or read their javascript code, there might be a way to pass
> an id of a div which they would use to append to instead of using
> document.write.  That's what I found when trying to use Twitter's Widget
> api, it was documented but I did find it by reading their code and seeing
> what it does.
>
>
>
>
>
>
>
> On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
>
> > Anything relying on document.write() must be in your HTML source when it's
> > being parsed; they can't be loaded dynamically.
>
> > On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
>
> >> Hi,
>
> >> I'm trying to dynamically add advertisement to our page. Our
> >> advertisement-partner provides us a script which we have to include
> >> like this:
> >> <script type="text/javascript" src="http://www.somesource.com/
> >> output.js?id=123 <http://www.somesource.com/output.js?id=123>"></script>
>
> >> The output.js just contains one line of code like this:
> >> document.write("<div>some html</div>");
>
> >> I have no idea how I can add this JS to the page and make it
> >> execute ... I tried just adding it as a HTML-Widget, which correctly
> >> adds the code, but it isnt executed. Also the ScriptInjection doesnt
> >> help, because I need the code somewhere in the <body> and not in
> >> <head>.
>
> >> I'm happy for any help!
> >> Tom
>
> On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
>
> > Anything relying on document.write() must be in your HTML source when it's
> > being parsed; they can't be loaded dynamically.
>
> > On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
>
> >> Hi,
>
> >> I'm trying to dynamically add advertisement to our page. Our
> >> advertisement-partner provides us a script which we have to include
> >> like this:
> >> <script type="text/javascript" src="http://www.somesource.com/
> >> output.js?id=123 <http://www.somesource.com/output.js?id=123>"></script>
>
> >> The output.js just contains one line of code like this:
> >> document.write("<div>some html</div>");
>
> >> I have no idea how I can add this JS to the page and make it
> >> execute ... I tried just adding it as a HTML-Widget, which correctly
> >> adds the code, but it isnt executed. Also the ScriptInjection doesnt
> >> help, because I need the code somewhere in the <body> and not in
> >> <head>.
>
> >> I'm happy for any help!
> >> Tom
>
> On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
>
> > Anything relying on document.write() must be in your HTML source when it's
> > being parsed; they can't be loaded dynamically.
>
> > On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
>
> >> Hi,
>
> >> I'm trying to dynamically add advertisement to our page. Our
> >> advertisement-partner provides us a script which we have to include
> >> like this:
> >> <script type="text/javascript" src="http://www.somesource.com/
> >> output.js?id=123 <http://www.somesource.com/output.js?id=123>"></script>
>
> >> The output.js just contains one line of code like this:
> >> document.write("<div>some html</div>");
>
> >> I have no idea how I can add this JS to the page and make it
> >> execute ... I tried just adding it as a HTML-Widget, which correctly
> >> adds the code, but it isnt executed. Also the ScriptInjection doesnt
> >> help, because I need the code somewhere in the <body> and not in
> >> <head>.
>
> >> I'm happy for any help!
> >> Tom

--
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 application freezes when new version is deployed while using it

To add to Stephen's points,

- Using legacy mode, or keep the last set of RPC files around (so you
have N & N-1) should let the users fail gracefully w/o deserialization
errors. Then you can check the app version number (say put this check
on your async interfaces) and prompt for reload.

- App Engine lets you deploy multiple versions of your app to
<version>.myapp.appspot.com. If you had an 'A' and 'B' version, and
alternated them each release, you could use the graceful shedding to
move everyone from A.myapp.appspot.com to B.myapp.appspot.com and then
turn off A (or at least have no more entry points to A).

- To prevent this in our enterprise apps we have taken the slightly
draconian policy of a 30min UI timeout. There is a listener that
resets the timer every time there is a click interaction with the UI.
Thus, if someone leaves the app untouched for 30min, they get a locked
out modal with a button to reload.

- Finally, do the cut over for your app in hours of nadir load. We do
ours in the wee hours on the weekend, so nobody should be using it at
the time.


Sincerely,
Joe

On Feb 29, 11:36 am, Stephen Haberman <stephen.haber...@gmail.com>
wrote:
> > Is there a clean way to *not* require the user to refresh the page?
>
> Everything Thomas said is right, and I'll chime in with my own experience.
> Basically:
>
> - If you use IsSerializable and no type-name elision you won't have to keep
> old GWT RPC policy files around between builds (the legacy serialization
> policy will handle new/old clients as long as your DTOs don't have changes,
> which for frequent builds is probably more often the case--AFAIK this makes
> GWT RPC comparable to RF in handling non-breaking-changes to the DTOs)
>
> - As Thomas said, handle IncompatibleRemoteServiceExceptions for when DTOs
> do have breaking changes
>
> - As Thomas said, handle 404s in runAsync onFailures (or just not use async
> loading if your app is small enough :-)
>
> - Have a clean switch between new/old servers (e.g. if you have 10 servers,
> then start 10 new servers, and slowly turn off the old ones, you'll run
> into problems, which I walked through in a blog post [1]). Ideally you can
> immediately switch from the old server(s) to the new.
>
> Having seamless deployments is surprisingly hard for GWT apps--although I
> don't think the problems are unique to GWT vs. regular webapps, its
> approach to perfect caching highlights the problems of new/old
> servers/clients trying to talk nicely to each other. I'd be interested in
> hearing internal/Google best practices for this sort of stuff, although it
> looks like Thomas has already inferred a lot of it by watching how the
> Google Groups UI behaves.
>
> - Stephen
>
> [1]http://draconianoverlord.com/2010/07/07/gwt-seamless-upgrades.html
>
>
>
>
>
>
>
> On Thursday, January 5, 2012 6:39:37 AM UTC-6, Kyle Baley wrote:
>
> > Now that I've determined our problem, I have another question. Is there a
> > clean way to *not* require the user to refresh the page?
> On Thursday, January 5, 2012 6:39:37 AM UTC-6, Kyle Baley wrote:
>
> > Now that I've determined our problem, I have another question. Is there a
> > clean way to *not* require the user to refresh the page?
> On Thursday, January 5, 2012 6:39:37 AM UTC-6, Kyle Baley wrote:
>
> > Now that I've determined our problem, I have another question. Is there a
> > clean way to *not* require the user to refresh the page?
> On Thursday, January 5, 2012 6:39:37 AM UTC-6, Kyle Baley wrote:
>
> > Now that I've determined our problem, I have another question. Is there a
> > clean way to *not* require the user to refresh the page?

--
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 application freezes when new version is deployed while using it

Kyle,

Can you hardcode the onclick="window.location.reload();" method in the
"OK" button, so it should still work even if the GWT frontend is
hosed?

Sincerely,
Joe

On Jan 11, 8:56 am, Kyle Baley <k...@baley.org> wrote:
> We've gone Thomas's original suggest route of informing the user. But in
> our original pass at this, we threw up a dialog with an OK button on it. It
> said something to the effect of "There's a new version. Please log in
> again". Clicking OK is intended to log the user out and forcibly refresh
> the page.
>
> What we're finding is that for the code-splitting case, the dialog does
> indeed come up but the whole page becomes unresponsive afterward. That is,
> you can't click the OK button. I've verified that this happens regardless
> of whether we put a dialog up or not. Nothing on the page is clickable at
> all. Wondering if this is what others see as well and if so, if there's a
> way around 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-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.

Proguard Causes "The RequestFactory ValidationTool must be run" Error

Title pretty much says it, when I have proguard enabled I get the error, when I disable it (or run in debug mode) everything is fine. Any help would be appreciated.


Stack Trace:
02-29 17:24:04.195: E/AndroidRuntime(18174): FATAL EXCEPTION: IntentService[at email]
02-29 17:24:04.195: E/AndroidRuntime(18174): java.lang.RuntimeException: The RequestFactory ValidationTool must be run for the com.project.mms.a.a RequestFactory type
02-29 17:24:04.195: E/AndroidRuntime(18174): at com.google.e.a.c.b.a.b.a(Unknown Source)
02-29 17:24:04.195: E/AndroidRuntime(18174): at com.google.e.a.c.b.e.<init>(Unknown Source)
02-29 17:24:04.195: E/AndroidRuntime(18174): at com.google.e.a.c.b.h.a(Unknown Source)
02-29 17:24:04.195: E/AndroidRuntime(18174): at com.project.mms.w.a(Unknown Source)
02-29 17:24:04.195: E/AndroidRuntime(18174): at com.project.mms.o.a(Unknown Source)
02-29 17:24:04.195: E/AndroidRuntime(18174): at com.project.mms.C2DMReceiver.a(Unknown Source)
02-29 17:24:04.195: E/AndroidRuntime(18174): at com.google.android.c2dm.C2DMBaseReceiver.onHandleIntent(Unknown Source)
02-29 17:24:04.195: E/AndroidRuntime(18174): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
02-29 17:24:04.195: E/AndroidRuntime(18174): at android.os.Handler.dispatchMessage(Handler.java:99)
02-29 17:24:04.195: E/AndroidRuntime(18174): at android.os.Looper.loop(Looper.java:143)
02-29 17:24:04.195: E/AndroidRuntime(18174): at android.os.HandlerThread.run(HandlerThread.java:60)




Proguard file:

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class com.android.vending.licensing.ILicensingService
-keep class info.guardianproject.database.** {*;}
-keep class info.guardianproject.database.sqlcipher.** {*;}
-keep class com.project.mms.ui.* {*;}

-libraryjars /libs/guava-r09.jar
-libraryjars /libs/commons-codec.jar
-libraryjars /libs/sqlcipher.jar
-libraryjars /libs/jsr305-1.3.9.jar
-libraryjars c:/android-sdk-windows/platforms/android-8/android.jar
-verbose

-dontwarn sun.misc.Unsafe

-keepclasseswithmembers class * {
    native <methods>;
}

-keepclasseswithmembers class * {
    native <methods>;
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

# Needed by google-api-client to keep generic types and @Key annotations accessed via reflection
-keepclassmembers class * {
  @com.google.api.client.util.Key <fields>;
}
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
# Needed by Guava
-dontwarn sun.misc.Unsafe

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

Windows 8

Wrapping the Windows 8 JS API in GWT

Anyone looking at this?

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

What is header size attribute in TabLayoutPanel (UiBinder)?

I'm following the UiBinder example for a TabLayoutPanel, and I'm
wondering what a header's size attribute is. From the example in the
javadoc:

<g:TabLayoutPanel barUnit='EM' barHeight='3'>
<g:tab>
<g:header size='7'><b>HTML</b> header</g:header>
<g:Label>able</g:Label>
</g:tab>
...

So what is size, as in <g:header size='7'>? In my own app, I have 3
tabs. Regardless of what I set size to, the headers always appear the
same in IE and Firefox, even when each size is different (say, 0, 7,
and 21).

BTW, as noted in Issue 4694, comments 44 and 45, in IE you **must**
use barUnit='PX', at least if your TabLayoutPanel resides in a
SplitLayoutPanel. If you don't, the tab widget take up the entire
height and the tab bar is not seen.

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

Compiling from command line

/usr/lib/jvm/jdk1.6.0_26_32/bin/java -cp ~/Software/Java/gwt-trunk/build/staging/gwt-0.0.0/gwt-dev.jar -Xmx512m com.google.gwt.dev.Compiler -logLevel INFO -style OBFUSCATED -war ~/Software/Java/workspace/MyProject-AppEngine/war -localWorkers 4 project.Embed project.Project project.Mobile project.NativeMobile project.Gadget

I'm got:

Loading inherited module 'project.Embed'
   [ERROR] Unable to find 'project/Embed.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

So I added the source directory:

/usr/lib/jvm/jdk1.6.0_26_32/bin/java -cp ~/Software/Java/gwt-trunk/build/staging/gwt-0.0.0/gwt-dev.jar:~/Software/Java/workspace/MyProject-AppEngine/src/ -Xmx512m com.google.gwt.dev.Compiler -logLevel INFO -style OBFUSCATED -war ~/Software/Java/workspace/MyProject-AppEngine/war -localWorkers 4 project.Embed project.Project project.Mobile project.NativeMobile project.Gadget

And I got:

Loading inherited module 'project.Embed'
   Loading inherited module 'com.google.gwt.core.Core'
      [ERROR] Unable to find 'com/google/gwt/core/Core.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?


Will I have to add every client source directory / jar into the classpath? (probably yes?)

Is there a way to capture the exact command eclipse uses when compiling the GWT project? When I try (ps -fp <PID>), I don't see any path information... 

p.s. my goal is to checkout trunk, compile, and deploy gwt projects to appengine on my "build-machine" remotely from my notebook.  I got checkout and deploy working, I just need to be able to compile from command line.

Thanks!

--
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/-/PbpgtkT5uBIJ.
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 compile a particular class

Hi All,

I have the following scenario.

In GWT application, i have two seperate modules, not inherited one from another.

Module A has 
class AbcDTO implements Serialisable {
}

in its shared package.


Module B has a different shared package.

What i want is to compile AbcDTO with module B so that i can use AbcDTO in module B client code. Otherwise if i dont include AbcDTO in compilation of Module B, It will throw exception when using AbcDTO in module B client code.

How can i include this particular AbcDTO in mudule B.gwt.xml file for compilation ?


Thanks
Deepak



--
Deepak Singh

--
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: Selecting list items from history actions using Activities and Places

It does, but this is a differrent issue. The selectionmodel needs to be notified of selection somehow if the user isn't selecting with mouse or keyboard. 

My problem is when the user navigates to a state in the app where an item should appear to be selected  - directly via a URL (as supported by activities/places) or using back/forward buttons - rather than by clicking.

For example, I click an Item in the CellList, the onSelection change handler fires an event to go to a new place. The Item appears selected...all is good. However, when the user clicks the back button, for example, I now need to select a DIFFERENT item in that CellList to represent the last place they were on. The history manager fires some placeChangeEvent that I can listen for. So I attach a handler to that PlaceChangeEvent that tells the list to select and item.

The problem is that the selection handler, upon being told to select the item representing where I actually am, will AGAIN fire the event to go to a new place (as it should). Now, I've got a bad loop.

I hope that makes the problem clearer. I can't wrap my head around how to make this work.

- Shaun

--
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/-/oGLD5HqYR0cJ.
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: Accessint GWT's HIstory Stack

Regarding History object and the firing of ValueChangeEvents... I've confirmed that the events are not being fired with this:

    History.addValueChangeHandler(new ValueChangeHandler<String>() {

      @Override
      public void onValueChange(ValueChangeEvent<String> event) {
        Window.alert("history changed");
      }
     
    });


A fresh GWT 2.4 app only containing the following code will always fire a ValueChangeEvent whenever the history stack changes (not tested in IE):

@Override
public void onModuleLoad() {
  History.addValueChangeHandler(new ValueChangeHandler<String>() {
      @Override
      public void onValueChange(final ValueChangeEvent<String> event) {
        RootPanel.get().add(new Label("History changed: " + event.getValue()));
      }
  });
  History.fireCurrentHistoryState();
}


So I am not quite sure how I could make it not work :) I guess it only stops working if the browser does not fire the corresponding native event but that would be a browser issue.



I am wondering if the use of Places and the MVP framework has something to do with this... The way navigation works in my app is via "clientFactory.getPlaceController().goTo(place);" and if the user stays within the same "Place" (ie same token prefix) no event is fired. However, I am able to detect the user navigation via:

    eventBus.addHandler(PlaceChangeRequestEvent.TYPE, new PlaceChangeRequestEvent.Handler() {

      @Override
      public void onPlaceChangeRequest(PlaceChangeRequestEvent event) {
        Window.alert("new place requested");
       
      }
     
    });

PlaceController doesn't do any magic. It knows the current place and does an equals() check with the provided place you want to go to. If the current place and the new place are equal() nothing will happen. If they are not equal() a PlaceChangeRequestEvent will be fired and (unless the user denies it by choosing cancel in the confirmation dialog that appears if any activity returns a warning in Activity.mayStop()) a PlaceChangeEvent will be fired just after it. So you generally should always see both events. Take a look at the source code of PlaceController... its really easy to understand whats going on.

As your problem is somehow dependent on your place token, have you already checked your PlaceTokenizers if they work correctly? You could also activate GWT logging to see some log statements from PlaceController (http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideLogging.html#Super_Simple_Recipe_for_Adding_Logging)

-- J.


Am Mittwoch, 29. Februar 2012 18:59:30 UTC+1 schrieb Lars:
Thanks for your input.

Regarding History object and the firing of ValueChangeEvents... I've confirmed that the events are not being fired with this:

   
    History.addValueChangeHandler(new ValueChangeHandler<String>() {

      @Override
      public void onValueChange(ValueChangeEvent<String> event) {
        Window.alert("history changed");
      }
     
    });

I am wondering if the use of Places and the MVP framework has something to do with this... The way navigation works in my app is via "clientFactory.getPlaceController().goTo(place);" and if the user stays within the same "Place" (ie same token prefix) no event is fired. However, I am able to detect the user navigation via:

    eventBus.addHandler(PlaceChangeRequestEvent.TYPE, new PlaceChangeRequestEvent.Handler() {

      @Override
      public void onPlaceChangeRequest(PlaceChangeRequestEvent event) {
        Window.alert("new place requested");
       
      }
     
    });

And since what I'm really after is the user navigation not the tokens themselves, this is sufficient for me... Why I'm not getting the ValueChangeEvents from the History object is a mystery to me...

On Monday, February 27, 2012 5:38:31 PM UTC-5, Jens wrote:
I like the idea, but I'm finding that the value change event only fires when prefix portion of the token changes.

Thanks for your reply... By the way, am I right that the value change event only fires this way?

History.addValueChangeHandler() always fires a ValueChangeEvent if the history stack changes. Otherwise it wouldn't be possible to switch between places of the same type but with different internal state (e.g. #DetailsPlace:1 and #DetailsPlace:2).

Honestly I wouldn't skip any history tokens when a user hits the back button. When the user edits 3 documents in a row then he maybe wants to switch between them back and forth for some reason. I found it more natural if I would have to hit 3 times the back button to be back at the INDEX place if I have navigated to three different documents. Thats what you would expect from normal web navigation. 
In addition your app can provide a link like "back to index view" so that the user can directly jump back to the INDEX place if I really wants to.

-- J.

Am Mittwoch, 29. Februar 2012 18:59:30 UTC+1 schrieb Lars:
Thanks for your input.

Regarding History object and the firing of ValueChangeEvents... I've confirmed that the events are not being fired with this:

   
    History.addValueChangeHandler(new ValueChangeHandler<String>() {

      @Override
      public void onValueChange(ValueChangeEvent<String> event) {
        Window.alert("history changed");
      }
     
    });

I am wondering if the use of Places and the MVP framework has something to do with this... The way navigation works in my app is via "clientFactory.getPlaceController().goTo(place);" and if the user stays within the same "Place" (ie same token prefix) no event is fired. However, I am able to detect the user navigation via:

    eventBus.addHandler(PlaceChangeRequestEvent.TYPE, new PlaceChangeRequestEvent.Handler() {

      @Override
      public void onPlaceChangeRequest(PlaceChangeRequestEvent event) {
        Window.alert("new place requested");
       
      }
     
    });

And since what I'm really after is the user navigation not the tokens themselves, this is sufficient for me... Why I'm not getting the ValueChangeEvents from the History object is a mystery to me...

On Monday, February 27, 2012 5:38:31 PM UTC-5, Jens wrote:
I like the idea, but I'm finding that the value change event only fires when prefix portion of the token changes.

Thanks for your reply... By the way, am I right that the value change event only fires this way?

History.addValueChangeHandler() always fires a ValueChangeEvent if the history stack changes. Otherwise it wouldn't be possible to switch between places of the same type but with different internal state (e.g. #DetailsPlace:1 and #DetailsPlace:2).

Honestly I wouldn't skip any history tokens when a user hits the back button. When the user edits 3 documents in a row then he maybe wants to switch between them back and forth for some reason. I found it more natural if I would have to hit 3 times the back button to be back at the INDEX place if I have navigated to three different documents. Thats what you would expect from normal web navigation. 
In addition your app can provide a link like "back to index view" so that the user can directly jump back to the INDEX place if I really wants to.

-- J.

Am Mittwoch, 29. Februar 2012 18:59:30 UTC+1 schrieb Lars:
Thanks for your input.

Regarding History object and the firing of ValueChangeEvents... I've confirmed that the events are not being fired with this:

   
    History.addValueChangeHandler(new ValueChangeHandler<String>() {

      @Override
      public void onValueChange(ValueChangeEvent<String> event) {
        Window.alert("history changed");
      }
     
    });

I am wondering if the use of Places and the MVP framework has something to do with this... The way navigation works in my app is via "clientFactory.getPlaceController().goTo(place);" and if the user stays within the same "Place" (ie same token prefix) no event is fired. However, I am able to detect the user navigation via:

    eventBus.addHandler(PlaceChangeRequestEvent.TYPE, new PlaceChangeRequestEvent.Handler() {

      @Override
      public void onPlaceChangeRequest(PlaceChangeRequestEvent event) {
        Window.alert("new place requested");
       
      }
     
    });

And since what I'm really after is the user navigation not the tokens themselves, this is sufficient for me... Why I'm not getting the ValueChangeEvents from the History object is a mystery to me...

On Monday, February 27, 2012 5:38:31 PM UTC-5, Jens wrote:
I like the idea, but I'm finding that the value change event only fires when prefix portion of the token changes.

Thanks for your reply... By the way, am I right that the value change event only fires this way?

History.addValueChangeHandler() always fires a ValueChangeEvent if the history stack changes. Otherwise it wouldn't be possible to switch between places of the same type but with different internal state (e.g. #DetailsPlace:1 and #DetailsPlace:2).

Honestly I wouldn't skip any history tokens when a user hits the back button. When the user edits 3 documents in a row then he maybe wants to switch between them back and forth for some reason. I found it more natural if I would have to hit 3 times the back button to be back at the INDEX place if I have navigated to three different documents. Thats what you would expect from normal web navigation. 
In addition your app can provide a link like "back to index view" so that the user can directly jump back to the INDEX place if I really wants to.

-- J.

Am Mittwoch, 29. Februar 2012 18:59:30 UTC+1 schrieb Lars:
Thanks for your input.

Regarding History object and the firing of ValueChangeEvents... I've confirmed that the events are not being fired with this:

   
    History.addValueChangeHandler(new ValueChangeHandler<String>() {

      @Override
      public void onValueChange(ValueChangeEvent<String> event) {
        Window.alert("history changed");
      }
     
    });

I am wondering if the use of Places and the MVP framework has something to do with this... The way navigation works in my app is via "clientFactory.getPlaceController().goTo(place);" and if the user stays within the same "Place" (ie same token prefix) no event is fired. However, I am able to detect the user navigation via:

    eventBus.addHandler(PlaceChangeRequestEvent.TYPE, new PlaceChangeRequestEvent.Handler() {

      @Override
      public void onPlaceChangeRequest(PlaceChangeRequestEvent event) {
        Window.alert("new place requested");
       
      }
     
    });

And since what I'm really after is the user navigation not the tokens themselves, this is sufficient for me... Why I'm not getting the ValueChangeEvents from the History object is a mystery to me...

On Monday, February 27, 2012 5:38:31 PM UTC-5, Jens wrote:
I like the idea, but I'm finding that the value change event only fires when prefix portion of the token changes.

Thanks for your reply... By the way, am I right that the value change event only fires this way?

History.addValueChangeHandler() always fires a ValueChangeEvent if the history stack changes. Otherwise it wouldn't be possible to switch between places of the same type but with different internal state (e.g. #DetailsPlace:1 and #DetailsPlace:2).

Honestly I wouldn't skip any history tokens when a user hits the back button. When the user edits 3 documents in a row then he maybe wants to switch between them back and forth for some reason. I found it more natural if I would have to hit 3 times the back button to be back at the INDEX place if I have navigated to three different documents. Thats what you would expect from normal web navigation. 
In addition your app can provide a link like "back to index view" so that the user can directly jump back to the INDEX place if I really wants to.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/BYGyVO8XeWwJ.
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.

String to Object Structure in GWT

Hi All,

I am relatively new to GWT. 
I have input as a string and i want to convert it into object structure. I was wondering how it can be done in GWT.

Example String -  (node1(node2(node3) (node4)) (node5))

"node1" has 2 children "node2" and "node5"
"node2" has 2 children "node3" and "node4"

More like converting a string into binary tree object.

Thanks,
Nikhil

--
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/-/thVuBBnRbvIJ.
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: using GWT to simplify a big stack of data transformation

You can also use RequestFactory ValueProxy

On Wednesday, February 29, 2012 3:42:55 AM UTC-5, Sai wrote:
Hi,

As long as you provide the required source code for the generated POJO's to GWT compiler for generating the JavaScript it will work. 

But, I think when you generate POJO's using XMLBeans, your POJO's will have some dependency on XMLBeans (Data Binding) annotations and GWT compiler forces you to provide the source code of XMLBeans, I don't think it's a good idea use generated POJO's in GWT client code.

we also had very similar requirement, and we went on having separate view beans for GWT client.

I hope this helps you!

Regards,
Saida.

On Tue, Feb 28, 2012 at 2:19 PM, Domenico wrote:
Hi,
I'm trying to simplify the stack of a web application (based on J2EE)
that takes an XML profile from backend convert it in a POJO (with some
XML data binding tool) and then throughout several data
transformations it becomes a view bean and then presented in
JavaScript. The idea is to simplify this stack using XMLBeans to
generate automatically the POJO and using directly this POJO in the
GWT application (without any intermediate transformation). Do you
think is it possible to use this strategy, in particular using a
normal POJO in the GWT application?

Thanks a lot for your help



--
Regards,
Saida Dhanavath

--
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/-/SgM3btbPi6sJ.
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: Selecting list items from history actions using Activities and Places

I thought singleselectionmodel swallowed setting the selected value to itself?

On 29 Feb 2012 16:29, "Shaun Tarves" <shaun@tarves.net> wrote:
Hi all -

First off, thanks for all the great info on this board. I've gotten so much out of it. However, I'm having a problem I haven't seen addressed before. Here's my scenario:

1) I have 2 places, 2 separate activity managers/mappers (one for a "menu" display area and one for "content" display area).

2) In the menu area is a basic CellList, with an attached selection handler that fires an event registered on the app's event bus to go to a new place. It also naturally "selects" the item in the menu.

Selection of items/going to new places works naturally when the user is clicking around. 

My problem:

When any history action is involved (via a direct URL or using back/forward in the browser), how to I handle selecting the appropriate item in the menu?

The obvious choice is a place change handler in the menu, which, in turn, uses the menu's selection handler to select the appropriate item. BUT, since the selection handler fires an event to go to a new place upon selection, it introduces circular logic. (onPlaceChange does setSelected, then onSelection fires an event to change places)

It's disconcerting that none of the sample apps (expenses, mobilewebapp) do any kind of item selection when you navigate DIRECTLY to a place via URL, but this seems like a really basic feature of a web application.

Thoughts?

--
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/-/kLEBTO6gJuIJ.
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 RPC not working behind Apache and Tomcat

Hi again,

a friend of mine solved the problem during the night. I will force him
to write the solution here.

Thanks for your thoughts.

Greetz Markus

On 25 Feb., 18:25, mukarev <muka...@googlemail.com> wrote:
> Hi folks,
>
> I'try to serve two gwt webapps via one apache from one tomcat with JK
> and I'm always running in the same error. Apache sends a 404 and tells
> me that it's not able to find the servlet if I try to communcate via
> RPC.
>
> I have two virtual hosts pointing at the directories within tomcat
> webapps. The webapps are running successfully as long as I don't try
> to communicate via RPC. It seems that Apache isn't able to resolve the
> requested service.
>
> Need help, I'm sitting here around hopeless.
>
> Thanks!
>
> Markus

--
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: Accessint GWT's HIstory Stack

Thanks for your input.

Regarding History object and the firing of ValueChangeEvents... I've confirmed that the events are not being fired with this:

   
    History.addValueChangeHandler(new ValueChangeHandler<String>() {

      @Override
      public void onValueChange(ValueChangeEvent<String> event) {
        Window.alert("history changed");
      }
     
    });

I am wondering if the use of Places and the MVP framework has something to do with this... The way navigation works in my app is via "clientFactory.getPlaceController().goTo(place);" and if the user stays within the same "Place" (ie same token prefix) no event is fired. However, I am able to detect the user navigation via:

    eventBus.addHandler(PlaceChangeRequestEvent.TYPE, new PlaceChangeRequestEvent.Handler() {

      @Override
      public void onPlaceChangeRequest(PlaceChangeRequestEvent event) {
        Window.alert("new place requested");
       
      }
     
    });

And since what I'm really after is the user navigation not the tokens themselves, this is sufficient for me... Why I'm not getting the ValueChangeEvents from the History object is a mystery to me...

On Monday, February 27, 2012 5:38:31 PM UTC-5, Jens wrote:
I like the idea, but I'm finding that the value change event only fires when prefix portion of the token changes.

Thanks for your reply... By the way, am I right that the value change event only fires this way?

History.addValueChangeHandler() always fires a ValueChangeEvent if the history stack changes. Otherwise it wouldn't be possible to switch between places of the same type but with different internal state (e.g. #DetailsPlace:1 and #DetailsPlace:2).

Honestly I wouldn't skip any history tokens when a user hits the back button. When the user edits 3 documents in a row then he maybe wants to switch between them back and forth for some reason. I found it more natural if I would have to hit 3 times the back button to be back at the INDEX place if I have navigated to three different documents. Thats what you would expect from normal web navigation. 
In addition your app can provide a link like "back to index view" so that the user can directly jump back to the INDEX place if I really wants to.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/bjfngPbG2HIJ.
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 load an external JS-file without calling a function in there

Check their API or read their javascript code, there might be a way to pass an id of a div which they would use to append to instead of using document.write.  That's what I found when trying to use Twitter's Widget api, it was documented but I did find it by reading their code and seeing what it does.

On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
Anything relying on document.write() must be in your HTML source when it's being parsed; they can't be loaded dynamically.

On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
Hi,

I'm trying to dynamically add advertisement to our page. Our
advertisement-partner provides us a script which we have to include
like this:
<script type="text/javascript" src="http://www.somesource.com/
output.js?id=123
"></script>

The output.js just contains one line of code like this:
document.write("<div>some html</div>");

I have no idea how I can add this JS to the page and make it
execute ... I tried just adding it as a HTML-Widget, which correctly
adds the code, but it isnt executed. Also the ScriptInjection doesnt
help, because I need the code somewhere in the <body> and not in
<head>.

I'm happy for any help!
Tom

On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
Anything relying on document.write() must be in your HTML source when it's being parsed; they can't be loaded dynamically.

On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
Hi,

I'm trying to dynamically add advertisement to our page. Our
advertisement-partner provides us a script which we have to include
like this:
<script type="text/javascript" src="http://www.somesource.com/
output.js?id=123
"></script>

The output.js just contains one line of code like this:
document.write("<div>some html</div>");

I have no idea how I can add this JS to the page and make it
execute ... I tried just adding it as a HTML-Widget, which correctly
adds the code, but it isnt executed. Also the ScriptInjection doesnt
help, because I need the code somewhere in the <body> and not in
<head>.

I'm happy for any help!
Tom

On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
Anything relying on document.write() must be in your HTML source when it's being parsed; they can't be loaded dynamically.

On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
Hi,

I'm trying to dynamically add advertisement to our page. Our
advertisement-partner provides us a script which we have to include
like this:
<script type="text/javascript" src="http://www.somesource.com/
output.js?id=123
"></script>

The output.js just contains one line of code like this:
document.write("<div>some html</div>");

I have no idea how I can add this JS to the page and make it
execute ... I tried just adding it as a HTML-Widget, which correctly
adds the code, but it isnt executed. Also the ScriptInjection doesnt
help, because I need the code somewhere in the <body> and not in
<head>.

I'm happy for any help!
Tom

--
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/-/XswmWnOLrucJ.
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 application freezes when new version is deployed while using it


> Is there a clean way to *not* require the user to refresh the page?

Everything Thomas said is right, and I'll chime in with my own experience. Basically:

- If you use IsSerializable and no type-name elision you won't have to keep old GWT RPC policy files around between builds (the legacy serialization policy will handle new/old clients as long as your DTOs don't have changes, which for frequent builds is probably more often the case--AFAIK this makes GWT RPC comparable to RF in handling non-breaking-changes to the DTOs)

- As Thomas said, handle IncompatibleRemoteServiceExceptions for when DTOs do have breaking changes

- As Thomas said, handle 404s in runAsync onFailures (or just not use async loading if your app is small enough :-)

- Have a clean switch between new/old servers (e.g. if you have 10 servers, then start 10 new servers, and slowly turn off the old ones, you'll run into problems, which I walked through in a blog post [1]). Ideally you can immediately switch from the old server(s) to the new.

Having seamless deployments is surprisingly hard for GWT apps--although I don't think the problems are unique to GWT vs. regular webapps, its approach to perfect caching highlights the problems of new/old servers/clients trying to talk nicely to each other. I'd be interested in hearing internal/Google best practices for this sort of stuff, although it looks like Thomas has already inferred a lot of it by watching how the Google Groups UI behaves.

- Stephen





On Thursday, January 5, 2012 6:39:37 AM UTC-6, Kyle Baley wrote:
Now that I've determined our problem, I have another question. Is there a clean way to *not* require the user to refresh the page?

On Thursday, January 5, 2012 6:39:37 AM UTC-6, Kyle Baley wrote:
Now that I've determined our problem, I have another question. Is there a clean way to *not* require the user to refresh the page?

On Thursday, January 5, 2012 6:39:37 AM UTC-6, Kyle Baley wrote:
Now that I've determined our problem, I have another question. Is there a clean way to *not* require the user to refresh the page?

On Thursday, January 5, 2012 6:39:37 AM UTC-6, Kyle Baley wrote:
Now that I've determined our problem, I have another question. Is there a clean way to *not* require the user to refresh the page?

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

GWT

Hi to all,
I'm very new on GWT.

I have to rebuild an old web app that use GWT (maybe 1.x) beacuse it
can be accessed by last browsers.

I need some advice!
What is the best practice to do this?
What can I do to achive my gol?

Thanks very muych.

--
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: Additional plugins are required to display all the media on this page - Firefox 10.0.2


On Wednesday, February 29, 2012 1:54:37 PM UTC+1, Jee wrote:

Plug in missing message -
Additional plugins are required to display all the media on this page - Firefox 10.0.2 version and Google Chrome 15.0.874.121
this plug in message is mainly looking for "windows media player plugin"

So that's nothing to do with GWT.
 
But this plug in install message not displayed in IE browser
 
Because that plugin is necessarily installed in IE (just like QuickTime is "installed" in every Safari on a Mac), otherwise IE cannot play any kind of audio or video (unless going through Flash): that'd be a pretty bad out-of-the-box user experience, isn't it?

--
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/-/Fp9E0Dmm2ecJ.
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: Additional plugins are required to display all the media on this page - Firefox 10.0.2

I'm sorry. I can't help you. Maybe someone else can.

On Wed, Feb 29, 2012 at 05:54, Jee <sundarraj82@gmail.com> wrote:
>
> Plug in missing message -
> Additional plugins are required to display all the media on this page -
> Firefox 10.0.2 version and Google Chrome 15.0.874.121
> this plug in message is mainly looking for "windows media player plugin"
> But this plug in install message not displayed in IE browser
>
>
> On Tuesday, February 28, 2012 9:42:26 PM UTC+5:30, Tony Edgin wrote:
>>
>> Maybe I misunderstood you earlier.  What plugin do Firefox and Chrome
>> say is missing?
>>
>> On Mon, Feb 27, 2012 at 04:19, Jee <sundarraj82@gmail.com> wrote:
>> > Thanks Edgin.
>> >
>> > When I attempt to load my gwt application in firefox 10.0.2. I got
>> > plugin
>> > missing (Additional plugins are required to display all the media on
>> > this
>> > page) error message in top of the page, the same message shown for
>> > chrome
>> > browser also but not happened for IE browser.
>> > How could we solve that an issue using gwt coding level?
>> >
>> >
>> >
>> > On Friday, February 24, 2012 9:46:04 PM UTC+5:30, Tony Edgin wrote:
>> >>
>> >> The plugin is only for development mode.  The deployed app does not
>> >> use it, so your users won't ever be asked to install it.
>> >>
>> >> Cheers.
>> >> Tony
>> >>
>> >> On Fri, Feb 24, 2012 at 03:40, Jee <sundarraj82@gmail.com> wrote:
>> >> > Thanks Broyer.
>> >> >
>> >> > Do we have any possible way to deal this an issue with gwt program
>> >> > level.
>> >> > Because we don't want user press button(Install missing button) for
>> >> > every
>> >> > firefox browser.
>> >> > Strictly we planning to avoid this kind of issue with browser. Is
>> >> > there
>> >> > any
>> >> > possibility better approach to avoid plugin issues before loading gwt
>> >> > application.
>> >> >
>> >> > Thanks
>> >> > -Jee
>> >> >
>> >> > --
>> >> > 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/-/hYECccy8NwkJ.
>> >> >
>> >> > 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.
>> >>
>> >> --
>> >> Tony Edgin
>> >> Software Architecture and Design Leader
>> >> LBT Observatory
>> >> 933 N. Cherry Ave., Tucson AZ 85721-0065
>> >> p:520-626-8951, c:520-419-8821, f:520-626-9333
>> >
>> >
>> > On Friday, February 24, 2012 9:46:04 PM UTC+5:30, Tony Edgin wrote:
>> >>
>> >> The plugin is only for development mode.  The deployed app does not
>> >> use it, so your users won't ever be asked to install it.
>> >>
>> >> Cheers.
>> >> Tony
>> >>
>> >> On Fri, Feb 24, 2012 at 03:40, Jee <sundarraj82@gmail.com> wrote:
>> >> > Thanks Broyer.
>> >> >
>> >> > Do we have any possible way to deal this an issue with gwt program
>> >> > level.
>> >> > Because we don't want user press button(Install missing button) for
>> >> > every
>> >> > firefox browser.
>> >> > Strictly we planning to avoid this kind of issue with browser. Is
>> >> > there
>> >> > any
>> >> > possibility better approach to avoid plugin issues before loading gwt
>> >> > application.
>> >> >
>> >> > Thanks
>> >> > -Jee
>> >> >
>> >> > --
>> >> > 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/-/hYECccy8NwkJ.
>> >> >
>> >> > 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.
>> >>
>> >> --
>> >> Tony Edgin
>> >> Software Architecture and Design Leader
>> >> LBT Observatory
>> >> 933 N. Cherry Ave., Tucson AZ 85721-0065
>> >> p:520-626-8951, c:520-419-8821, f:520-626-9333
>> >
>> > --
>> > 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/-/J2UssvTCkBMJ.
>> >
>> > 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.
>>
>> --
>> Tony Edgin
>> Software Architecture and Design Leader
>> LBT Observatory
>> 933 N. Cherry Ave., Tucson AZ 85721-0065
>> p:520-626-8951, c:520-419-8821, f:520-626-9333
>
> --
> 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/-/5fzZWbZRpukJ.
>
> 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.

--
Tony Edgin
Software Architecture and Design Leader
LBT Observatory
933 N. Cherry Ave., Tucson AZ 85721-0065
p:520-626-8951, c:520-419-8821, f:520-626-9333

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

right to left tree items

Hi,

I am trying to create right to left tree.
I changed the theme to the RTL theme:
<inherits name='com.google.gwt.user.theme.standard.StandardRTL'/>

and the tree seems right to left (the + is in the right side) , but
when I add sub items to the tree (TreeItem, Buttons,Labels) they are
all aligned to left.

I tried to add "direction:rtl " proprty to the css and its not
working.

any idea how to solve it?

Thanks.


this is the piece of code:

TreeItem productTreeItem[]=new TreeItem[6];
Tree productTree=new Tree();

for (int i=0; i<6; i++ )
{

Button button[]= new Button[3];
button[0]=new Button( "אאאא");
button[1]=new Button( "בבב");
button[2]=new Button( "גגגג");

button[0].addStyleName("rtl");
button[1].addStyleName("rtl");
button[2].addStyleName("rtl");
productTreeItem[i]=new TreeItem("עברית "+i);
productTreeItem[i].getElement().addClassName("rtl");

productTreeItem[i].addItem(button[1]);
productTreeItem[i].addItem(button[2]);*/
productTreeItem[i].addItem("אאא");
productTreeItem[i].addItem("בבבבב");
productTreeItem[i].addItem("גגגגגגגגג");

productTree.addItem(productTreeItem[i]);
}

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