Re: embedded flash not displaying is IE7 on secured url but works fine when viewed with unsecured url

2009-03-12 Thread Tony Strauss

This just is a wild shot in the dark (I have very limited experience
with Flash) but could it be a problem with the cache control headers
in the response returned by the server?  I've had a number of issues
with IE (even IE7) + HTTPS that have resulted from this.

See:
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/ImageBundle.html
for a discussion of this issue for the GWT ImageBundle.

See this:
http://drupal.org/node/163298
for a discussion of the issue in a different context.

Also this for downloading MSOffice files:
http://support.microsoft.com/kb/316431

Basically, IE cannot download files successfully over HTTPS if caching
is completely suppressed.  Any of:
Pragma: No-cache
Cache-Control: no-cache
in the response header will cause IE problems over HTTPS.

Tony

On Mar 11, 1:07 pm, loveleen@gmail.com loveleen@gmail.com
wrote:
 Hi,
     Im using an embedded flash on a popup, the flash works fine if
 viewed on firefox or with unsecured url but doesnt show when viewed
 with secured url. Is it a general problem with IE?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Is it a small bug in samle StockWatcher?

2009-03-12 Thread 秦锋

I'm newbie to GWT and read the tutorial of StockWatcher now, here is
my question:
In 
http://code.google.com/intl/zh-CN/webtoolkit/tutorials/1.5/codeclient.html#addStock,
3. Add a button to remove stocks from the stock list, following is
the code:

int removedIndex = stocks.indexOf(symbol);

My question:
where is the symbol from?
It's in a listener's method, but defined in addStock function?

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



Re: How to debug IE6 crash

2009-03-12 Thread alex.d

This kind of stuff with IE6 sucks. I had a problem like yours once and
i ended up with commenting my code out part by part and putting a lot
of Window.alert() in it :(

On 11 Mrz., 19:52, Austen awconsta...@gmail.com wrote:
 Hi,

 I have a problem with IE6 crashing when using my app.
 The app works fine in IE7/FF3/Chrome etc.

 I'm attempting to use MS script debugger with no luck. The error isn't
 caught by script debugger (or maybe it is, but it crashes before I can
 view it) and when I try and step line by line IE6 still crashes before
 I get to see anything interesting.

 The problem is, how do I find the problem?!

 Anyone got an idea on how to proceed?

 Thanks in advance

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



Re: Setting DataSource (JNDI) in GWT 1.6 (hosted mode - Jetty)

2009-03-12 Thread Nicolas Wetzel
Hi
these are some things you have to do for setting a datasource:

1: put two additionnals jars in your classpath: jetty-naming-6.1.11.jar and
jetty-plus-6.1.11.jar to add some J2EE features on Jetty

2: change the startup JettyLauncher to your own custom JettyLauncher (works
with -server option ) : put this line in the tab Arguments eclipse setting
run program option:
-server com.myproject.MyCustomJettyLauncher

3 create your own MyCustomJettyLauncher : copy and past the JettyLauncher
to add some Configuration

private static String[] __dftConfigurationClasses =
{
org.mortbay.jetty.webapp.WebInfConfiguration, //
org.mortbay.jetty.plus.webapp.EnvConfiguration,//jetty-env
org.mortbay.jetty.plus.webapp.Configuration, //web.xml
org.mortbay.jetty.webapp.JettyWebXmlConfiguration,//jettyWeb
} ;

and at the end of the start() method  call
wac.setConfigurationClasses(__dftConfigurationClasses);

 WebAppContext wac = new WebAppContextWithReload(
appRootDir.getAbsolutePath(), /);
wac.setConfigurationClasses(__dftConfigurationClasses);
server.setHandler(wac);
server.start();
server.setStopAtShutdown(true);

4) edit a jetty-env.xml on the web-inf to specify a dataSource

?xml version=1.0  encoding=ISO-8859-1?
!DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN 
http://jetty.mortbay.org/configure.dtd;
Configure class=org.mortbay.jetty.webapp.WebAppContext
New id=DSTest class=org.mortbay.jetty.plus.naming.Resource
Argjdbc/projectDS/Arg
Arg
New
class=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Set name=Urljdbc:mysql://localhost:3306/database
/Set
Set name=UsermyUserName/Set
Set name=PasswordmyPassword/Set
/New
/Arg
/New
/Configure

5) make a reference on it in your web-inf/web.xml

resource-ref
descriptionDataSource's project/description
res-ref-namejdbc/projectDS/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

it works for me

regards,

Nicolas Wetzel

On Thu, Mar 12, 2009 at 5:16 AM, wiltonj wilt...@gmail.com wrote:


 Hi,
 How to setting DataSource in GWT 1.6 (Hosted mode - Jetty)?

 Hoping for some guidance.

 Thanks  Regards,
 Wilton

 


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



Re: Changes to Overlay Types

2009-03-12 Thread Rajesh Akkineni

I just found that this is not problem with GWT. I am using SmartGWT.
Problem is one of its classes.

Thank you
Rajesh

On Mar 12, 8:06 am, Rajesh Akkineni akkineniraj...@gmail.com wrote:
 I have a problem with accessing the changes done in a native method of
 Overlay Type.

 class A extends JavaScriptObject{

 public native void toB(String b)/*-{
       this.b=b;}-*/;

 public native String getB()/*-{
      return this.b;

 }-*/;
 }

 This this example 'toB' method and 'getB' are called from two
 different places on same A object. But the values set in toB are not
 available in getB. How is it possible? Other properties which are
 present A before these methods are called are still available in both
 places. But any new properties are not available.

 Only explanation is that when javascript returns an Overlay type to
 Java it wraps in a new object that is derived form old object. Am I
 Correct? Is there any way to overcome this limitation. (I have not
 tested in web mode)

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



Re: Synchornous GWT, how can i do that

2009-03-12 Thread alex

Why do you need sync`ed method calls?
I think that you actually need a way to find out when a RPC call has
returned (either one of onSuccess / onFailed).

One way to go with this is to have a simple event system where events
are thrown when changes are made - these changes can be UI
modifications, RPC calls that arrived at client code, etc.

Class Event { String eventName, . }
Interface EventHandler { public void handleEvent (Event
event); .. }
Class EventDispatcher { here I have declared static members /
functions to register and dispatch incoming events }

Now all classes that need events would implement EventHandler.
Registering is done via constructor (or some other means).

We have implemented this system in a relatively large application and
it works like charm :)
Personally I have also used this paradigm for 2 personal projects, one
of them had no server-side and all reads were done with RequestBuilder
- everything went great

Of course, you can extend the system - what I am planning to do for
the library we are working on right now - to freeze the client code
until all conditions are satisfied.

Hope this helps,
Alex.

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



Re: Gilead 1.2.2

2009-03-12 Thread noon

Hi,

First, thanks for the feedback : it is always nice to read that Gilead
is used and helps :)

About your issue, your analysis is right.
Possible workarounds would be :
- add @ServerOnly annotation on your statusName getter and setter
(Gilead will prevent it to be cloned and merged by beanlib)
- just add a null check condition in your statusName getter and
setter

Regards
Bruno

On 12 mar, 00:06, Itamar Ravid itamar.ira...@gmail.com wrote:
 Hi Bruno - first off, thanks for all of your hard work. Your project is a
 real life-saver, and we're using it extensively in our project.

 I'd like to report a bug. I have not tested yet with gilead 1.2.2, but I'd
 like to report it anyway.

 Assume two classes:

 public class Status {
     Long id;
     String name;

     public Long getId() { ... }
     public Long setId(Long id) { ... }
     public String getName() { ... }
     public Long setName(String name) { ... }

 }

 public class Ticket {
     Status status;

     public Status getStatus() { ... }
     public Status setStatus(Status status) { ... }

     public String getStatusName() { return getStatus().getName(); }
     public String setStatusName(String name) { getStatus().setName(name); }

 }

 I've omitted the getters and setters for brevity, as I assume their contents
 is well known. The problem occurs when serializing a Ticket instance. I
 suspect that the problem lies in beanlib, though I wanted to consult you
 first.

 While serializing a Ticket, I receive a NullPointerException, while beanlib
 tries to access the delegate method getStatusName in Ticket. I've come to
 suspect, through debugging, that this happens since beanlib tries to copy
 the statusName property (which does not exist) -before- copying the status
 property. It'd be great if you could confirm my assumptions. For now, we've
 prefixed all delegate methods with an underscore, to prevent beanlib from
 recognizing them as property getters/setters.

 Any thoughts?

 On Wed, Mar 11, 2009 at 11:30 PM, noon bruno.marches...@gmail.com wrote:

  Gilead library permits you to send Persistent entities (and especially
  the partially loaded ones) to the GWT  client side without pain.

  This release is a maintenance one, fixing half a dozen bugs, and
  providing many improvements (see release notes for details).

  A particular work was made on improving clone performances.

  Also note that hibernate-jpa-util have been now merged with hibernate-
  util JAR, and some integration classes for JBoss and Spring are now
  provided.

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



Loading Images into GWT via MySQL

2009-03-12 Thread fatjack1...@googlemail.com

Hi,

I am new to loading images into GWT from MySQL and am abit lost on the
best way to do it.

I already have my image in the database. How do I retrieve it? I read
somewhere that it can just be stored as a String. Is this correct? So
my code on the server side would look like:

//Open database connection
dc.openConnection();
resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
itemcategory_table WHERE ItemType = 'Test');

   while(resultSet.next()) {
String test = resultSet.getString(1);
}

dc.closeConnection();

Or have I got this completely wrong?

Next, I need to send this over to the client. What is the best way to
send an image over from the server to the client and how should it be
stored?

Any help on how to use images would be much appreciated!

Regards,
Jack


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



[gwt-incubator] problem working with glassPanel

2009-03-12 Thread Txang

Hello, Im building a big application that uses a lot of DialogBoxes,
so I decided to made a new class who extends DialogBox, showing both
DialogBox and glassPanel:

public class FadedDialogBox extends DialogBox {

private GlassPanel _gpFade;

public FadedDialogBox() {
super();
}

public FadedDialogBox(boolean autoHide, boolean modal) {
super(autoHide, modal);
}

public FadedDialogBox(boolean autoHide) {
super(autoHide);
}

@Override
public void center() {
_gpFade = new GlassPanel(false);
RootPanel.get().add(_gpFade, 0, 0);
super.center();
}

@Override
public void show() {
_gpFade = new GlassPanel(false);
RootPanel.get().add(_gpFade, 0, 0);
super.show();
}

@Override
public void hide() {
super.hide();
_gpFade.removeFromParent();
}

@Override
public void hide(boolean autoClosed) {
super.hide(autoClosed);
_gpFade.removeFromParent();
}

public String getFadeStyleName() {
return _gpFade.getStyleName();
}

public void setFadeStyleName(String style) {
_gpFade.setStyleName(style);
}
}

My EntryPoint testing class:

public class Menu implements EntryPoint {
public void onModuleLoad() {
Alert a = new Alert(probando, mucho);
a.show();
Alert b = new Alert(probando, mucho mas de lo que te crees);
b.show();
}
}

When I show just one FadedDialogBox everything works fine, the
problem appears when I show two or more, then, the glassPanel shows
over both DialogBoxes. I tried to fix it changing show() method:

RootPanel.get().add(_gpFade, 0, 0);

to

RootPanel.get().add(_gpFade);

But in this case everything looks worse, the second FadedDialogBox
turns background to black.

Any ideas or suggestions? I'm quite lost.

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



Re: Custom widget theme?

2009-03-12 Thread Sean

Sure, have a listener attached to a drop down box or menu or a button,
some way for the user to select the theme. And on select
use .removeStyleName(style) to remove the old style and .addStyleName
(style) to add the new style name. If this is the only style you have
applied to the Widget you could just use .setStyleName(style) to
remove the old ones and use this new style.

On Mar 11, 11:44 pm, Riyaz Mansoor riyaz.mans...@gmail.com wrote:
 Have widget that I have stylized using CSS. But I have no idea how to
 theme this widget. I want some CSS differences to be seen by the user,
 when different themes are selected.

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



Re: problem working with glassPanel

2009-03-12 Thread Txang

Forget it, i found the problem.

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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to debug IE6 crash

2009-03-12 Thread Austen

Thanks Adam. I suspected that may be the only way.

After some persistence using the comment-out-and-run method I've got
the bottom of the issue.

I was updating results in my app by replacing the FlexTable with a new
FlexTable on every update. Which I guess defeats the whole point of a
FlexTable!
I've now reworked things so that I create one FlexTable on loading the
app and each update only alters the relevant rows in the table.
IE6 is now crash free again.


On Mar 12, 7:46 am, alex.d alex.dukhov...@googlemail.com wrote:
 This kind of stuff with IE6 sucks. I had a problem like yours once and
 i ended up with commenting my code out part by part and putting a lot
 of Window.alert() in it :(

 On 11 Mrz., 19:52, Austen awconsta...@gmail.com wrote:

  Hi,

  I have a problem with IE6 crashing when using my app.
  The app works fine in IE7/FF3/Chrome etc.

  I'm attempting to use MS script debugger with no luck. The error isn't
  caught by script debugger (or maybe it is, but it crashes before I can
  view it) and when I try and step line by line IE6 still crashes before
  I get to see anything interesting.

  The problem is, how do I find the problem?!

  Anyone got an idea on how to proceed?

  Thanks in advance

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



How do I configure GWT 1.6 laucher to reference others eclipse project?

2009-03-12 Thread eduardoj

I have two (or more) projects in my Eclipse workspace.
One project is an User Interface (GWT).
The other project is the Business Project and is used by servlet of
the first project (GWT).

To develop with Eclipse, my GWT project references another project.
This works great, but... When runing the laucher (run/debug mode) the
jetty don't find the classes of the other project!!!
He displays a message at console, like Class not found .

How i configure my launcher (workspace) to jetty see the Business
Project classes?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to debug IE6 crash

2009-03-12 Thread Rockster

I have the same problem now with IE6 (and seems to be also in IE7).

Somehow, when you close the IE window, an error message pops up
with the message that an error occured in the script of this page.

Do I want to continue ? 

If you click yes, and go to that URL in a new window (since the
previous window
had to be closed in order to get the error message) the program
continues to perform as expected.

IE6 is the worst browser! (Maybe IE7 is even worse)

Firefox, opera, Chrome, Safari all perform as expected.





On Mar 12, 1:30 pm, Austen awconsta...@gmail.com wrote:
 Thanks Adam. I suspected that may be the only way.

 After some persistence using the comment-out-and-run method I've got
 the bottom of the issue.

 I was updating results in my app by replacing the FlexTable with a new
 FlexTable on every update. Which I guess defeats the whole point of a
 FlexTable!
 I've now reworked things so that I create one FlexTable on loading the
 app and each update only alters the relevant rows in the table.
 IE6 is now crash free again.

 On Mar 12, 7:46 am, alex.d alex.dukhov...@googlemail.com wrote:



  This kind of stuff with IE6 sucks. I had a problem like yours once and
  i ended up with commenting my code out part by part and putting a lot
  of Window.alert() in it :(

  On 11 Mrz., 19:52, Austen awconsta...@gmail.com wrote:

   Hi,

   I have a problem with IE6 crashing when using my app.
   The app works fine in IE7/FF3/Chrome etc.

   I'm attempting to use MS script debugger with no luck. The error isn't
   caught by script debugger (or maybe it is, but it crashes before I can
   view it) and when I try and step line by line IE6 still crashes before
   I get to see anything interesting.

   The problem is, how do I find the problem?!

   Anyone got an idea on how to proceed?

   Thanks in advance

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



Re: Guide to GWT theme CSS

2009-03-12 Thread Arthur Kalmenson

Another easy way to get the style names is to use Firebug or the
Chrome/Safari 4 inspector.

--
Arthur Kalmenson



On Wed, Mar 11, 2009 at 6:16 PM, james james.a.clel...@gmail.com wrote:

 Hi,

 I've been working on a custom theme, starting with a copy of one of
 the GWT defaults. Is there a guide to the CSS anywhere, or are you
 expected to just muddle around with it when you want to change colors,
 etc. For instance, most dialog borders appear to be comprised of
 images, but I can't figure out the top border. I've been weeding
 through the CSS and just haven't found the correct style specification
 or something, but it's becoming time consuming. Plus, it appears you
 can't view source on the file as the elements are JS-generated, so I
 can't see what style is applied to the elements anyway, hence the CSS
 hunting.

 Thanks
 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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: use getDeclaredMethods() ??

2009-03-12 Thread Ian Bambury
Reflection will most probably never be available due to the way GWT
optimises your code.
You're going to have to live without it, or use something other than GWT.

Ian

http://examples.roughian.com


2009/3/12 Serge bse...@bk.ru


 Will reflection appear in gwt 1.6?
 


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



vertical panel with wrap?

2009-03-12 Thread audiosport


Hi,

is there some component that would align its child elements vertically
- like the vertical panel - but would also allow wraping items to next
column? the number of items in a column should be of course possible
to specify as some parameter.

tnx!
Kaur




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



Re: Guide to GWT theme CSS

2009-03-12 Thread james

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



Re: Synchornous GWT, how can i do that

2009-03-12 Thread Magius

I've had the same problem some months ago.
I was developping a big application for a telco enterprise and most of
the application forms requiered loading several fields at the same
time during initialization.
For example, the create a route between servers form requieres to
load several drop-down lists: equipments, cards, business units,
market, ...

I don't want the user can work with the window until all the lists and
controls are loaded.
And I don't want to merge all services (getEquipments, getCards, ...)
in only one big service specific for this form.
It's easier to reuse code having atomic services.

I create a synchronizer class. During initialization I called
individual services (all calls are procesed in paralel and the total
time is slowest service time, not the sum).
I stored each asyncallback in the synchonizer, and finally create a
modal loading window. This modal window blocks the user but the
browser and the javascript engine aren't freezed.
When all the asyncalls are asnswered (succesfully or not), the
synchonizer close the modal loading window and the user can work the
full loaded form.

Hope it helps,

On Mar 12, 11:39 am, alex alex.dobjans...@gmail.com wrote:
 Why do you need sync`ed method calls?
 I think that you actually need a way to find out when a RPC call has
 returned (either one of onSuccess / onFailed).

 One way to go with this is to have a simple event system where events
 are thrown when changes are made - these changes can be UI
 modifications, RPC calls that arrived at client code, etc.

 Class Event { String eventName, . }
 Interface EventHandler { public void handleEvent (Event
 event); .. }
 Class EventDispatcher { here I have declared static members /
 functions to register and dispatch incoming events }

 Now all classes that need events would implement EventHandler.
 Registering is done via constructor (or some other means).

 We have implemented this system in a relatively large application and
 it works like charm :)
 Personally I have also used this paradigm for 2 personal projects, one
 of them had no server-side and all reads were done with RequestBuilder
 - everything went great

 Of course, you can extend the system - what I am planning to do for
 the library we are working on right now - to freeze the client code
 until all conditions are satisfied.

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



JavaScriptException in hosted mode (Win XP - IE6)

2009-03-12 Thread Miles T.

Hi all,

I have an issue which randomly happens in hosted mode in Windows XP
(IE6) when calling getElementsByTagName(td) on an Element.

[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (TypeError): Cet objet
ne gère pas cette propriété ou cette méthode
 number: -2146827850
 description: Cet objet ne gère pas cette propriété ou cette méthode
at com.google.gwt.dom.client.Element$.getElementsByTagName$(Native
Method)

I've already encountered such unsolvable exception but I had found a
workaround (refactoring a lot of code...). Did anyone already
encounter such issue ?

Cheers,

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



RPC error - garbled text as the response.

2009-03-12 Thread cij100

Hi,

I have a gwt based application,that uses RPC calls to communicate with
the server. Normally this works fine, however occasionally the
response fails and I'm unsure what is causing it. Using firebug, I can
see the response is garbled text instead of the OK message. An example
of the response is below:

f8
 � PKk�0 �/9�`�G ��0rXYz ] Q�f�~N�8
V���IH� �77��� k�  ~�� I4�*3�� �,��A1�e_��-� ��*�vچ�xi�th�r +�'8F �C
$�+��q��to ]�OP U��ڠ�2ş,
�xJ� �'��F�˛7q�O��6�̵�J �h/�㍕�
ռ��j��y Vb���O�^g��� ��� +  -5��� ��
0

The server logs seem to show the server impl processing was completed
sucessfully, but the localhost log shows the following stack trace:

12-Mar-2009 08:52:13 org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendError
(ResponseFacade.java:404)
at org.apache.catalina.servlets.DefaultServlet.serveResource
(DefaultServlet.java:698)
at org.apache.catalina.servlets.DefaultServlet.doGet
(DefaultServlet.java:354)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11AprProcessor.process
(Http11AprProcessor.java:833)
at org.apache.coyote.http11.Http11AprProtocol
$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:
1285)
at java.lang.Thread.run(Thread.java:619)


At present I am still using gwt1.4, the inention is to upgrade to 1.5
shortly, and it's running against a tomcat 6 server.

Is there anything obvious that I need to do to avoid these sorts of
error, or methods to debug what has gone wrong between me completing
the impl code processing and recieving the response on the client?

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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



How to clear cache when there is change in code

2009-03-12 Thread Yogesh


Hi,

I am using GWT for my project. But even if there is change in
Code. I am not able to see any change. Or if server update GUI then
also i am unable to see change. Please tell me how to solve this cache
problem.

If JS can solve this?

thanx,
Yogesh.

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



GWT project with multiple pages

2009-03-12 Thread zep

Hello!

My question is perhaps not so relevant for Ajax applications, but for
various reasons (including CMS), I would like to have a GWT
application with multiple pages. What is the best way to do this? I
have thought to have a GWT module for each page, but wonder if it is
practical? Grateful for your answers!

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



Show PDF with POST request

2009-03-12 Thread nikolcha

I have this:

1. [client] Call server from client via GWT-RPC
2. [server] Create map of the data and store them under the key
3. [server] Return key to the client
4. [client] Set Servlet URL with the key as query parameter in the
com.google.gwt.user.client.ui.Frame instance
5. [server] In the Servlet, lookup for the data with exact key
6. [server] Generate PDF from data and return response (OutputStream)

Is this possible in one way???

Explanation:
I have large amounts of data on the client which must be send to the
server, transform them (eg. XSL-FO), generate PDF,
and return to the client (show PDF in widget, not in new window or
something like that).

This data can't be send via GET method, so is there any solution?

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



Re: Can't download GWT even older versions

2009-03-12 Thread Bill

Hello,

I've had the same problem trying to download gwt-windows-1.5.3.zip the
past two days (3/11 and 3/12 PDT).  Using Firefox 3.0.7, the download
will begin and download anywhere from 5-15 MB before terminating.
Firefox does not report any error, the download appears to have
terminated normally.  I've tried this on two separate wireless
networks with the same result.  Any idea what the problem might be?

Thanks,

Bill

On Mar 11, 9:55 am, Sumal Wijewardhana suma...@gmail.com wrote:
 Hi Sumit,

 Downloading is starting and going till 5MB, after that its get stop. This
 was happened several times. Any idea of this issue? But normally I download
 software, movie even more than 1GB files.

 Regards,
 Sumal

 On Tue, Mar 10, 2009 at 11:34 PM, Sumit Chandel 
 sumitchan...@google.comwrote:

  Hi Sumal,
  What errors are you receiving when trying to download a GWT distribution?
  As far as I know, there shouldn't be anything stopping you from downloading
  a distro on our end.

  Regards,
  -Sumit Chandel

  On Mon, Mar 9, 2009 at 11:58 PM, suma...@gmail.com suma...@gmail.comwrote:

  HI,

  I'm Sumal from Sri Lanka... I tried many times to download GWT even
  older versions to download but can't. I'm using a DSL connection and
  PIV PC. Regularary I'm downloading SW, Movies but get error messages
  when downloading this. Please be kind enough to send the downloaded
  GWT to my email address in below.

  great...@hotmail.com
  copy to   suma...@gmail.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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Announcing GWT 1.6 Milestone 2

2009-03-12 Thread PS

Hi All
   I have an issue, I want to drag and drop the panel, It can be
horizontal or vertical or any other panel so that i can change it
property(like change its size), but it is not supporting for the
panels it is supporting for simple widgets like label,button,text box
and able to change it property also.



I try to do but facing issue.
Example:
AbsolutePanel ab=new AbsolutePanel();
Label LHP = new Label(HorizontalPanel);
LHP.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
  HorizontalPanel newHP = new HorizontalPanel();
 newHP.setSize(50, 50);  // on click panel size must be
fixed,user can change it size
 newHP.setBorderWidth(2);// broder
 ab.add(newHP);  // adding panel to absolutePanel
dragController.makeDraggable(newHP);

// This listner is called when a panel is clicked
 newHP.addMouseDownHandler(new MouseDownHandler(){
public void onMouseDown(MouseDownEvent event) {
// TODO Auto-generated method stub
Label proplab=new Label(Property Pallet);
}

});

Here addMouseDownHandler it is not supporting please any one can help
me in this regard.

regards
Lokesh

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



Re: Show PDF with POST request

2009-03-12 Thread Thomas Broyer


On 12 mar, 11:01, nikolcha risticnik...@gmail.com wrote:
 I have this:

 1. [client] Call server from client via GWT-RPC
 2. [server] Create map of the data and store them under the key
 3. [server] Return key to the client
 4. [client] Set Servlet URL with the key as query parameter in the
 com.google.gwt.user.client.ui.Frame instance
 5. [server] In the Servlet, lookup for the data with exact key
 6. [server] Generate PDF from data and return response (OutputStream)

 Is this possible in one way???

 Explanation:
 I have large amounts of data on the client which must be send to the
 server, transform them (eg. XSL-FO), generate PDF,
 and return to the client (show PDF in widget, not in new window or
 something like that).

 This data can't be send via GET method, so is there any solution?

Do you POST request using a FormPanel targetting your Frame (hint: use
a NamedFrame). But you won't be able to detect errors, the servlet
will have to send some error message back, that will be seen by the
user in the end (in the frame, in place of the expected PDF)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Module Dependency Issue

2009-03-12 Thread Isaac Truett

Pavel,

No, you can't exclude part of an inherited module. What you can do is
refactor your modules so that you aren't inheriting bits you don't
want:

1. Create a module for the bits of Module_A that don't require the
maps API. Let's call it Module_A_WM (Without Maps).
2. Have Module_B inherit Module_A_WM.
3. Have Module_A inherit Module_A_WM and the maps API.

Obviously you'll want a more meaningful name for the new Module_A_WM.

- Isaac


On Thu, Mar 12, 2009 at 11:57 AM, Pavel Byles pavelby...@gmail.com wrote:
 I have a module (Module_A) that inherits and requires the
 gwt_google_maps_api and another (Module_B) that inherits from Module_A.
 But Module_B doesn't need to use the gwt_google_maps_api.
 Everything compiles and deploys just fine, but when running the web
 application (Module_B) there is a javascript error that says that the maps
 api key is missing: uncaught exception: java.lang.RuntimeException: The
 Maps API has not been loaded. Is a script tag missing from your host HTML
 or module file? Is the Maps key missing or invalid?
 Is there a way to exclude some inherited modules?
 Module_A.gwt.xml:
 module
     !-- Inherit the core Web Toolkit stuff.  --
     inherits name=com.google.gwt.user.User/
   inherits name=com.google.gwt.xml.XML/
   inherits name=com.google.gwt.http.HTTP/
   inherits name=com.google.gwt.json.JSON/
   inherits name=com.google.gwt.i18n.I18N/

     !-- Inherit Custom Widgets --
     inherits name=com.google.gwt.maps.GoogleMaps/

     !-- Spanish default --
   extend-property name=locale values=es/

     !-- Specify the app entry point class.   --
     entry-point class='com.pavco.client.Index'/

  inherits name=com.google.gwt.user.theme.standard.Standard/

     set-property name=user.agent value=gecko/
 /module


 Module_B.gwt.xml:
 module
     !-- Inherit the core Web Toolkit stuff.  --
     inherits name='com.google.gwt.user.User'/
   inherits name=com.google.gwt.xml.XML/
   inherits name=com.google.gwt.http.HTTP/
   inherits name=com.google.gwt.json.JSON/
   inherits name=com.google.gwt.i18n.I18N/

     inherits name=com.pavco.Index/

     !-- Specify the app entry point class.   --
     entry-point class='com.pavco.mobile.client.M_Index'/

     stylesheet src='css/m_index.css' /

       inherits name=com.google.gwt.user.theme.standard.Standard/
       !-- inherits name=com.google.gwt.user.theme.chrome.Chrome/ --
       !-- inherits name=com.google.gwt.user.theme.dark.Dark/ --
 /module

 --
 -Pav

 


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



Re: Module Dependency Issue

2009-03-12 Thread Pavel Byles
I was hoping I wouldn't have to do this
Thanks Isaac.

On Thu, Mar 12, 2009 at 11:32 AM, Isaac Truett itru...@gmail.com wrote:


 Pavel,

 No, you can't exclude part of an inherited module. What you can do is
 refactor your modules so that you aren't inheriting bits you don't
 want:

 1. Create a module for the bits of Module_A that don't require the
 maps API. Let's call it Module_A_WM (Without Maps).
 2. Have Module_B inherit Module_A_WM.
 3. Have Module_A inherit Module_A_WM and the maps API.

 Obviously you'll want a more meaningful name for the new Module_A_WM.

 - Isaac


 On Thu, Mar 12, 2009 at 11:57 AM, Pavel Byles pavelby...@gmail.com
 wrote:
  I have a module (Module_A) that inherits and requires the
  gwt_google_maps_api and another (Module_B) that inherits from Module_A.
  But Module_B doesn't need to use the gwt_google_maps_api.
  Everything compiles and deploys just fine, but when running the web
  application (Module_B) there is a javascript error that says that the
 maps
  api key is missing: uncaught exception: java.lang.RuntimeException: The
  Maps API has not been loaded. Is a script tag missing from your host
 HTML
  or module file? Is the Maps key missing or invalid?
  Is there a way to exclude some inherited modules?
  Module_A.gwt.xml:
  module
  !-- Inherit the core Web Toolkit stuff.  --
  inherits name=com.google.gwt.user.User/
inherits name=com.google.gwt.xml.XML/
inherits name=com.google.gwt.http.HTTP/
inherits name=com.google.gwt.json.JSON/
inherits name=com.google.gwt.i18n.I18N/
 
  !-- Inherit Custom Widgets --
  inherits name=com.google.gwt.maps.GoogleMaps/
 
  !-- Spanish default --
extend-property name=locale values=es/
 
  !-- Specify the app entry point class.   --
  entry-point class='com.pavco.client.Index'/
 
   inherits name=com.google.gwt.user.theme.standard.Standard/
 
  set-property name=user.agent value=gecko/
  /module
 
 
  Module_B.gwt.xml:
  module
  !-- Inherit the core Web Toolkit stuff.  --
  inherits name='com.google.gwt.user.User'/
inherits name=com.google.gwt.xml.XML/
inherits name=com.google.gwt.http.HTTP/
inherits name=com.google.gwt.json.JSON/
inherits name=com.google.gwt.i18n.I18N/
 
  inherits name=com.pavco.Index/
 
  !-- Specify the app entry point class.   --
  entry-point class='com.pavco.mobile.client.M_Index'/
 
  stylesheet src='css/m_index.css' /
 
inherits name=com.google.gwt.user.theme.standard.Standard/
!-- inherits name=com.google.gwt.user.theme.chrome.Chrome/ --
!-- inherits name=com.google.gwt.user.theme.dark.Dark/ --
  /module
 
  --
  -Pav
 
  
 

 



-- 
-Pav

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



Re: Module Dependency Issue

2009-03-12 Thread Isaac Truett

Sorry to disappoint.

I'm actually curious why you don't want to refactor. I find that
sorting through dependencies in this way usually results in better
code.


On Thu, Mar 12, 2009 at 12:35 PM, Pavel Byles pavelby...@gmail.com wrote:
 I was hoping I wouldn't have to do this
 Thanks Isaac.

 On Thu, Mar 12, 2009 at 11:32 AM, Isaac Truett itru...@gmail.com wrote:

 Pavel,

 No, you can't exclude part of an inherited module. What you can do is
 refactor your modules so that you aren't inheriting bits you don't
 want:

 1. Create a module for the bits of Module_A that don't require the
 maps API. Let's call it Module_A_WM (Without Maps).
 2. Have Module_B inherit Module_A_WM.
 3. Have Module_A inherit Module_A_WM and the maps API.

 Obviously you'll want a more meaningful name for the new Module_A_WM.

 - Isaac


 On Thu, Mar 12, 2009 at 11:57 AM, Pavel Byles pavelby...@gmail.com
 wrote:
  I have a module (Module_A) that inherits and requires the
  gwt_google_maps_api and another (Module_B) that inherits from
  Module_A.
  But Module_B doesn't need to use the gwt_google_maps_api.
  Everything compiles and deploys just fine, but when running the web
  application (Module_B) there is a javascript error that says that the
  maps
  api key is missing: uncaught exception: java.lang.RuntimeException: The
  Maps API has not been loaded. Is a script tag missing from your host
  HTML
  or module file? Is the Maps key missing or invalid?
  Is there a way to exclude some inherited modules?
  Module_A.gwt.xml:
  module
      !-- Inherit the core Web Toolkit stuff.  --
      inherits name=com.google.gwt.user.User/
    inherits name=com.google.gwt.xml.XML/
    inherits name=com.google.gwt.http.HTTP/
    inherits name=com.google.gwt.json.JSON/
    inherits name=com.google.gwt.i18n.I18N/
 
      !-- Inherit Custom Widgets --
      inherits name=com.google.gwt.maps.GoogleMaps/
 
      !-- Spanish default --
    extend-property name=locale values=es/
 
      !-- Specify the app entry point class.   --
      entry-point class='com.pavco.client.Index'/
 
   inherits name=com.google.gwt.user.theme.standard.Standard/
 
      set-property name=user.agent value=gecko/
  /module
 
 
  Module_B.gwt.xml:
  module
      !-- Inherit the core Web Toolkit stuff.  --
      inherits name='com.google.gwt.user.User'/
    inherits name=com.google.gwt.xml.XML/
    inherits name=com.google.gwt.http.HTTP/
    inherits name=com.google.gwt.json.JSON/
    inherits name=com.google.gwt.i18n.I18N/
 
      inherits name=com.pavco.Index/
 
      !-- Specify the app entry point class.   --
      entry-point class='com.pavco.mobile.client.M_Index'/
 
      stylesheet src='css/m_index.css' /
 
        inherits name=com.google.gwt.user.theme.standard.Standard/
        !-- inherits name=com.google.gwt.user.theme.chrome.Chrome/
  --
        !-- inherits name=com.google.gwt.user.theme.dark.Dark/ --
  /module
 
  --
  -Pav
 
  
 





 --
 -Pav

 


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



Plugin based gwt web application

2009-03-12 Thread Rosh PR
I'm creating a web management framework fully developed in GWT.
One of the main intend of this project is to allow the end users to
write there own plugins for this framework which will be displayed
in one of the different panels on the framework console.

One of the main requirement in this project is for the frame work
to load the plugin in run time and display the gwt app created by
the end user.

One of the problems I'm facing over here is how will i compile a
small set of gwt code with out any EntryPoint and use the
generated *javascript* from the framework. I know we can compile
without the Entrypoint but the main problem I'm facing is compiling
code to javascript instead of java classes and loading it to the
framework which will have to use these JS and display the plugin
widget on the framework console on runtime.

Framework console
|===|
| |###| |
| |  | |  | |
| |  plugin| plugin   | plugin|  |
| |  | |  | |
| |  | |  | |
| |###| |
|===|

Any help??

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



Re: Module Dependency Issue

2009-03-12 Thread Pavel Byles
Well it's not hard to refactor, but I was hoping that the GWT compiler would
figure out what I need and don't need. But I do see why this would be
better.

The thing is that I am making a mobile version of my application and I don't
want to include google maps on my mobile version.  I also have my JSON data
parsers in my original application and some reference the google maps api.

On Thu, Mar 12, 2009 at 11:39 AM, Isaac Truett itru...@gmail.com wrote:


 Sorry to disappoint.

 I'm actually curious why you don't want to refactor. I find that
 sorting through dependencies in this way usually results in better
 code.


 On Thu, Mar 12, 2009 at 12:35 PM, Pavel Byles pavelby...@gmail.com
 wrote:
  I was hoping I wouldn't have to do this
  Thanks Isaac.
 
  On Thu, Mar 12, 2009 at 11:32 AM, Isaac Truett itru...@gmail.com
 wrote:
 
  Pavel,
 
  No, you can't exclude part of an inherited module. What you can do is
  refactor your modules so that you aren't inheriting bits you don't
  want:
 
  1. Create a module for the bits of Module_A that don't require the
  maps API. Let's call it Module_A_WM (Without Maps).
  2. Have Module_B inherit Module_A_WM.
  3. Have Module_A inherit Module_A_WM and the maps API.
 
  Obviously you'll want a more meaningful name for the new Module_A_WM.
 
  - Isaac
 
 
  On Thu, Mar 12, 2009 at 11:57 AM, Pavel Byles pavelby...@gmail.com
  wrote:
   I have a module (Module_A) that inherits and requires the
   gwt_google_maps_api and another (Module_B) that inherits from
   Module_A.
   But Module_B doesn't need to use the gwt_google_maps_api.
   Everything compiles and deploys just fine, but when running the web
   application (Module_B) there is a javascript error that says that the
   maps
   api key is missing: uncaught exception: java.lang.RuntimeException:
 The
   Maps API has not been loaded. Is a script tag missing from your host
   HTML
   or module file? Is the Maps key missing or invalid?
   Is there a way to exclude some inherited modules?
   Module_A.gwt.xml:
   module
   !-- Inherit the core Web Toolkit stuff.  --
   inherits name=com.google.gwt.user.User/
 inherits name=com.google.gwt.xml.XML/
 inherits name=com.google.gwt.http.HTTP/
 inherits name=com.google.gwt.json.JSON/
 inherits name=com.google.gwt.i18n.I18N/
  
   !-- Inherit Custom Widgets --
   inherits name=com.google.gwt.maps.GoogleMaps/
  
   !-- Spanish default --
 extend-property name=locale values=es/
  
   !-- Specify the app entry point class.   --
   entry-point class='com.pavco.client.Index'/
  
inherits name=com.google.gwt.user.theme.standard.Standard/
  
   set-property name=user.agent value=gecko/
   /module
  
  
   Module_B.gwt.xml:
   module
   !-- Inherit the core Web Toolkit stuff.  --
   inherits name='com.google.gwt.user.User'/
 inherits name=com.google.gwt.xml.XML/
 inherits name=com.google.gwt.http.HTTP/
 inherits name=com.google.gwt.json.JSON/
 inherits name=com.google.gwt.i18n.I18N/
  
   inherits name=com.pavco.Index/
  
   !-- Specify the app entry point class.   --
   entry-point class='com.pavco.mobile.client.M_Index'/
  
   stylesheet src='css/m_index.css' /
  
 inherits name=com.google.gwt.user.theme.standard.Standard/
 !-- inherits name=com.google.gwt.user.theme.chrome.Chrome/
   --
 !-- inherits name=com.google.gwt.user.theme.dark.Dark/ --
   /module
  
   --
   -Pav
  
   
  
 
 
 
 
 
  --
  -Pav
 
  
 

 



-- 
-Pav

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



Re: Module Dependency Issue

2009-03-12 Thread Pavel Byles
My regular version does import a class that extends a map, so that may be
the problem.

I will refactor.

On Thu, Mar 12, 2009 at 12:10 PM, Isaac Truett itru...@gmail.com wrote:


 The compiler indeed will do an admirable job of removing dead code.
 But since you're seeing runtime errors in the mobile version, I'd say
 it's very likely that you have live references to the maps code
 somewhere, possibly in the parsers you mentioned. Refactoring will
 help you eliminate those references or isolate them so that your
 mobile version only gets the code it needs, making it smaller and
 faster (both especially important for mobile apps, as I'm sure you are
 already aware).

 It's possible that your regular version's entry point references maps
 code. As I understand it, both of the entry points defined in the
 Module_A and Module_B will be executed when Module_B loads since B
 inherits A's entry point. Refactoring so that A and B inherit from a
 common base (without an entry point) will solve that.



 On Thu, Mar 12, 2009 at 12:56 PM, Pavel Byles pavelby...@gmail.com
 wrote:
  Well it's not hard to refactor, but I was hoping that the GWT compiler
 would
  figure out what I need and don't need. But I do see why this would be
  better.
 
  The thing is that I am making a mobile version of my application and I
 don't
  want to include google maps on my mobile version.  I also have my JSON
 data
  parsers in my original application and some reference the google maps
 api.
 
  On Thu, Mar 12, 2009 at 11:39 AM, Isaac Truett itru...@gmail.com
 wrote:
 
  Sorry to disappoint.
 
  I'm actually curious why you don't want to refactor. I find that
  sorting through dependencies in this way usually results in better
  code.
 
 
  On Thu, Mar 12, 2009 at 12:35 PM, Pavel Byles pavelby...@gmail.com
  wrote:
   I was hoping I wouldn't have to do this
   Thanks Isaac.
  
   On Thu, Mar 12, 2009 at 11:32 AM, Isaac Truett itru...@gmail.com
   wrote:
  
   Pavel,
  
   No, you can't exclude part of an inherited module. What you can do is
   refactor your modules so that you aren't inheriting bits you don't
   want:
  
   1. Create a module for the bits of Module_A that don't require the
   maps API. Let's call it Module_A_WM (Without Maps).
   2. Have Module_B inherit Module_A_WM.
   3. Have Module_A inherit Module_A_WM and the maps API.
  
   Obviously you'll want a more meaningful name for the new Module_A_WM.
  
   - Isaac
  
  
   On Thu, Mar 12, 2009 at 11:57 AM, Pavel Byles pavelby...@gmail.com
   wrote:
I have a module (Module_A) that inherits and requires the
gwt_google_maps_api and another (Module_B) that inherits from
Module_A.
But Module_B doesn't need to use the gwt_google_maps_api.
Everything compiles and deploys just fine, but when running the web
application (Module_B) there is a javascript error that says that
 the
maps
api key is missing: uncaught exception:
 java.lang.RuntimeException:
The
Maps API has not been loaded. Is a script tag missing from your
host
HTML
or module file? Is the Maps key missing or invalid?
Is there a way to exclude some inherited modules?
Module_A.gwt.xml:
module
!-- Inherit the core Web Toolkit stuff.  --
inherits name=com.google.gwt.user.User/
  inherits name=com.google.gwt.xml.XML/
  inherits name=com.google.gwt.http.HTTP/
  inherits name=com.google.gwt.json.JSON/
  inherits name=com.google.gwt.i18n.I18N/
   
!-- Inherit Custom Widgets --
inherits name=com.google.gwt.maps.GoogleMaps/
   
!-- Spanish default --
  extend-property name=locale values=es/
   
!-- Specify the app entry point class.   --
entry-point class='com.pavco.client.Index'/
   
 inherits name=com.google.gwt.user.theme.standard.Standard/
   
set-property name=user.agent value=gecko/
/module
   
   
Module_B.gwt.xml:
module
!-- Inherit the core Web Toolkit stuff.  --
inherits name='com.google.gwt.user.User'/
  inherits name=com.google.gwt.xml.XML/
  inherits name=com.google.gwt.http.HTTP/
  inherits name=com.google.gwt.json.JSON/
  inherits name=com.google.gwt.i18n.I18N/
   
inherits name=com.pavco.Index/
   
!-- Specify the app entry point class.   --
entry-point class='com.pavco.mobile.client.M_Index'/
   
stylesheet src='css/m_index.css' /
   
  inherits
 name=com.google.gwt.user.theme.standard.Standard/
  !-- inherits
 name=com.google.gwt.user.theme.chrome.Chrome/
--
  !-- inherits name=com.google.gwt.user.theme.dark.Dark/
 --
/module
   
--
-Pav
   

   
  
  
  
  
  
   --
   -Pav
  
   
  
 
 
 
 
 
  --
  -Pav
 
  
 

 



-- 
-Pav

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit 

Re: Plugin based gwt web application

2009-03-12 Thread Matías Costa
On Thu, Mar 12, 2009 at 5:40 PM, Rosh PR open@gmail.com wrote:

 One of the problems I'm facing over here is how will i compile a
 small set of gwt code with out any EntryPoint and use the
 generated *javascript* from the framework. I know we can compile
 without the Entrypoint but the main problem I'm facing is compiling
 code to javascript instead of java classes and loading it to the
 framework which will have to use these JS and display the plugin
 widget on the framework console on runtime.


Interesting problem.

This is going to need some kind of infraestructure and policy. I am just
thinking out loud waiting more experienced people point problems and what
can work. To start you need two things:

a) Know what plugins exists, a registry of plugins
b) Attach them into a panel, listen events and useful stuff

To install the plugins you can drop them in folder. To know what exists you
can do it manually, setting up a file and fetching it from the client side.
To do it automatically you can do it server side and rpc-serialize'it to
client side.

To load them the main problem is obfuscated code. I imagine you can't mix up
source comming from different optimizer executions. Let's suposse we can.
Then if we know the plugin main object name, we can construct a jsni method
to forge a call to the pluing initializer function, with the panel id to be
attached.

native void initPlugin(String objectName, String panelId) /*-{
  var method = @+objectName+::doInit(Ljava/lang/String;);
  eval(  method+('+panelId+');  );

}-*/;

That should give to the plugin the ability to put itself into the panel and
call whatever container hooks needs.

Another way is doing plugin static iniatilazation self injection:

class CoolPlugin extends Plugin {
 static {
  Application.staticSomething.register(new CoolPlugin());
 }

So the application can take further actions...

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



Re: error in database connection

2009-03-12 Thread Sumit Chandel
Hi Poonam,
Apart from making sure your Hibernate and applicationContext.xml
configurations are correct, I think another major cause for the stack trace
you're seeing is that you're mixing server-side Java code with client-side
GWT code. It's important to recall that GWT code gets converted into
equivalent JavaScript, therefore you can't directly use server-side Java
concepts in GWT code and expect them to work as they would in a Java
runtime.

That said, there is a set of emulated JRE types supported in GWT. You can
check out the link below to the types that are supported in the emulated
JRE.

Emulated JRE:
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=RefJreEmulation

Vitali's suggestion of getting your server-side properly configured without
introducing GWT at first, and then creating the client-side using GWT and
integrating with the server-side using GWT RPC sounds like a sound approach
if you're just getting started.

Hope that helps,
-Sumit Chandel

On Tue, Mar 10, 2009 at 12:26 AM, Vitali Lovich vlov...@gmail.com wrote:

 This is more a Hibernate than GWT issue.  From your error log, it looks
 like it boils down to you not configuring it correctly.  If you look at the
 newer Hibernate, there's no XML configuration.  It's all done through
 annotations, which are a lot easier to understand.

 You may want to look into just getting hibernate running on its own in a
 standalone java application, and then just adding a GWT RPC glue layer
 around it if you are indeed planning on doing some kind of web-app stuff.


 On Tue, Mar 10, 2009 at 3:06 AM, poonam poonam...@gmail.com wrote:


 Hi,
  I have developed the application using the 3parts tutorial from the
 site  www.eggsylife.blogspot.com as suggested by you.
 Actually for database I have used MySQL and for  the connection with
 database I have created the applicationContext.xml as follows :

 - applicationContext.xml

 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:aop=http://www.springframework.org/schema/aop;
 xmlns:tx=http://www.springframework.org/schema/tx;
  xsi:schemaLocation= http://www.springframework.org/schema/beans
 classpath:spring-beans-2.0.xsdhttp://www.springframework.org/schema/beans%0Aclasspath:spring-beans-2.0.xsd
 http://www.springframework.org/schema/tx
 classpath:spring-tx-2.0.xsdhttp://www.springframework.org/schema/tx%0Aclasspath:spring-tx-2.0.xsd
 http://www.springframework.org/schema/aop
 classpath:spring-aop-2.0.xsdhttp://www.springframework.org/schema/aop%0Aclasspath:spring-aop-2.0.xsd
 
  bean id=dataSource
 class=org.apache.commons.dbcp.BasicDataSource
   property name=driverClassName
   valuecom.mysql.jdbc.Driver/value
   /property
   property name=url
  valuejdbc:mysql://localhost/test/value
   /property

  property name=username
valueroot/value
  /property
  property name=password
 valueroot/value
   /property
   property name=initialSize
   value2/value
   /property
   property name=maxActive
value5/value
   /property
   property name=maxIdle
  value2/value
   /property
  /bean
   bean id=sessionFactory
 class=org.springframework.orm.hibernate3.LocalSessionFactoryBean
property name=dataSource
 ref bean=dataSource/
/property
   property name=configLocation
valuehibernate.cfg.xml/value
/property
 property  name=configurationClass
 valueorg.hibernate.cfg.AnnotationConfiguration/value
 /property
 property name=hibernateProperties
   props
  prop
 key=hibernate.dialectorg.hibernate.dialect.HSQLDialect/prop
 prop key=show_sqltrue/prop
  /props
 /property
/bean
bean id=txManager
 class=org.springframework.orm.hibernate3.HibernateTransactionManager
 property name=sessionFactory ref=sessionFactory /
  /bean
  !-- enable the configuration of transactional behavior based on
 annotations --
  tx:annotation-driven transaction-manager=txManager proxy-
 target-class=false /

  bean id=pupilCollection
 class=com.company.server.domain.PupilCollectionImpl
 scope=prototype  property name=sessionFactoryref
 bean=sessionFactory//property /bean
 /beans

 Also, in the lib folder I have included the jar that is,  mysql-
 connector-java-5.0.4-bin.jar  in the 'lib' folder.
 But now I am getting the errors as,

 1. [WARN] SQL Error: 0, SQLState: null

 2. [WARN] Cannot create JDBC driver of class 'com.mysql.jdbc.Driver'
 for connect URL 'jdbc:mysql://localhost/test'

 3. [WARN] Could not obtain connection metadata
 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
 of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql://
 localhost/test'
at org.apache.commons.dbcp.BasicDataSource.createDataSource
 (BasicDataSource.java:1150)
at org.apache.commons.dbcp.BasicDataSource.getConnection
 

Re: error in database connection

2009-03-12 Thread Vitali Lovich
Also just to point out, there's a number of GWT libraries for passing
persistent objects across the client/server barrier.  I'm not sure how well
they work or of any of the dragons involved, but they do exist
(hibernate4gwt was one back in the day - I believe it's been deprecated and
there are more robust ones available these days).

On Thu, Mar 12, 2009 at 2:48 PM, Sumit Chandel sumitchan...@google.comwrote:

 Hi Poonam,
 Apart from making sure your Hibernate and applicationContext.xml
 configurations are correct, I think another major cause for the stack trace
 you're seeing is that you're mixing server-side Java code with client-side
 GWT code. It's important to recall that GWT code gets converted into
 equivalent JavaScript, therefore you can't directly use server-side Java
 concepts in GWT code and expect them to work as they would in a Java
 runtime.

 That said, there is a set of emulated JRE types supported in GWT. You can
 check out the link below to the types that are supported in the emulated
 JRE.

 Emulated JRE:

 http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=RefJreEmulation

 Vitali's suggestion of getting your server-side properly configured without
 introducing GWT at first, and then creating the client-side using GWT and
 integrating with the server-side using GWT RPC sounds like a sound approach
 if you're just getting started.

 Hope that helps,
 -Sumit Chandel


 On Tue, Mar 10, 2009 at 12:26 AM, Vitali Lovich vlov...@gmail.com wrote:

 This is more a Hibernate than GWT issue.  From your error log, it looks
 like it boils down to you not configuring it correctly.  If you look at the
 newer Hibernate, there's no XML configuration.  It's all done through
 annotations, which are a lot easier to understand.

 You may want to look into just getting hibernate running on its own in a
 standalone java application, and then just adding a GWT RPC glue layer
 around it if you are indeed planning on doing some kind of web-app stuff.


 On Tue, Mar 10, 2009 at 3:06 AM, poonam poonam...@gmail.com wrote:


 Hi,
  I have developed the application using the 3parts tutorial from the
 site  www.eggsylife.blogspot.com as suggested by you.
 Actually for database I have used MySQL and for  the connection with
 database I have created the applicationContext.xml as follows :

 - applicationContext.xml

 ?xml version=1.0 encoding=UTF-8?
 beans xmlns=http://www.springframework.org/schema/beans;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:aop=http://www.springframework.org/schema/aop;
 xmlns:tx=http://www.springframework.org/schema/tx;
  xsi:schemaLocation= http://www.springframework.org/schema/beans
 classpath:spring-beans-2.0.xsdhttp://www.springframework.org/schema/beans%0Aclasspath:spring-beans-2.0.xsd
 http://www.springframework.org/schema/tx
 classpath:spring-tx-2.0.xsdhttp://www.springframework.org/schema/tx%0Aclasspath:spring-tx-2.0.xsd
 http://www.springframework.org/schema/aop
 classpath:spring-aop-2.0.xsdhttp://www.springframework.org/schema/aop%0Aclasspath:spring-aop-2.0.xsd
 
  bean id=dataSource
 class=org.apache.commons.dbcp.BasicDataSource
   property name=driverClassName
   valuecom.mysql.jdbc.Driver/value
   /property
   property name=url
  valuejdbc:mysql://localhost/test/value
   /property

  property name=username
valueroot/value
  /property
  property name=password
 valueroot/value
   /property
   property name=initialSize
   value2/value
   /property
   property name=maxActive
value5/value
   /property
   property name=maxIdle
  value2/value
   /property
  /bean
   bean id=sessionFactory
 class=org.springframework.orm.hibernate3.LocalSessionFactoryBean
property name=dataSource
 ref bean=dataSource/
/property
   property name=configLocation
valuehibernate.cfg.xml/value
/property
 property  name=configurationClass
 valueorg.hibernate.cfg.AnnotationConfiguration/value
 /property
 property name=hibernateProperties
   props
  prop
 key=hibernate.dialectorg.hibernate.dialect.HSQLDialect/prop
 prop key=show_sqltrue/prop
  /props
 /property
/bean
bean id=txManager
 class=org.springframework.orm.hibernate3.HibernateTransactionManager
 property name=sessionFactory ref=sessionFactory /
  /bean
  !-- enable the configuration of transactional behavior based on
 annotations --
  tx:annotation-driven transaction-manager=txManager proxy-
 target-class=false /

  bean id=pupilCollection
 class=com.company.server.domain.PupilCollectionImpl
 scope=prototype  property name=sessionFactoryref
 bean=sessionFactory//property /bean
 /beans

 Also, in the lib folder I have included the jar that is,  mysql-
 connector-java-5.0.4-bin.jar  in the 'lib' folder.
 But now I am getting the errors as,

 1. [WARN] SQL Error: 0, SQLState: null

 2. [WARN] Cannot create JDBC driver of class 'com.mysql.jdbc.Driver'

Re: Running HTTPServlet alongside RemoteServiceServlet in Tomcat

2009-03-12 Thread Feltros

Oh no sorry when I said the rather peculiar way, its the same peculiar
way you have to do it in GWT - as in you create a 'form' with the
target of your form-receiving-servlet (In my case
AlbumUploadController) which has some subelements which are fileupload
boxes. The implementation would be exactly the same in GWT and both
were tested. Didn't even mean to mention GXT lol :P I only said
'peculiar' because its not the normal way you'd reference a servlet
which responded to a GET activity like /returnPictures?
img=someimg.jpg or the way you use RPCServlets.

A few questions to yourself then if you wouldn't mind assisting me in
a few things?
When creating your war do you leave your front end bits in the www/
com.Blah.blah/ directory, or do you move them to the root of the WAR
file for simpler URL's? (This isn't perhaps related to my error but
i'd be interested to know if the location of the front end has a
bearing on how you should call server side bits and where it should
'properly' be).
In any of the HTTPServlets you run how do you handle errors? Are they
thrown for Tomcat to deal with, do you catch them and do
error.printStackTrace() or do you handle them some other way to get
them to end up in the logs?

Thanks kindly for your help :)

On Mar 12, 6:48 pm, Isaac Truett itru...@gmail.com wrote:
  If anyone knows of any examples of a project with an RPCServlet and
  HTTPServlet (Any kind, a picture server, a file upload receiver, etc)
  running in conjunction on the server side and they both print their
  logs in Tomcat WAR deployment correctly that would be extraordinarily
  fantastic.

 Yes, it can be done. I've done it in a couple of different projects.
 Unfortunately, no, it's not something I can point you to as an
 example. But there really isn't anything tricky about it.

 You mentioned GXT; have you tried writing a simple test without GXT?
 It seems quite likely that GXT is part of your problem, especially
 given the rather peculiar way you have to do with file uploading in
 GXT to which you refer. Have you searched a GXT forum for information
 about this problem?



 On Thu, Mar 12, 2009 at 2:34 PM, Feltros felt...@gmail.com wrote:

  I have read several posts that seem to be explaining a problem similar
  to my own and yet it is constantly misinterpreted and so the replies
  are somewhat useless. I will attempt to explain the problem as clearly
  as possible:
  I have 2 server classes,
  AlbumUploader extends HTTPServlet
  ServerImpl extends RemoteServiceServlet

  In deploying these items on tomcat I have the following web.xml
  entries:
  servlet
         servlet-nameServer/servlet-name
         servlet-classcom.BTI.main.server.ServerImpl/servlet-class
  /servlet
  servlet-mapping
         servlet-nameServer/servlet-name
         url-pattern/service/url-pattern
  /servlet-mapping

  servlet
         servlet-nameAlbumUpload/servlet-name
         servlet-classcom.BTI.main.server.AlbumUpload/servlet-class
  /servlet
  servlet-mapping
         servlet-nameAlbumUpload/servlet-name
         url-pattern/AlbumUpload/url-pattern
  /servlet-mapping

  Which seems to work fine (If I go to mydeploymentplace/AlbumUpload it
  complains that it won't take a get data input - which is correct
  because it only accepts post data).

  Now my problem is that when I use the AlbumUploader (Which being a
  file upload receiver is called in the rather peculiar way you have to
  do with file uploading in GXT) it returns absolutely fine - almost
  instantly. No file is uploaded, no error is returned, no logs are
  written and clearly that AlbumUploader either - hasn't run whatsoever
  - or returned null instantly without this being logged as an error.

  It would appear that I can't run a HTTPServlet in conjunction with an
  RPCServlet?

  Do I need to deploy these to different projects on my Tomcat server?
  Is there some special key in the web.xml file to make these work
  properly? How can I get this to write an error into one of the logs?
  Where does System.out.println/System.err.println print to when your
  running a HTTPServlet. If I am running the HTTPServlets and
  RPCServlets in seperate projects deployed on the same server are they
  going to be accessible to me on the front end still?

  If anyone knows of any examples of a project with an RPCServlet and
  HTTPServlet (Any kind, a picture server, a file upload receiver, etc)
  running in conjunction on the server side and they both print their
  logs in Tomcat WAR deployment correctly that would be extraordinarily
  fantastic.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 

Re: Plugin based gwt web application

2009-03-12 Thread Vitali Lovich
Well, one thing you can do is have the EntryPoint, and just tell plugin
developers that they have to attach to some particular div element in a
particular way, as opposed to the traditional root (i.e.
RootPanel.get(plugin-name-div)).

Then the user can request certain plugins to be added in which your GWT code
should create the div's for those plugins and load their scripts.

Hope this helps you get started.  Also, I would recommend staying away from
JSNI if you're not doing something that is absolutely not supported within
the GWT framework.

Just as an extension to the Java approach below, I would prefer something
like:

public abstract class PluginEntry implements EntryPoint
{
 String name;

 publc PluginEntry(String pluginName)
 {
   name = pluginName;
 }

public final void onModuleEntry()
{
}

protected abstract void onModuleEntry(
}

On Thu, Mar 12, 2009 at 2:13 PM, Matías Costa m.costac...@gmail.com wrote:

 On Thu, Mar 12, 2009 at 5:40 PM, Rosh PR open@gmail.com wrote:

 One of the problems I'm facing over here is how will i compile a
 small set of gwt code with out any EntryPoint and use the
 generated *javascript* from the framework. I know we can compile
 without the Entrypoint but the main problem I'm facing is compiling
 code to javascript instead of java classes and loading it to the
 framework which will have to use these JS and display the plugin
 widget on the framework console on runtime.


 Interesting problem.

 This is going to need some kind of infraestructure and policy. I am just
 thinking out loud waiting more experienced people point problems and what
 can work. To start you need two things:

 a) Know what plugins exists, a registry of plugins
 b) Attach them into a panel, listen events and useful stuff

 To install the plugins you can drop them in folder. To know what exists you
 can do it manually, setting up a file and fetching it from the client side.
 To do it automatically you can do it server side and rpc-serialize'it to
 client side.

 To load them the main problem is obfuscated code. I imagine you can't mix
 up source comming from different optimizer executions. Let's suposse we can.
 Then if we know the plugin main object name, we can construct a jsni method
 to forge a call to the pluing initializer function, with the panel id to be
 attached.

 native void initPlugin(String objectName, String panelId) /*-{
   var method = @+objectName+::doInit(Ljava/lang/String;);
   eval(  method+('+panelId+');  );

 }-*/;

 That should give to the plugin the ability to put itself into the panel and
 call whatever container hooks needs.

 Another way is doing plugin static iniatilazation self injection:

 class CoolPlugin extends Plugin {
  static {
   Application.staticSomething.register(new CoolPlugin());
  }

 So the application can take further actions...


 


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



Re: Plugin based gwt web application

2009-03-12 Thread Vitali Lovich
Uggh - sorry.  Gmail decided to send the message for me.  I've completed the
class below.

Anyways, plugins would extend PluginEntry.  Again, your GWT would be
reponsible for actually injecting the plugin javascript into your page. Not
sure what the GWT-preferred way would be, but in theory (I haven't tried
this out), you might be able to do a RootPanel.get().add(new HTML(script
src='plugin/to/load'/)), although I'd test it first (I highly doubt this
would work).

A more explicit approach might be:

Document dom = Document.get();
Element head = dom.getElementsByTagName(head).getItem(0);
Element pluginScript = dom.createElement(script);
pluginScript.setPropertyString(src, plugin.js);
pluginScript.setPropertyString(type, text/javascript);
Document.appendChild(head, pluginScript);

This should work (assuming the browser supports loading scripts added
dynamically to the head element).  I'd recommend testing this on several
browsers - I'm not sure which support it (although I suspect all of the
major ones).

Good luck.

On Thu, Mar 12, 2009 at 3:03 PM, Vitali Lovich vlov...@gmail.com wrote:

 Well, one thing you can do is have the EntryPoint, and just tell plugin
 developers that they have to attach to some particular div element in a
 particular way, as opposed to the traditional root (i.e.
 RootPanel.get(plugin-name-div)).

 Then the user can request certain plugins to be added in which your GWT
 code should create the div's for those plugins and load their scripts.

 Hope this helps you get started.  Also, I would recommend staying away from
 JSNI if you're not doing something that is absolutely not supported within
 the GWT framework.

 Just as an extension to the Java approach below, I would prefer something
 like:

 public abstract class PluginEntry implements EntryPoint
 {
  String name;

  publc PluginEntry(String pluginName)
  {
name = pluginName;
  }

 public final void onModuleEntry()
 {

 RootPanel pluginPanel = RootPanel.get(plugins-location);

  pluginPanel.add(new HTML(div id=' + name + '/div));

 onPluginEntry(RootPanel.get(name));

 }

 protected abstract void onPluginEntry(RootPanel pluginPanel);

}

 On Thu, Mar 12, 2009 at 2:13 PM, Matías Costa m.costac...@gmail.comwrote:

 On Thu, Mar 12, 2009 at 5:40 PM, Rosh PR open@gmail.com wrote:

 One of the problems I'm facing over here is how will i compile a
 small set of gwt code with out any EntryPoint and use the
 generated *javascript* from the framework. I know we can compile
 without the Entrypoint but the main problem I'm facing is compiling
 code to javascript instead of java classes and loading it to the
 framework which will have to use these JS and display the plugin
 widget on the framework console on runtime.


 Interesting problem.

 This is going to need some kind of infraestructure and policy. I am just
 thinking out loud waiting more experienced people point problems and what
 can work. To start you need two things:

 a) Know what plugins exists, a registry of plugins
 b) Attach them into a panel, listen events and useful stuff

 To install the plugins you can drop them in folder. To know what exists
 you can do it manually, setting up a file and fetching it from the client
 side. To do it automatically you can do it server side and rpc-serialize'it
 to client side.

 To load them the main problem is obfuscated code. I imagine you can't mix
 up source comming from different optimizer executions. Let's suposse we can.
 Then if we know the plugin main object name, we can construct a jsni method
 to forge a call to the pluing initializer function, with the panel id to be
 attached.

 native void initPlugin(String objectName, String panelId) /*-{
   var method = @+objectName+::doInit(Ljava/lang/String;);
   eval(  method+('+panelId+');  );


 }-*/;

 That should give to the plugin the ability to put itself into the panel
 and call whatever container hooks needs.

 Another way is doing plugin static iniatilazation self injection:

 class CoolPlugin extends Plugin {
  static {
   Application.staticSomething.register(new CoolPlugin());
  }

 So the application can take further actions...


 



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



Re: JavaScriptException in hosted mode (Win XP - IE6)

2009-03-12 Thread Vitali Lovich
Just as a future hint, you may want to translate the error messages into
English as well.  I understood it  there might be enough friend words for
context for people who don't speek French, but you're more likely to get
responses if everything is in English.

On Thu, Mar 12, 2009 at 1:35 PM, Miles T. dupont.nico...@gmail.com wrote:


 Mmm, it looks my Element was null. Strange that it doesn't throw a
 NullPointerException instead.

 On 12 mar, 16:29, Miles T. dupont.nico...@gmail.com wrote:
  Hi all,
 
  I have an issue which randomly happens in hosted mode in Windows XP
  (IE6) when calling getElementsByTagName(td) on an Element.
 
  [ERROR] Uncaught exception escaped
  com.google.gwt.core.client.JavaScriptException: (TypeError): Cet objet
  ne gère pas cette propriété ou cette méthode
   number: -2146827850
   description: Cet objet ne gère pas cette propriété ou cette méthode
  at
 com.google.gwt.dom.client.Element$.getElementsByTagName$(Native
  Method)
 
  I've already encountered such unsolvable exception but I had found a
  workaround (refactoring a lot of code...). Did anyone already
  encounter such issue ?
 
  Cheers,
 
  Miles
 


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



Re: Running HTTPServlet alongside RemoteServiceServlet in Tomcat

2009-03-12 Thread Isaac Truett

On Thu, Mar 12, 2009 at 3:01 PM, Feltros felt...@gmail.com wrote:

 Oh no sorry when I said the rather peculiar way, its the same peculiar
 way you have to do it in GWT - as in you create a 'form' with the
 target of your form-receiving-servlet (In my case
 AlbumUploadController) which has some subelements which are fileupload
 boxes. The implementation would be exactly the same in GWT and both
 were tested. Didn't even mean to mention GXT lol :P I only said
 'peculiar' because its not the normal way you'd reference a servlet
 which responded to a GET activity like /returnPictures?
 img=someimg.jpg or the way you use RPCServlets.


Oh, well. Can't always get away with a simple
blame-the-third-party-library. Just to narrow things down a bit, is
the form is actually being submitted? Firebug's useful for checking
that sort of thing, if you develop with Firefox.

 A few questions to yourself then if you wouldn't mind assisting me in
 a few things?

Not at all.

 When creating your war do you leave your front end bits in the www/
 com.Blah.blah/ directory, or do you move them to the root of the WAR
 file for simpler URL's? (This isn't perhaps related to my error but
 i'd be interested to know if the location of the front end has a
 bearing on how you should call server side bits and where it should
 'properly' be).

Yes, I rebase everything to the web root. It does make it easier to
keep track of what each URL is relative to.


 In any of the HTTPServlets you run how do you handle errors? Are they
 thrown for Tomcat to deal with, do you catch them and do
 error.printStackTrace() or do you handle them some other way to get
 them to end up in the logs?


My current approach:

I catch declared exceptions and log them (java.util.logging, or your
preference of logger). Not every exception is a dire emergency, of
course, so a lot of benign things like a request for an invalid record
ID might be logged at INFO level or lower. For routine errors like
that, I'll set the HTTP status (404 seems appropriate for an ID not
found scenario) and leave it at that. For something worse (gee,
suddenly I can't find the database) I'll throw a new ServletException
with an appropriate message (but not including the original exception,
since I've already logged that).


 Thanks kindly for your help :)


You're welcome.


 On Mar 12, 6:48 pm, Isaac Truett itru...@gmail.com wrote:
  If anyone knows of any examples of a project with an RPCServlet and
  HTTPServlet (Any kind, a picture server, a file upload receiver, etc)
  running in conjunction on the server side and they both print their
  logs in Tomcat WAR deployment correctly that would be extraordinarily
  fantastic.

 Yes, it can be done. I've done it in a couple of different projects.
 Unfortunately, no, it's not something I can point you to as an
 example. But there really isn't anything tricky about it.

 You mentioned GXT; have you tried writing a simple test without GXT?
 It seems quite likely that GXT is part of your problem, especially
 given the rather peculiar way you have to do with file uploading in
 GXT to which you refer. Have you searched a GXT forum for information
 about this problem?



 On Thu, Mar 12, 2009 at 2:34 PM, Feltros felt...@gmail.com wrote:

  I have read several posts that seem to be explaining a problem similar
  to my own and yet it is constantly misinterpreted and so the replies
  are somewhat useless. I will attempt to explain the problem as clearly
  as possible:
  I have 2 server classes,
  AlbumUploader extends HTTPServlet
  ServerImpl extends RemoteServiceServlet

  In deploying these items on tomcat I have the following web.xml
  entries:
  servlet
         servlet-nameServer/servlet-name
         servlet-classcom.BTI.main.server.ServerImpl/servlet-class
  /servlet
  servlet-mapping
         servlet-nameServer/servlet-name
         url-pattern/service/url-pattern
  /servlet-mapping

  servlet
         servlet-nameAlbumUpload/servlet-name
         servlet-classcom.BTI.main.server.AlbumUpload/servlet-class
  /servlet
  servlet-mapping
         servlet-nameAlbumUpload/servlet-name
         url-pattern/AlbumUpload/url-pattern
  /servlet-mapping

  Which seems to work fine (If I go to mydeploymentplace/AlbumUpload it
  complains that it won't take a get data input - which is correct
  because it only accepts post data).

  Now my problem is that when I use the AlbumUploader (Which being a
  file upload receiver is called in the rather peculiar way you have to
  do with file uploading in GXT) it returns absolutely fine - almost
  instantly. No file is uploaded, no error is returned, no logs are
  written and clearly that AlbumUploader either - hasn't run whatsoever
  - or returned null instantly without this being logged as an error.

  It would appear that I can't run a HTTPServlet in conjunction with an
  RPCServlet?

  Do I need to deploy these to different projects on my Tomcat server?
  Is there some special key in the web.xml file to make 

Re: Plugin based gwt web application

2009-03-12 Thread Vitali Lovich
Oh, and the RootPanel way of dynamically adding the plugin's javascript will
probably only work in onModuleLoad.  The DOM approach I gave should work at
any time (i.e. as a response to user action).

On Thu, Mar 12, 2009 at 3:21 PM, Vitali Lovich vlov...@gmail.com wrote:

 Uggh - sorry.  Gmail decided to send the message for me.  I've completed
 the class below.

 Anyways, plugins would extend PluginEntry.  Again, your GWT would be
 reponsible for actually injecting the plugin javascript into your page. Not
 sure what the GWT-preferred way would be, but in theory (I haven't tried
 this out), you might be able to do a RootPanel.get().add(new HTML(script
 src='plugin/to/load'/)), although I'd test it first (I highly doubt this
 would work).

 A more explicit approach might be:

 Document dom = Document.get();
 Element head = dom.getElementsByTagName(head).getItem(0);
 Element pluginScript = dom.createElement(script);
 pluginScript.setPropertyString(src, plugin.js);
 pluginScript.setPropertyString(type, text/javascript);
 Document.appendChild(head, pluginScript);

 This should work (assuming the browser supports loading scripts added
 dynamically to the head element).  I'd recommend testing this on several
 browsers - I'm not sure which support it (although I suspect all of the
 major ones).

 Good luck.

 On Thu, Mar 12, 2009 at 3:03 PM, Vitali Lovich vlov...@gmail.com wrote:

 Well, one thing you can do is have the EntryPoint, and just tell plugin
 developers that they have to attach to some particular div element in a
 particular way, as opposed to the traditional root (i.e.
 RootPanel.get(plugin-name-div)).

 Then the user can request certain plugins to be added in which your GWT
 code should create the div's for those plugins and load their scripts.

 Hope this helps you get started.  Also, I would recommend staying away
 from JSNI if you're not doing something that is absolutely not supported
 within the GWT framework.

 Just as an extension to the Java approach below, I would prefer something
 like:

 public abstract class PluginEntry implements EntryPoint
 {
  String name;

  publc PluginEntry(String pluginName)
  {
name = pluginName;
  }

 public final void onModuleEntry()
 {

  RootPanel pluginPanel = RootPanel.get(plugins-location);

  pluginPanel.add(new HTML(div id=' + name + '/div));

  onPluginEntry(RootPanel.get(name));

 }

 protected abstract void onPluginEntry(RootPanel pluginPanel);

 }

 On Thu, Mar 12, 2009 at 2:13 PM, Matías Costa m.costac...@gmail.comwrote:

 On Thu, Mar 12, 2009 at 5:40 PM, Rosh PR open@gmail.com wrote:

 One of the problems I'm facing over here is how will i compile a
 small set of gwt code with out any EntryPoint and use the
 generated *javascript* from the framework. I know we can compile
 without the Entrypoint but the main problem I'm facing is compiling
 code to javascript instead of java classes and loading it to the
 framework which will have to use these JS and display the plugin
 widget on the framework console on runtime.


 Interesting problem.

 This is going to need some kind of infraestructure and policy. I am just
 thinking out loud waiting more experienced people point problems and what
 can work. To start you need two things:

 a) Know what plugins exists, a registry of plugins
 b) Attach them into a panel, listen events and useful stuff

 To install the plugins you can drop them in folder. To know what exists
 you can do it manually, setting up a file and fetching it from the client
 side. To do it automatically you can do it server side and rpc-serialize'it
 to client side.

 To load them the main problem is obfuscated code. I imagine you can't mix
 up source comming from different optimizer executions. Let's suposse we can.
 Then if we know the plugin main object name, we can construct a jsni method
 to forge a call to the pluing initializer function, with the panel id to be
 attached.

 native void initPlugin(String objectName, String panelId) /*-{
   var method = @+objectName+::doInit(Ljava/lang/String;);
   eval(  method+('+panelId+');  );



 }-*/;

 That should give to the plugin the ability to put itself into the panel
 and call whatever container hooks needs.

 Another way is doing plugin static iniatilazation self injection:

 class CoolPlugin extends Plugin {
  static {
   Application.staticSomething.register(new CoolPlugin());
  }

 So the application can take further actions...


 




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



Re: GWT OpenSocial Binding - usage problem

2009-03-12 Thread Arto

Hi Eric, thank you for the hint i have added inherit from
com.google.gwt.opensocial.OpenSocial and it compiles with other error:

Compiling module com.agiletwo.gadget.gwt.HelloGadget
Compiling permutations
   Analyzing permutation #1
  [ERROR] Errors in jar:file:/home/arto/apps/gwt-linux-1.5.3/gwt-
opensocial.jar!/com/google/gwt/opensocial/client/Collection.java
 [ERROR] Line 47:  missing formal parameter
  [ERROR] Errors in jar:file:/home/arto/apps/gwt-linux-1.5.3/gwt-
opensocial.jar!/com/google/gwt/opensocial/client/DataRequest.java
 [ERROR] Line 491:  Expected : in JSNI reference
  [ERROR] Errors in jar:file:/home/arto/apps/gwt-linux-1.5.3/gwt-
opensocial.jar!/com/google/gwt/opensocial/client/
OpenSocialFeature.java
 [ERROR] Line 284:  Expected : in JSNI reference
 [ERROR] Line 303:  Expected : in JSNI reference
 [ERROR] Line 189:  Expected : in JSNI reference
 [ERROR] Line 206:  Expected : in JSNI reference
 [ERROR] Line 237:  Expected : in JSNI reference
 [ERROR] Line 257:  Expected : in JSNI reference
 [ERROR] Line 332:  Expected : in JSNI reference
 [ERROR] Line 352:  Expected : in JSNI reference
 [ERROR] Line 164:  Expected : in JSNI reference
 [ERROR] Line 144:  Expected : in JSNI reference
  [ERROR] Cannot proceed due to previous errors
[ERROR] Build failed


It seems that it opensocial uses JavaScript keywords.. and having
problem with reference to Java generics usage like in

   public final native void send(OneArgumentFunctionDataResponse
callback)/*-{
  var nativeCallback = function(response) {
 
callba...@com.google.gwt.opensocial.client.oneargumentfunctionDataResponse::run
(Lcom/google/gwt/opensocial/client/DataResponse;)(response);
  }
  this.send(nativeCallback);
   }-*/;

can you give me an advice to deal with this problem?
Thanks

On Mar 11, 5:29 pm, Eric Ayers zun...@google.com wrote:
 Oops, there was a typo when the URL was created:

 http://gwt-google-apis.googlecode.com/svn/changes/haeberling/opensoci...



 On Wed, Mar 11, 2009 at 9:24 AM, Davide Cerbo davidece...@gmail.com wrote:

  Hi the url:
 http://gwt-google-apis.googlecode.com/svn/changes/haeberling/opensoci...
  return a 404 error :(

  2009/3/11 Eric Ayers zun...@google.com:
   If you are talking about the gwt-opensocial hosted at

 http://gwt-google-apis.googlecode.com/svn/changes/haeberling/opensoci...
   Then you also need to inherit com.google.gwt.opensocial.OpenSocial in
  your
   GWT module.
   Keep in mind that this is a pre-release version of the code.
   On Tue, Mar 10, 2009 at 5:51 PM, Arto amehrab...@gmail.com wrote:

   Hi,
   I'm getting problem when trying to use opensocial
   I created gadget with GWT using inherits
   name='com.google.gwt.gadgets.Gadgets' / and it works, but as far as I
   add implements NeedsOpenSocial and public void initializeFeature
   (OpenSocialFeature feature){ } empty method the compilation fails..
   here is output:
   ---
   a...@arto-laptop:~/workspace/HelloGadget$ ./HelloGadget-compile
   Removing units with errors
     [ERROR] Errors in 'file:/home/arto/workspace/HelloGadget/src/com/
   agiletwo/gadget/gwt/client/HelloGadget.java'
        [ERROR] Line 30: No source code is available for type
   com.google.gwt.opensocial.client.NeedsOpenSocial; did you forget to
   inherit a required module?
        [ERROR] Line 31: No source code is available for type
   com.google.gwt.opensocial.client.OpenSocialFeature; did you forget to
   inherit a required module?
   Compiling module com.agiletwo.gadget.gwt.HelloGadget
   Computing all possible rebind results for
   'com.agiletwo.gadget.gwt.client.HelloGadget'
     Rebinding com.agiletwo.gadget.gwt.client.HelloGadget
        Checking rule generate-with
   class='com.google.gwt.gadgets.rebind.UserPreferencesGenerator'/
           [ERROR] Unable to find type
   'com.agiletwo.gadget.gwt.client.HelloGadget'
              [ERROR] Hint: Previous compiler errors may have made this
   type unavailable
              [ERROR] Hint: Check the inheritance chain from your
   module; it may not be inheriting a required module or a module may not
   be adding its source path entries properly
   [ERROR] Build failed
   
   i builded gwt-opensocial.jar by checking out source from svn and
   running ANT
   Please tell me how can I fix the issue

   --
   Eric Z. Ayers - GWT Team - Atlanta, GA USA
  http://code.google.com/webtoolkit/

  --
  Davide Cerbo
  ---
 http://www.pronetics.it
 http://www.sourcesense.com
 http://www.jesty.it
 http://jugsalerno.wordpress.com
  ---

 --
 Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post 

Re: Gilead 1.2.2

2009-03-12 Thread Itamar Ravid
Right, so today I added a null check condition on the getters and setters,
that solved the problem. However, it seems like a workaround - shouldn't
beanlib check for corner cases like these? For example, build a dependency
tree between getters and copy them in the correct order. Should I forward
this report to the beanlib developers?

On Thu, Mar 12, 2009 at 12:49 PM, noon bruno.marches...@gmail.com wrote:


 Hi,

 First, thanks for the feedback : it is always nice to read that Gilead
 is used and helps :)

 About your issue, your analysis is right.
 Possible workarounds would be :
- add @ServerOnly annotation on your statusName getter and setter
 (Gilead will prevent it to be cloned and merged by beanlib)
- just add a null check condition in your statusName getter and
 setter

 Regards
 Bruno

 On 12 mar, 00:06, Itamar Ravid itamar.ira...@gmail.com wrote:
  Hi Bruno - first off, thanks for all of your hard work. Your project is a
  real life-saver, and we're using it extensively in our project.
 
  I'd like to report a bug. I have not tested yet with gilead 1.2.2, but
 I'd
  like to report it anyway.
 
  Assume two classes:
 
  public class Status {
  Long id;
  String name;
 
  public Long getId() { ... }
  public Long setId(Long id) { ... }
  public String getName() { ... }
  public Long setName(String name) { ... }
 
  }
 
  public class Ticket {
  Status status;
 
  public Status getStatus() { ... }
  public Status setStatus(Status status) { ... }
 
  public String getStatusName() { return getStatus().getName(); }
  public String setStatusName(String name) { getStatus().setName(name);
 }
 
  }
 
  I've omitted the getters and setters for brevity, as I assume their
 contents
  is well known. The problem occurs when serializing a Ticket instance. I
  suspect that the problem lies in beanlib, though I wanted to consult you
  first.
 
  While serializing a Ticket, I receive a NullPointerException, while
 beanlib
  tries to access the delegate method getStatusName in Ticket. I've come to
  suspect, through debugging, that this happens since beanlib tries to copy
  the statusName property (which does not exist) -before- copying the
 status
  property. It'd be great if you could confirm my assumptions. For now,
 we've
  prefixed all delegate methods with an underscore, to prevent beanlib from
  recognizing them as property getters/setters.
 
  Any thoughts?
 
  On Wed, Mar 11, 2009 at 11:30 PM, noon bruno.marches...@gmail.com
 wrote:
 
   Gilead library permits you to send Persistent entities (and especially
   the partially loaded ones) to the GWT  client side without pain.
 
   This release is a maintenance one, fixing half a dozen bugs, and
   providing many improvements (see release notes for details).
 
   A particular work was made on improving clone performances.
 
   Also note that hibernate-jpa-util have been now merged with hibernate-
   util JAR, and some integration classes for JBoss and Spring are now
   provided.
 
   Hope this helps !
   Bruno
 


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



Re: Running HTTPServlet alongside RemoteServiceServlet in Tomcat

2009-03-12 Thread Feltros

I uncovered the error as an extremely simple mistake in my servlet
location naming convention which was causing nothing to be run, and no
errors to be printed. Why is it that Tomcat doesn't log when an item/
servlet is requested which doesn't exist lol? GWT detects this error
when your running in normal/hosted mode. Would have made this mistake
so much clearer. It was the difference between /albumUpload and /
AlbumUpload in the web.xml and project.gwt.xml lol.

Your other comments have been massively helpful, and despite having
read in tutorials and on other posts here that getting HTTPServlets to
run with RPCServlets is tricky, I have to agree with yourself and say
there isn't any trick to it other than having a good solid
configuration in place.

Thanks again :) I had spent at least 100 hours trying to track down
the issues in running this and never thought to double check
capitalisation.

On Mar 12, 7:28 pm, Isaac Truett itru...@gmail.com wrote:
 On Thu, Mar 12, 2009 at 3:01 PM, Feltros felt...@gmail.com wrote:

  Oh no sorry when I said the rather peculiar way, its the same peculiar
  way you have to do it in GWT - as in you create a 'form' with the
  target of your form-receiving-servlet (In my case
  AlbumUploadController) which has some subelements which are fileupload
  boxes. The implementation would be exactly the same in GWT and both
  were tested. Didn't even mean to mention GXT lol :P I only said
  'peculiar' because its not the normal way you'd reference a servlet
  which responded to a GET activity like /returnPictures?
  img=someimg.jpg or the way you use RPCServlets.

 Oh, well. Can't always get away with a simple
 blame-the-third-party-library. Just to narrow things down a bit, is
 the form is actually being submitted? Firebug's useful for checking
 that sort of thing, if you develop with Firefox.

  A few questions to yourself then if you wouldn't mind assisting me in
  a few things?

 Not at all.

  When creating your war do you leave your front end bits in the www/
  com.Blah.blah/ directory, or do you move them to the root of the WAR
  file for simpler URL's? (This isn't perhaps related to my error but
  i'd be interested to know if the location of the front end has a
  bearing on how you should call server side bits and where it should
  'properly' be).

 Yes, I rebase everything to the web root. It does make it easier to
 keep track of what each URL is relative to.

  In any of the HTTPServlets you run how do you handle errors? Are they
  thrown for Tomcat to deal with, do you catch them and do
  error.printStackTrace() or do you handle them some other way to get
  them to end up in the logs?

 My current approach:

 I catch declared exceptions and log them (java.util.logging, or your
 preference of logger). Not every exception is a dire emergency, of
 course, so a lot of benign things like a request for an invalid record
 ID might be logged at INFO level or lower. For routine errors like
 that, I'll set the HTTP status (404 seems appropriate for an ID not
 found scenario) and leave it at that. For something worse (gee,
 suddenly I can't find the database) I'll throw a new ServletException
 with an appropriate message (but not including the original exception,
 since I've already logged that).

  Thanks kindly for your help :)

 You're welcome.



  On Mar 12, 6:48 pm, Isaac Truett itru...@gmail.com wrote:
   If anyone knows of any examples of a project with an RPCServlet and
   HTTPServlet (Any kind, a picture server, a file upload receiver, etc)
   running in conjunction on the server side and they both print their
   logs in Tomcat WAR deployment correctly that would be extraordinarily
   fantastic.

  Yes, it can be done. I've done it in a couple of different projects.
  Unfortunately, no, it's not something I can point you to as an
  example. But there really isn't anything tricky about it.

  You mentioned GXT; have you tried writing a simple test without GXT?
  It seems quite likely that GXT is part of your problem, especially
  given the rather peculiar way you have to do with file uploading in
  GXT to which you refer. Have you searched a GXT forum for information
  about this problem?

  On Thu, Mar 12, 2009 at 2:34 PM, Feltros felt...@gmail.com wrote:

   I have read several posts that seem to be explaining a problem similar
   to my own and yet it is constantly misinterpreted and so the replies
   are somewhat useless. I will attempt to explain the problem as clearly
   as possible:
   I have 2 server classes,
   AlbumUploader extends HTTPServlet
   ServerImpl extends RemoteServiceServlet

   In deploying these items on tomcat I have the following web.xml
   entries:
   servlet
          servlet-nameServer/servlet-name
          servlet-classcom.BTI.main.server.ServerImpl/servlet-class
   /servlet
   servlet-mapping
          servlet-nameServer/servlet-name
          url-pattern/service/url-pattern
   /servlet-mapping

   servlet
          

Re: On-The-Fly compiling

2009-03-12 Thread Sumit Chandel
Hi Michael,
This is an interesting concept, but I'm left wondering what use cases might
actually benefit from on-the-fly compilation as you're trying to do here.

Before looking into what might be going wrong when trying re-compile a
module on-the-fly when the source code changes, could you clarify the use
case you have that requires on-the-fly compilation? It seems like there must
be a better way to solve the use case that wouldn't leave users waiting for
a live GWT compilation.

Cheers,
-Sumit Chandel

On Tue, Mar 10, 2009 at 4:08 AM, Michael Wyraz mich...@wyraz.de wrote:


 My mistake. The problem occurs also on linux.

 On 10 Mrz., 09:11, Michael Wyraz mich...@wyraz.de wrote:
  The problem only occurs on my windows machine. On linux it works fine.
 


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



Re: Loading Images into GWT via MySQL

2009-03-12 Thread Itamar Ravid
The best way, IMO, is to not use GWT-RPC, but rather implement an
HttpServlet, that retrieves the data from the database and returns it with
the appropriate Content-Type in response to a GET http request. Then, you
simply place an image in your GWT code, with its source being the path to
the servlet (defined in your web.xml), passing along any parameters required
- such as the ID of the image in the database.

On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com 
fatjack1...@googlemail.com wrote:


 Hi,

 I am new to loading images into GWT from MySQL and am abit lost on the
 best way to do it.

 I already have my image in the database. How do I retrieve it? I read
 somewhere that it can just be stored as a String. Is this correct? So
 my code on the server side would look like:

 //Open database connection
 dc.openConnection();
 resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
 itemcategory_table WHERE ItemType = 'Test');

   while(resultSet.next()) {
String test = resultSet.getString(1);
 }

 dc.closeConnection();

 Or have I got this completely wrong?

 Next, I need to send this over to the client. What is the best way to
 send an image over from the server to the client and how should it be
 stored?

 Any help on how to use images would be much appreciated!

 Regards,
 Jack


 


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



Re: Loading Images into GWT via MySQL

2009-03-12 Thread fatjack1...@googlemail.com

Hi,

I'm not too sure how to implement a HTTPServlet. Does anyone know how
to use images using RPC?

Im really stuck on this.



On Mar 12, 8:43 pm, Itamar Ravid itamar.ira...@gmail.com wrote:
 The best way, IMO, is to not use GWT-RPC, but rather implement an
 HttpServlet, that retrieves the data from the database and returns it with
 the appropriate Content-Type in response to a GET http request. Then, you
 simply place an image in your GWT code, with its source being the path to
 the servlet (defined in your web.xml), passing along any parameters required
 - such as the ID of the image in the database.

 On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com 

 fatjack1...@googlemail.com wrote:

  Hi,

  I am new to loading images into GWT from MySQL and am abit lost on the
  best way to do it.

  I already have my image in the database. How do I retrieve it? I read
  somewhere that it can just be stored as a String. Is this correct? So
  my code on the server side would look like:

  //Open database connection
  dc.openConnection();
  resultSet = dc.statement.executeQuery(SELECT CategoryImage FROM
  itemcategory_table WHERE ItemType = 'Test');

    while(resultSet.next()) {
         String test = resultSet.getString(1);
  }

  dc.closeConnection();

  Or have I got this completely wrong?

  Next, I need to send this over to the client. What is the best way to
  send an image over from the server to the client and how should it be
  stored?

  Any help on how to use images would be much appreciated!

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



Re: Size policies for UI controls

2009-03-12 Thread levi.bracken

I think you'll want to let css do the styling for you and only hard
code styles, widths, etc in GWT when you absolutely have to.

Qt is a ui framework for creating desktop apps while GWT ultimately
has to run in the browser.  So Qt has a lot more freedom in how to
layout widgets while GWT (and all web frameworks) are constrained by
how the browser operates.  I think if you try to compare the two
you'll just get frustrated with all web frameworks.

Typically with the right css you can get what you want, but I've run
into a problems similar to yours and it requires a little more work in
the GWT code. If you must size Widgets to exact pixel widths/
percentages and can't achieve it with css then try creating a panel
that can size itself accordingly using .getAbsoluteLeft
(), .getOffsetWidth(), Window.getClientWidth(), etc to calculate it's
position and size.   You'll need to add a WindowResizeListener also to
fire off your resize calculations anytime the user changes the size of
the window.  Yeah it can be a lot of work, but most of the time there
is a css solution.

Try taking a look at this site, perhaps a 3 column page example can be
applied to your form.
http://pmob.co.uk/



On Mar 12, 12:02 pm, Michael mikecg...@gmail.com wrote:
 I have built a number of applications with requirements for widgets
 like labels, text boxes, rich edit controls, combo boxes, etc. When
 designing pages in a wizard or laying out controls on a typical window
 or panel, it is often desirable to have policies for specific controls
 in a layout. For example, if I had a series of a widgets laid out
 horizontally like this:

 Label - Text box - Spacer - Label - Text box - Spaces - Label -
 Text box

 When these controls are placed in a container, the desirable behaviour
 in this example is for the first and the last text box to expand when
 the container expands. Each label should remain the same size, and the
 middle text box should be a fixed size and not grow with the
 container.

 I do not know how to accomplish this using GWT. If I were using a
 toolkit like Qt, I would set the size policy for labels to be a
 fixed size and the first and last text boxes to have policies like
 minimum expanding, while the middle text box would have its geometry
 fixed to a certain pixel value like.

 The closest I have been able to accomplishing this behaviour is
 demonstrated by the following code:

 code
 package com.scalix.sac.test.client;

 import com.google.gwt.user.client.ui.*;

 public class TestContainer3 extends Composite
 {
         private class CustomContainerLeft extends Composite
         {
                 CustomContainerLeft()
                 {
                         Button button = new Button();
                         button.setText(Test);

                         initWidget(button);
                 }

         }

         private class CustomContainerRight extends Composite
         {
                 CustomContainerRight()
                 {
                         Label label1 = new Label(First item:);
                         label1.setWordWrap(false);
                         TextBox box1 = new TextBox();
                         box1.setWidth(100%);

                         Label label2 = new Label(Second item:);
                         label2.setWordWrap(false);
                         TextBox box2 = new TextBox();
                         box2.setWidth(12px);

                         Label label3 = new Label(Third item:);
                         label3.setWordWrap(false);
                         TextBox box3 = new TextBox();
                         box3.setWidth(12px);

                         Label label4 = new Label(Last item:);
                         label4.setWordWrap(false);
                         TextBox box4 = new TextBox();
                         box4.setWidth(100%);

                         HorizontalPanel panel = new HorizontalPanel();
                         panel.add(label1);
                         panel.add(box1);
                         panel.add(label2);
                         panel.add(box2);
                         panel.add(label3);
                         panel.add(box3);
                         panel.add(label4);
                         panel.add(box4);

                         initWidget(panel);
                 }

         }

         public TestContainer3()
         {
                 HorizontalSplitPanel panel = new HorizontalSplitPanel();

                 panel.setSize(100%, 100%);
                 panel.setSplitPosition(100px);

                 populateForm(panel);

                 initWidget(panel);
         }

         private void populateForm(HorizontalSplitPanel panel)
         {
                 HorizontalPanel hPanel = new HorizontalPanel();
                 hPanel.setWidth(100%);
                 hPanel.setSpacing(10);

                 CustomContainerLeft left = new CustomContainerLeft();
                 left.setWidth(100%);

                 

Re: Performance better setting attributes in CSS or in Java code?

2009-03-12 Thread Sumit Chandel
Hi John H,
I would also encourage you to check out a recent blog post on the GWT blog
by fellow GWT developers Chris Klundt and Eric Wuebben, who talk about their
strategy on applying CSS styles (link below). Hopefully from what was
discussed here and in the blog, you will be able to find out what approach
works best for you.

GWT: No need to shortchange your style:
http://googlewebtoolkit.blogspot.com/2008/12/gwt-no-need-to-shortchange-your-style.html

Regarding performance, whether you set properties like width and height in
GWT code or in CSS doesn't make a huge difference. What does matter is how
you go about applying the CSS styles (for example, how you use CSS selectors
to style your application). For this topic, you should get a good number of
reads by performing a web search for terms like CSS performance.

Hope that helps,
-Sumit Chandel

On Mon, Mar 9, 2009 at 9:06 PM, John H johntan...@gmail.com wrote:


 In general, for better performance. Would you rather

 public SomePanel extends Panel {

public SomePanel() {
setWidth(100px);
setWidth(100px);

}
..
 }

 OR

 panel-style {
width: 100px;
height: 100px;
 }

 I tend to try setting every css style attribute during the creation of
 a panel object just cause I think it's more readable and more flexible
 to organize code outside of CSS style sheets. But is this a better
 approach trying to achieve better performance or not or does it really
 matter?

 


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



Re: Need cross-(sub)domain scripting, pretty sure xs linker's not gonna help me

2009-03-12 Thread Sumit Chandel
Hi Jennifer,
The xs linker is useful when you want to load up a GWT application in a
cross-domain fashion. So, for example, if your host HTML page is living on
foo.com and you wanted to load a GWT application whose JS files reside at
bar.com, you could do so if the GWT application files were generated with
the xs linker to emit the cross-site bootstrap script.

In the case of what you're trying to do, you're right in that the xs linker
probably won't be much help to you. What would help you is to make sure
you've exposed the GWT methods you want to call in such a way that you can
invoke them from your registerPage() function. So, for now, could you
explain how you're making calls to your GWT methods from the registerPage()
function? Also, how are these function calls failing in the current setup?
What error messages do you get?

Hope that helps,
-Sumit Chandel

On Tue, Mar 10, 2009 at 3:08 PM, Jennifer jgru...@gmail.com wrote:


 My use case is this: I have a parent frame with navigation menus
 implemented in GWT and a content iframe that can contain pages from
 different sub-domains.  The pages in the content frame call a non-GWT
 Javascript function in the parent frame called registerPage().  The
 registerPage() function then calls functions that have been defined
 from within my GWT app in that frame.  The GWT app and the parent
 frame HTML are both on the same server.

 Being able to call top.registerPage() from my content iframe should be
 as simple as setting document.domain in both frames, but this causes
 problems with GWT.

 I'm pretty sure that the xs linker is useless to me in this case.  If
 not, I sure haven't been able to find anything documented that tells
 me how to get it to work - everything I read says to set the linker
 and you're set, there's no more to it.  I can't even find good
 documentation telling me what cases it's supposed to work for.

 So is there anything I can do for getting cross-frame, cross-sub-
 domain scripting working with GWT in the mix?

 Thanks for any help,
 Jennifer

 


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



Re: Exception in compile

2009-03-12 Thread hooly.jia

Can somebody 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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Plugin based gwt web application

2009-03-12 Thread Vitali Lovich
I'm pretty sure that you need an entry point to compile a module.  My
abstract method approach should do it for you.

The obfuscated code is just javascript which I explained to you how to
load.

As for the drag and drop, just search up drag  drop on GWT - I'm pretty
sure there's support for it.


On Fri, Mar 13, 2009 at 12:38 AM, Rosh PR open@gmail.com wrote:

 Hi Matías  Vitali
 You are right about the Pointers
 a) Know what plugins exists, a registry of plugins
 b) Attach them into a panel, listen events and useful stuff

 We have exactly followed the same approach as you have mentioned for
 installing the
 plugin into a directory  setting up a file with the list of plugins
 installed.

 But some of the issues I'm facing are
   *   getting to compile a plugin without any entrypoint to Javascript.
   *   Then the second biggest issue is getting the obfuscated code loaded
 by the framework.
   *   Even if i manage to load it using some of the options you have
 mentioned, The plugins should be able to interact
   be able to interact between them selfs like drag an object from one
 plugin and drop it in to another.

 Are totally unaware of most of options mentioned by Vitali. I shall give it
 a try. If you guys have any thing more
 solid and you feel it will work, Let me know about it.

 I think GWt should be coming up with some way we can load there Obfuscated
 code dynamically.

 Thanks a lot guys.


 On Fri, Mar 13, 2009 at 1:00 AM, Vitali Lovich vlov...@gmail.com wrote:

 Oh, and the RootPanel way of dynamically adding the plugin's javascript
 will probably only work in onModuleLoad.  The DOM approach I gave should
 work at any time (i.e. as a response to user action).


 On Thu, Mar 12, 2009 at 3:21 PM, Vitali Lovich vlov...@gmail.com wrote:

 Uggh - sorry.  Gmail decided to send the message for me.  I've completed
 the class below.

 Anyways, plugins would extend PluginEntry.  Again, your GWT would be
 reponsible for actually injecting the plugin javascript into your page. Not
 sure what the GWT-preferred way would be, but in theory (I haven't tried
 this out), you might be able to do a RootPanel.get().add(new HTML(script
 src='plugin/to/load'/)), although I'd test it first (I highly doubt this
 would work).

 A more explicit approach might be:

 Document dom = Document.get();
 Element head = dom.getElementsByTagName(head).getItem(0);
 Element pluginScript = dom.createElement(script);
 pluginScript.setPropertyString(src, plugin.js);
 pluginScript.setPropertyString(type, text/javascript);
 Document.appendChild(head, pluginScript);

 This should work (assuming the browser supports loading scripts added
 dynamically to the head element).  I'd recommend testing this on several
 browsers - I'm not sure which support it (although I suspect all of the
 major ones).

 Good luck.

 On Thu, Mar 12, 2009 at 3:03 PM, Vitali Lovich vlov...@gmail.comwrote:

 Well, one thing you can do is have the EntryPoint, and just tell plugin
 developers that they have to attach to some particular div element in a
 particular way, as opposed to the traditional root (i.e.
 RootPanel.get(plugin-name-div)).

 Then the user can request certain plugins to be added in which your GWT
 code should create the div's for those plugins and load their scripts.

 Hope this helps you get started.  Also, I would recommend staying away
 from JSNI if you're not doing something that is absolutely not supported
 within the GWT framework.

 Just as an extension to the Java approach below, I would prefer
 something like:

 public abstract class PluginEntry implements EntryPoint
 {
  String name;

  publc PluginEntry(String pluginName)
  {
name = pluginName;
  }

 public final void onModuleEntry()
 {

  RootPanel pluginPanel = RootPanel.get(plugins-location);

  pluginPanel.add(new HTML(div id=' + name + '/div));

  onPluginEntry(RootPanel.get(name));

 }

 protected abstract void onPluginEntry(RootPanel pluginPanel);

  }

 On Thu, Mar 12, 2009 at 2:13 PM, Matías Costa m.costac...@gmail.comwrote:

 On Thu, Mar 12, 2009 at 5:40 PM, Rosh PR open@gmail.com wrote:

 One of the problems I'm facing over here is how will i compile a
 small set of gwt code with out any EntryPoint and use the
 generated *javascript* from the framework. I know we can compile
 without the Entrypoint but the main problem I'm facing is compiling
 code to javascript instead of java classes and loading it to the
 framework which will have to use these JS and display the plugin
 widget on the framework console on runtime.


 Interesting problem.

 This is going to need some kind of infraestructure and policy. I am
 just thinking out loud waiting more experienced people point problems and
 what can work. To start you need two things:

 a) Know what plugins exists, a registry of plugins
 b) Attach them into a panel, listen events and useful stuff

 To install the plugins you can drop them 

[gwt-contrib] Re: Reliable Array vs. Object detection in JSONParser

2009-03-12 Thread Joel Webber
Wow. Just wow. It never ceases to amaze me how esoteric simple type
introspection can be in Javascript :)
Yes, we should patch this in, and perhaps as a side-effect encode this (and
other?) Javascript type tests into the core module somewhere. I'll create an
issue so we don't lose track, and take a stab at a patch momentarily.

On Wed, Mar 11, 2009 at 8:07 PM, Thomas Broyer t.bro...@gmail.com wrote:


 From JSONParser.createObject:
} else if (o instanceof Array || o instanceof $wnd.Array) {
  // Looks like an Array; wrap as JSONArray.
  // NOTE: this test can fail for objects coming from a different
 window,
  // but we know of no reliable tests to determine if something is
 an Array
  // in all cases.
  return @com.google.gwt.json.client.JSONArray::new(Lcom/google/
 gwt/core/client/JavaScriptObject;)(o);


 Fortunately, Mark Miller (a Googler!) found a reliable solution:

   Object.prototype.toString.apply(value) === '[object Array]'

 See Doug Crockford's comment:
 http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=916

 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: JavaScript Bundling

2009-03-12 Thread Bruce Johnson
On Wed, Mar 11, 2009 at 9:32 PM, Thomas Broyer t.bro...@gmail.com wrote:

 a) use a GWT Linker [1,2] to prepend scripts dependencies (script/
 in your modules' gwt.xml) to the selection script; the problem is that
 the selection script isn't (shouldn't be) cached, so it should remain
 as small as possible.


It's good to paranoid about the speed of the selection script download, but
in practice this probably isn't so bad if you have properly configured HTTP
headers. The exact semantics for the selection scripts are must revalidate
rather than cannot cache. In other words, an If-Modified-Since request for
the selection script should be returning Not Modified except when the app
is actually redeployed on the server.

Thus, I kinda like (a).

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Reliable Array vs. Object detection in JSONParser

2009-03-12 Thread John Tamplin
On Thu, Mar 12, 2009 at 10:47 AM, Joel Webber j...@google.com wrote:

 Wow. Just wow. It never ceases to amaze me how esoteric simple type
 introspection can be in Javascript :)
 Yes, we should patch this in, and perhaps as a side-effect encode this (and
 other?) Javascript type tests into the core module somewhere. I'll create an
 issue so we don't lose track, and take a stab at a patch momentarily.


I worry about relying on the toString output to tell what type it is -- what
if a future browser/JS engine changes it slightly?  Can we at least add a
test to verify this so at least we will know if it blows up?

-- 
John A. Tamplin
Software Engineer (GWT), Google

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: JavaScript Bundling

2009-03-12 Thread Allahbaksh Asadullah
Hi,
As I have too many JavaScript file and most of them are static and are in
Apache or BSD licence. So it doesnot make any difference if I combine all
the JavaScript into a single file. Is it a recommended way? Using GWT Linker
as Bruce and Thomas say is most appropriate way? What are the performance
aspects? Are there any plans to have exclusive javascript bundling?
Regards,
allahbaksh

On Thu, Mar 12, 2009 at 8:28 PM, Bruce Johnson br...@google.com wrote:

 On Wed, Mar 11, 2009 at 9:32 PM, Thomas Broyer t.bro...@gmail.com wrote:

 a) use a GWT Linker [1,2] to prepend scripts dependencies (script/
 in your modules' gwt.xml) to the selection script; the problem is that
 the selection script isn't (shouldn't be) cached, so it should remain
 as small as possible.


 It's good to paranoid about the speed of the selection script download, but
 in practice this probably isn't so bad if you have properly configured HTTP
 headers. The exact semantics for the selection scripts are must revalidate
 rather than cannot cache. In other words, an If-Modified-Since request for
 the selection script should be returning Not Modified except when the app
 is actually redeployed on the server.

 Thus, I kinda like (a).




 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Reliable Array vs. Object detection in JSONParser

2009-03-12 Thread James Robinson
FWIW, ECMA-262 says:
15.2.4.2 Object.prototype.toString ( )
When the toString method is called, the following steps are taken:
1. Get the [[Class]] property of this object.
2. Compute a string value by concatenating the three strings [object ,
Result(1), and ].
3. Return Result(2).

and..

15.4.2.1 new Array ( [ item0 [ , item1 [ , … ] ] ] )
This description applies if and only if the Array constructor is given no
arguments or at least two
arguments.
The [[Prototype]] property of the newly constructed object is set to the
original Array prototype
object, the one that is the initial value of Array.prototype (15.4.3.1).
The [[Class]] property of the newly constructed object is set to Array.

- James

On Thu, Mar 12, 2009 at 11:01 AM, John Tamplin j...@google.com wrote:

 On Thu, Mar 12, 2009 at 10:47 AM, Joel Webber j...@google.com wrote:

 Wow. Just wow. It never ceases to amaze me how esoteric simple type
 introspection can be in Javascript :)
 Yes, we should patch this in, and perhaps as a side-effect encode this
 (and other?) Javascript type tests into the core module somewhere. I'll
 create an issue so we don't lose track, and take a stab at a patch
 momentarily.


 I worry about relying on the toString output to tell what type it is --
 what if a future browser/JS engine changes it slightly?  Can we at least add
 a test to verify this so at least we will know if it blows up?

 --
 John A. Tamplin
 Software Engineer (GWT), Google


 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Reliable Array vs. Object detection in JSONParser

2009-03-12 Thread Joel Webber
Damn, you stole my thunder. I made the same sort of argument when jlabanca
wanted to use Function.toString() to get reliably evaluable function text --
I said something like there's no way in hell that's actually in the spec.
It still frightens me that I was completely wrong about that :)

On Thu, Mar 12, 2009 at 11:56 AM, James Robinson jam...@google.com wrote:

 FWIW, ECMA-262 says:
 15.2.4.2 Object.prototype.toString ( )
 When the toString method is called, the following steps are taken:
 1. Get the [[Class]] property of this object.
 2. Compute a string value by concatenating the three strings [object ,
 Result(1), and ].
 3. Return Result(2).

 and..

 15.4.2.1 new Array ( [ item0 [ , item1 [ , … ] ] ] )
 This description applies if and only if the Array constructor is given no
 arguments or at least two
 arguments.
 The [[Prototype]] property of the newly constructed object is set to the
 original Array prototype
 object, the one that is the initial value of Array.prototype (15.4.3.1).
 The [[Class]] property of the newly constructed object is set to Array.

 - James

 On Thu, Mar 12, 2009 at 11:01 AM, John Tamplin j...@google.com wrote:

 On Thu, Mar 12, 2009 at 10:47 AM, Joel Webber j...@google.com wrote:

 Wow. Just wow. It never ceases to amaze me how esoteric simple type
 introspection can be in Javascript :)
 Yes, we should patch this in, and perhaps as a side-effect encode this
 (and other?) Javascript type tests into the core module somewhere. I'll
 create an issue so we don't lose track, and take a stab at a patch
 momentarily.


 I worry about relying on the toString output to tell what type it is --
 what if a future browser/JS engine changes it slightly?  Can we at least add
 a test to verify this so at least we will know if it blows up?

 --
 John A. Tamplin
 Software Engineer (GWT), Google





 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Reliable Array vs. Object detection in JSONParser

2009-03-12 Thread Scott Blum
There's 3 open 
issueshttp://code.google.com/p/google-web-toolkit/issues/list?can=2q=jsonparseron
JSONParser.

While we're in there, it seems like we should hit #1749.

On Thu, Mar 12, 2009 at 11:59 AM, Joel Webber j...@google.com wrote:

 Damn, you stole my thunder. I made the same sort of argument when jlabanca
 wanted to use Function.toString() to get reliably evaluable function text --
 I said something like there's no way in hell that's actually in the spec.
 It still frightens me that I was completely wrong about that :)

 On Thu, Mar 12, 2009 at 11:56 AM, James Robinson jam...@google.comwrote:

 FWIW, ECMA-262 says:
 15.2.4.2 Object.prototype.toString ( )
 When the toString method is called, the following steps are taken:
 1. Get the [[Class]] property of this object.
 2. Compute a string value by concatenating the three strings [object ,
 Result(1), and ].
 3. Return Result(2).

 and..

 15.4.2.1 new Array ( [ item0 [ , item1 [ , … ] ] ] )
 This description applies if and only if the Array constructor is given no
 arguments or at least two
 arguments.
 The [[Prototype]] property of the newly constructed object is set to the
 original Array prototype
 object, the one that is the initial value of Array.prototype (15.4.3.1).
 The [[Class]] property of the newly constructed object is set to Array.

 - James

 On Thu, Mar 12, 2009 at 11:01 AM, John Tamplin j...@google.com wrote:

 On Thu, Mar 12, 2009 at 10:47 AM, Joel Webber j...@google.com wrote:

 Wow. Just wow. It never ceases to amaze me how esoteric simple type
 introspection can be in Javascript :)
 Yes, we should patch this in, and perhaps as a side-effect encode this
 (and other?) Javascript type tests into the core module somewhere. I'll
 create an issue so we don't lose track, and take a stab at a patch
 momentarily.


 I worry about relying on the toString output to tell what type it is --
 what if a future browser/JS engine changes it slightly?  Can we at least add
 a test to verify this so at least we will know if it blows up?

 --
 John A. Tamplin
 Software Engineer (GWT), Google








 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Reliable Array vs. Object detection in JSONParser

2009-03-12 Thread Joel Webber
I'll have a look after I get my 1.6 stuff done.

On Thu, Mar 12, 2009 at 12:09 PM, Scott Blum sco...@google.com wrote:

 There's 3 open 
 issueshttp://code.google.com/p/google-web-toolkit/issues/list?can=2q=jsonparseron
  JSONParser.

 While we're in there, it seems like we should hit #1749.

 On Thu, Mar 12, 2009 at 11:59 AM, Joel Webber j...@google.com wrote:

 Damn, you stole my thunder. I made the same sort of argument when jlabanca
 wanted to use Function.toString() to get reliably evaluable function text --
 I said something like there's no way in hell that's actually in the spec.
 It still frightens me that I was completely wrong about that :)

 On Thu, Mar 12, 2009 at 11:56 AM, James Robinson jam...@google.comwrote:

 FWIW, ECMA-262 says:
 15.2.4.2 Object.prototype.toString ( )
 When the toString method is called, the following steps are taken:
 1. Get the [[Class]] property of this object.
 2. Compute a string value by concatenating the three strings [object ,
 Result(1), and ].
 3. Return Result(2).

 and..

 15.4.2.1 new Array ( [ item0 [ , item1 [ , … ] ] ] )
 This description applies if and only if the Array constructor is given no
 arguments or at least two
 arguments.
 The [[Prototype]] property of the newly constructed object is set to the
 original Array prototype
 object, the one that is the initial value of Array.prototype (15.4.3.1).
 The [[Class]] property of the newly constructed object is set to Array.

 - James

 On Thu, Mar 12, 2009 at 11:01 AM, John Tamplin j...@google.com wrote:

 On Thu, Mar 12, 2009 at 10:47 AM, Joel Webber j...@google.com wrote:

 Wow. Just wow. It never ceases to amaze me how esoteric simple type
 introspection can be in Javascript :)
 Yes, we should patch this in, and perhaps as a side-effect encode this
 (and other?) Javascript type tests into the core module somewhere. I'll
 create an issue so we don't lose track, and take a stab at a patch
 momentarily.


 I worry about relying on the toString output to tell what type it is --
 what if a future browser/JS engine changes it slightly?  Can we at least 
 add
 a test to verify this so at least we will know if it blows up?

 --
 John A. Tamplin
 Software Engineer (GWT), Google











 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Review: ant SvnInfo task also try git

2009-03-12 Thread Freeland Abbott
Sorry for the lag...

   1. Why'd you specify branch  revision as transient?  Not clearly wrong,
   just seems unnecessary.
   2. You're changing the branch output from my just the last term spec to
   full branch path from repo root, right?  That's surely more correctly
   complete, but may make the tag a bit unwieldy.  It's got some ripple effects
   in other tools we have, if we're changing spec.  (I don't feel strongly,
   though I'd originally take the last-term as almost surely unique and
   mildly more usable.)
   3. Making svnversion optional doesn't distress me (and I assume git can't
   offer it), but it does potentially allow people to misrepresent builds as
   being rNNN, when they're actually arbitrary local mods from NNN, perhaps
   including split-version checkouts, but certainly including local edits.  Do
   we want the imprecision recorded somehow, if svnversion isn't present?
(This isn't entirely theoretical; both Ray and Joel have accidentally had
   mixed-version workspaces, though only by branch-info.txt being off-base
   w.r.t. the rest.)


On Sat, Mar 7, 2009 at 5:33 AM, Scott Blum sco...@google.com wrote:

 Hey Freeland,
 I hacked on SvnInfo a bit to do the following things:

 1) If .svn/ isn't present but .git/ is, use git svn info.

 2) A more surefire way of figuring out exactly what branch we're on.  Note
 the behavior change for a release branch: whereas before you'd get 1...@
 you'll now get releases/1...@.  To me this seems like an improvement.

 3) Make svnserve's success optional; use whatever rev you got from svn
 info if it doesn't run.  I don't feel strongly about this bit, just thought
 it might be okay to be more lenient.

 Thanks,
 Scott



--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Review: ant SvnInfo task also try git

2009-03-12 Thread Ray Ryan
+1 on point three. Please do something to the string to make it clear that
svnversion wasn't used. 1234 (svn info), e.g.
rjrjr

On Thu, Mar 12, 2009 at 10:22 AM, Freeland Abbott 
gwt.team.fabb...@gmail.com wrote:

 Sorry for the lag...

1. Why'd you specify branch  revision as transient?  Not clearly
wrong, just seems unnecessary.
2. You're changing the branch output from my just the last term spec
to full branch path from repo root, right?  That's surely more correctly
complete, but may make the tag a bit unwieldy.  It's got some ripple 
 effects
in other tools we have, if we're changing spec.  (I don't feel strongly,
though I'd originally take the last-term as almost surely unique and
mildly more usable.)
3. Making svnversion optional doesn't distress me (and I assume git
can't offer it), but it does potentially allow people to misrepresent 
 builds
as being rNNN, when they're actually arbitrary local mods from NNN, perhaps
including split-version checkouts, but certainly including local edits.  Do
we want the imprecision recorded somehow, if svnversion isn't present?
 (This isn't entirely theoretical; both Ray and Joel have accidentally had
mixed-version workspaces, though only by branch-info.txt being off-base
w.r.t. the rest.)


 On Sat, Mar 7, 2009 at 5:33 AM, Scott Blum sco...@google.com wrote:

 Hey Freeland,
 I hacked on SvnInfo a bit to do the following things:

 1) If .svn/ isn't present but .git/ is, use git svn info.

 2) A more surefire way of figuring out exactly what branch we're on.  Note
 the behavior change for a release branch: whereas before you'd get 
 1...@
 you'll now get releases/1...@.  To me this seems like an
 improvement.

 3) Make svnserve's success optional; use whatever rev you got from svn
 info if it doesn't run.  I don't feel strongly about this bit, just thought
 it might be okay to be more lenient.

 Thanks,
 Scott



 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Review: ant SvnInfo task also try git

2009-03-12 Thread Freeland Abbott
I was thinking of, following the flavor of svnversion, 1234? or ~1234, but
either way.

On Thu, Mar 12, 2009 at 1:27 PM, Ray Ryan rj...@google.com wrote:

 +1 on point three. Please do something to the string to make it clear that
 svnversion wasn't used. 1234 (svn info), e.g.
 rjrjr


 On Thu, Mar 12, 2009 at 10:22 AM, Freeland Abbott 
 gwt.team.fabb...@gmail.com wrote:

 Sorry for the lag...

1. Why'd you specify branch  revision as transient?  Not clearly
wrong, just seems unnecessary.
2. You're changing the branch output from my just the last term spec
to full branch path from repo root, right?  That's surely more correctly
complete, but may make the tag a bit unwieldy.  It's got some ripple 
 effects
in other tools we have, if we're changing spec.  (I don't feel strongly,
though I'd originally take the last-term as almost surely unique and
mildly more usable.)
3. Making svnversion optional doesn't distress me (and I assume git
can't offer it), but it does potentially allow people to misrepresent 
 builds
as being rNNN, when they're actually arbitrary local mods from NNN, 
 perhaps
including split-version checkouts, but certainly including local edits.  
 Do
we want the imprecision recorded somehow, if svnversion isn't present?
 (This isn't entirely theoretical; both Ray and Joel have accidentally had
mixed-version workspaces, though only by branch-info.txt being off-base
w.r.t. the rest.)


 On Sat, Mar 7, 2009 at 5:33 AM, Scott Blum sco...@google.com wrote:

 Hey Freeland,
 I hacked on SvnInfo a bit to do the following things:

 1) If .svn/ isn't present but .git/ is, use git svn info.

 2) A more surefire way of figuring out exactly what branch we're on.
  Note the behavior change for a release branch: whereas before you'd get
 1...@ you'll now get releases/1...@.  To me this seems like an
 improvement.

 3) Make svnserve's success optional; use whatever rev you got from svn
 info if it doesn't run.  I don't feel strongly about this bit, just thought
 it might be okay to be more lenient.

 Thanks,
 Scott






 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Review: ant SvnInfo task also try git

2009-03-12 Thread Scott Blum
On Thu, Mar 12, 2009 at 1:22 PM, Freeland Abbott gwt.team.fabb...@gmail.com
 wrote:

 Sorry for the lag...

1. Why'd you specify branch  revision as transient?  Not clearly
wrong, just seems unnecessary.

 To reflect the fact that their state is not persistent, they change and are
clobbered during the course of 'execute'.  They are basically only instance
variables as a convenience.


1. You're changing the branch output from my just the last term spec
to full branch path from repo root, right?  That's surely more correctly
complete, but may make the tag a bit unwieldy.  It's got some ripple 
 effects
in other tools we have, if we're changing spec.  (I don't feel strongly,
though I'd originally take the last-term as almost surely unique and
mildly more usable.)

 I feel pretty strongly that we want the full tag from the svn root.
 Otherwise, the build contains insufficient data.  You could imagine two
different people building from change branches within their own username
that happen to be named the same, e.g. changes/bobv/soyc vs.
changes/spoon/soyc.  I'd rather fix any downstream tooling.


1. Making svnversion optional doesn't distress me (and I assume git
can't offer it), but it does potentially allow people to misrepresent 
 builds
as being rNNN, when they're actually arbitrary local mods from NNN, perhaps
including split-version checkouts, but certainly including local edits.  Do
we want the imprecision recorded somehow, if svnversion isn't present?
 (This isn't entirely theoretical; both Ray and Joel have accidentally had
mixed-version workspaces, though only by branch-info.txt being off-base
w.r.t. the rest.)

 Lemme look into this.. I can almost certainly use some extra git commands
to determine precisely whether or not there are local mods.  The sweet thing
about git (unlike svn) is you'll never get more than one svn revision.. it's
just not possible.  So the only possibilities are releases/1...@
or releases/1...@m.

--Scott

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Review: ant SvnInfo task also try git

2009-03-12 Thread Scott Blum
Freeland, I decided to stage this in two sequential patches (and commits) to
make it easier to review and see the log.  Here's patch #1, which merely
refactors the existing code to make it testable, and also makes the change
in how the branch specifier is computed.
The next patch, to actually add git support, should be small relative to
this.

Thanks!
Scott

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



svninfo-initial-cut.patch
Description: Binary data


[gwt-contrib] Re: Review: ant SvnInfo task also try git

2009-03-12 Thread Freeland Abbott
LGTM.  Clearly there could be more tests (e.g. of ...NoErr), but I'm not
going to hold back moving from none to some for that!

On Thu, Mar 12, 2009 at 7:01 PM, Scott Blum sco...@google.com wrote:

 Freeland, I decided to stage this in two sequential patches (and commits)
 to make it easier to review and see the log.  Here's patch #1, which merely
 refactors the existing code to make it testable, and also makes the change
 in how the branch specifier is computed.
 The next patch, to actually add git support, should be small relative to
 this.

 Thanks!
 Scott



--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Relaxing constraints on GWT.create()

2009-03-12 Thread Ian Petersen

Seems like this might be related to
http://code.google.com/p/google-web-toolkit/issues/detail?id=2243

I like the idea.

Ian

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Review: ant SvnInfo task also try git

2009-03-12 Thread Freeland Abbott
LGTM (though I'll admit to never touching git, so I'm going on faith for
that downstream interface!)

On Thu, Mar 12, 2009 at 8:24 PM, Scott Blum sco...@google.com wrote:

 Sweet!  Here's patch #2 that adds git support, as well as a combined patch
 for both.  (I also included a slightly tweaked patch #1 from the previous
 one I sent).
 I'll go ahead and commit #1.

 --Scott, powered by git


 On Thu, Mar 12, 2009 at 7:56 PM, Freeland Abbott 
 gwt.team.fabb...@gmail.com wrote:

 LGTM.  Clearly there could be more tests (e.g. of ...NoErr), but I'm not
 going to hold back moving from none to some for that!


 On Thu, Mar 12, 2009 at 7:01 PM, Scott Blum sco...@google.com wrote:

 Freeland, I decided to stage this in two sequential patches (and commits)
 to make it easier to review and see the log.  Here's patch #1, which merely
 refactors the existing code to make it testable, and also makes the change
 in how the branch specifier is computed.
 The next patch, to actually add git support, should be small relative to
 this.

 Thanks!
 Scott





--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Review: ant SvnInfo task also try git

2009-03-12 Thread Scott Blum
Thanks!

On Thu, Mar 12, 2009 at 9:37 PM, Freeland Abbott gwt.team.fabb...@gmail.com
 wrote:

 LGTM (though I'll admit to never touching git, so I'm going on faith for
 that downstream interface!)


 On Thu, Mar 12, 2009 at 8:24 PM, Scott Blum sco...@google.com wrote:

 Sweet!  Here's patch #2 that adds git support, as well as a combined patch
 for both.  (I also included a slightly tweaked patch #1 from the previous
 one I sent).
 I'll go ahead and commit #1.

 --Scott, powered by git


 On Thu, Mar 12, 2009 at 7:56 PM, Freeland Abbott 
 gwt.team.fabb...@gmail.com wrote:

 LGTM.  Clearly there could be more tests (e.g. of ...NoErr), but I'm not
 going to hold back moving from none to some for that!


 On Thu, Mar 12, 2009 at 7:01 PM, Scott Blum sco...@google.com wrote:

 Freeland, I decided to stage this in two sequential patches (and
 commits) to make it easier to review and see the log.  Here's patch #1,
 which merely refactors the existing code to make it testable, and also 
 makes
 the change in how the branch specifier is computed.
 The next patch, to actually add git support, should be small relative to
 this.

 Thanks!
 Scott






--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Relaxing constraints on GWT.create()

2009-03-12 Thread Ray Cromwell

BTW,
  My proposed implementation is to rewrite these methods changing the
literal parameter to the result of invoking GWT.create() at the call
site, e.g.

interface MyService extends RemoteServiceMyServiceAsync { ... }
// example call
OAuth.withSignature(MyService.class).method1(arg1, arg2, asyncCallback);

public class OAuth {
  @GwtCreate  // method must be static, class parameter must be final
  public static S, T extends RemoteServiceS S withSignature(final
ClassT service) {
// GWT.create with non-literal ONLY allowed
// if enclosing method is @GwtCreate and
   // variable statically resolvable to literal param
S async = GWT.create(service);
((ServiceDefTarget)async).setRequestBuilderCallback(new
OAuthRequestBuilderSigner());
return async;
  }
}

after rewrite at callsite:
Object async = GWT.create(MyService.class);
OAuth.withSignature(async).method1(arg1, arg2, asyncCallback);

rewritten method:
public class OAuth {
  @GwtCreate  // method must be static, class parameter must be final
  public static S, T extends RemoteServiceS S withSignature(Object
asyncInstance) {

//S async = GWT.create(service); replaced with instance
S async = (S)asyncInstance;
((ServiceDefTarget)async).setRequestBuilderCallback(new
OAuthRequestBuilderSigner());
return async;
  }
}

This doesn't handle generator override or extra params, but it's a
start and could work with minimal changes to ReplaceRebinds.

-Ray

On Thu, Mar 12, 2009 at 7:17 PM, Ray Cromwell cromwell...@gmail.com wrote:
 Yeah, it's mostly the same as was discussed in the past. I just
 decided to resurrect the idea given that 1.6 is almost shipped to
 ensure it has a good chance of making it into the next version.

 -Ray

 On Thu, Mar 12, 2009 at 5:49 PM, Ian Petersen ispet...@gmail.com wrote:

 Seems like this might be related to
 http://code.google.com/p/google-web-toolkit/issues/detail?id=2243

 I like the idea.

 Ian

 



--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit commit] r5008 - Adding git support to the ant SvnInfo task.

2009-03-12 Thread codesite-noreply

Author: sco...@google.com
Date: Thu Mar 12 21:39:42 2009
New Revision: 5008

Modified:
 
trunk/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/CommandRunner.java
trunk/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/SvnInfo.java
 
trunk/build-tools/ant-gwt/test/com/google/gwt/ant/taskdefs/SvnInfoTest.java

Log:
Adding git support to the ant SvnInfo task.

git svn users should now be able to correctly label a build with accurate  
svn information.

Review by: fabbott

Modified:  
trunk/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/CommandRunner.java
==
---  
trunk/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/CommandRunner.java
 
(original)
+++  
trunk/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/CommandRunner.java
 
Thu Mar 12 21:39:42 2009
@@ -30,9 +30,11 @@

/**
 * Returns the output of running a command as a string. Will fail if the
-   * invoked process returns a non-zero status code.
+   * invoked process returns a non-zero status code and
+   * codecheckStatusCode/code is codetrue/code.
 */
-  public static String getCommandOutput(File workDir, String... cmd) {
+  public static String getCommandOutput(boolean checkStatusCode, File  
workDir,
+  String... cmd) {
  Process process = runCommandIgnoringErr(workDir, cmd);
  StringBuilder output = new StringBuilder();
  LineNumberReader lnr = new LineNumberReader(new InputStreamReader(
@@ -43,7 +45,7 @@
  output.append('\n');
}
int statusCode = process.waitFor();
-  if (statusCode != 0) {
+  if (checkStatusCode  statusCode != 0) {
  throw new BuildException(Non-zero status code result ( +  
statusCode
  + ) running command:  + makeCmdString(cmd));
}
@@ -55,6 +57,14 @@
throw new BuildException(Interrupted waiting for command: 
+ makeCmdString(cmd), e);
  }
+  }
+
+  /**
+   * Returns the output of running a command as a string. Will fail if the
+   * invoked process returns a non-zero status code.
+   */
+  public static String getCommandOutput(File workDir, String... cmd) {
+return getCommandOutput(true, workDir, cmd);
}

/**

Modified:  
trunk/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/SvnInfo.java
==
--- trunk/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/SvnInfo.java  
 
(original)
+++ trunk/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/SvnInfo.java  
 
Thu Mar 12 21:39:42 2009
@@ -79,6 +79,69 @@
+ URL_REGEX + )\\s*);

/**
+   * Returns true if this git working copy matches the specified svn  
revision,
+   * and also has no local modifications.
+   */
+  static boolean doesGitWorkingCopyMatchSvnRevision(File dir, String  
svnRevision) {
+String workingRev = getGitWorkingRev(dir);
+String targetRev = getGitRevForSvnRev(dir, svnRevision);
+if (!workingRev.equals(targetRev)) {
+  return false;
+}
+String status = getGitStatus(dir);
+return status.contains(nothing to commit (working directory clean));
+  }
+
+  /**
+   * Returns the git commit number matching the specified svn revision.
+   */
+  static String getGitRevForSvnRev(File dir, String svnRevision) {
+String output = CommandRunner.getCommandOutput(dir, git, svn,
+find-rev, r + svnRevision);
+output = output.trim();
+if (output.length() == 0) {
+  throw new BuildException(git svn find-rev didn't give any answer);
+}
+return output;
+  }
+
+  /**
+   * Runs git status and returns the result.
+   */
+  static String getGitStatus(File dir) {
+// git status returns 1 for a status code, so just don't check it.
+String output = CommandRunner.getCommandOutput(false,  
dir, git, status);
+if (output.length() == 0) {
+  throw new BuildException(git status didn't give any answer);
+}
+return output;
+  }
+
+  /**
+   * Runs git svn info, returning the output as a string.
+   */
+  static String getGitSvnInfo(File dir) {
+String output =  
CommandRunner.getCommandOutput(dir, git, svn, info);
+if (output.length() == 0) {
+  throw new BuildException(git svn info didn't give any answer);
+}
+return output;
+  }
+
+  /**
+   * Returns the current git commit number of the working copy.
+   */
+  static String getGitWorkingRev(File dir) {
+String output = CommandRunner.getCommandOutput(dir, git, rev-list,
+--max-count=1, HEAD);
+output = output.trim();
+if (output.length() == 0) {
+  throw new BuildException(git rev-list didn't give any answer);
+}
+return output;
+  }
+
+  /**
 * Runs svn info, returning the output as a string.
 */
static String getSvnInfo(File dir) {
@@ -101,6 +164,17 @@
  return output;
}

+  static boolean looksLikeGit(File dir) {
+dir = dir.getAbsoluteFile();
+while (dir 

[gwt-contrib] [google-web-toolkit commit] r5009 - When JUnitShell wraps exceptions from remote browsers, be sure to copy the cause.

2009-03-12 Thread codesite-noreply

Author: sco...@google.com
Date: Thu Mar 12 22:47:42 2009
New Revision: 5009

Modified:
trunk/user/src/com/google/gwt/junit/JUnitShell.java

Log:
When JUnitShell wraps exceptions from remote browsers, be sure to copy the  
cause.

Review by: jat (TBR)

Modified: trunk/user/src/com/google/gwt/junit/JUnitShell.java
==
--- trunk/user/src/com/google/gwt/junit/JUnitShell.java (original)
+++ trunk/user/src/com/google/gwt/junit/JUnitShell.java Thu Mar 12 22:47:42  
2009
@@ -702,6 +702,7 @@
AssertionFailedError newException = new AssertionFailedError(msg
+ \n + exception.getMessage());
newException.setStackTrace(exception.getStackTrace());
+  newException.initCause(exception.getCause());
exception = newException;
  } else {
exception = new RuntimeException(msg, exception);

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Relaxing constraints on GWT.create()

2009-03-12 Thread Matt Mastracci

+1 for this implementation.

This is a lot clearer than a class - implementation lookup map or  
inlining the whole method at each call site.  As long as the bytecode  
is rewritten in hosted mode to match the expected order of operations,  
there shouldn't be any surprises at compile time.

Could this cause issues with anyone running GWT.create() in server- 
side code?  Does that even work today?

On 12-Mar-09, at 10:23 PM, Ray Cromwell wrote:


 BTW,
  My proposed implementation is to rewrite these methods changing the
 literal parameter to the result of invoking GWT.create() at the call
 site, e.g.

 interface MyService extends RemoteServiceMyServiceAsync { ... }
 // example call
 OAuth.withSignature(MyService.class).method1(arg1, arg2,  
 asyncCallback);

 public class OAuth {
  @GwtCreate  // method must be static, class parameter must be final
  public static S, T extends RemoteServiceS S withSignature(final
 ClassT service) {
// GWT.create with non-literal ONLY allowed
// if enclosing method is @GwtCreate and
   // variable statically resolvable to literal param
S async = GWT.create(service);
((ServiceDefTarget)async).setRequestBuilderCallback(new
 OAuthRequestBuilderSigner());
return async;
  }
 }

 after rewrite at callsite:
 Object async = GWT.create(MyService.class);
 OAuth.withSignature(async).method1(arg1, arg2, asyncCallback);

 rewritten method:
 public class OAuth {
  @GwtCreate  // method must be static, class parameter must be final
  public static S, T extends RemoteServiceS S withSignature(Object
 asyncInstance) {

//S async = GWT.create(service); replaced with instance
S async = (S)asyncInstance;
((ServiceDefTarget)async).setRequestBuilderCallback(new
 OAuthRequestBuilderSigner());
return async;
  }
 }

 This doesn't handle generator override or extra params, but it's a
 start and could work with minimal changes to ReplaceRebinds.

 -Ray

 On Thu, Mar 12, 2009 at 7:17 PM, Ray Cromwell  
 cromwell...@gmail.com wrote:
 Yeah, it's mostly the same as was discussed in the past. I just
 decided to resurrect the idea given that 1.6 is almost shipped to
 ensure it has a good chance of making it into the next version.

 -Ray

 On Thu, Mar 12, 2009 at 5:49 PM, Ian Petersen ispet...@gmail.com  
 wrote:

 Seems like this might be related to
 http://code.google.com/p/google-web-toolkit/issues/detail?id=2243

 I like the idea.

 Ian





 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---