Re: gwt application does not run ie7

2009-09-02 Thread aftershock

Looking at the IE version, it looks like you have a version which
works and not the version that does not work.

Do you mind if I ask you something else?

In IE,I can see a wide line before the embedded application. I tried
to make it disappear but I could not se far.
How can I remove that?

-I tried changing the tag of embedding application from div to span.no
effect.
-I tried display: block-inline style. no effect.
-I tried to set padding and margin of body to 0. no effect.


--~--~-~--~~~---~--~~
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: Help using comet in tomcat

2009-09-02 Thread abhiram

Hi,

  Sorry that I am replying this late. But try to import the
catalina.jar file into your project. U can find that in the lib folder
within your tomcat folder. Once you
do that, this error would disappear.

HTH,
Abhiram

On Aug 1, 4:35 pm, Nathan Wells  wrote:
> When do you see this problem? when you are in hosted mode or when you
> deploy to tomcat? what version of tomcat are you using?
>
> On Jul 31, 5:51 am, BarefootSanders  wrote:
>
> > Sorry about the confusion.  Ive been to that page numerous times in my
> > search to fix my problem.
>
> > My problem specifically is that I dont have either of those classes
> > (CommetEvent and CometProcessor).  When i try to include them it says
> > they dont exist.  I thought exactly what you stated - I thought they
> > were internal to the Tomcat server and should have been included in my
> > install but apparently not.
>
> > Hope that clears up your confusion.
>
> > But that leave me where I was before.  Any suggestions?  Do I need to
> > configure/install anything in order to get access to those classes?
>
> > Thanks.
>
> > On Jul 31, 6:49 am, Nathan Wells  wrote:
>
> > > I don't fully know the answer to your question, but this might help:
>
> > >http://tomcat.apache.org/tomcat-6.0-doc/aio.html
>
> > > You probably already knew this, but catalina is an internal name for
> > > Apache's Tomcat server. It is likely that you may need to do some
> > > additional configuration before you can doComet-like stuff in hosted
> > > mode.
>
> > > HTH
> > > Nathan
>
> > > On Jul 30, 9:45 am, BarefootSanders  wrote:
>
> > > > Hi all.  I'm trying to reproduce the application here:
>
> > > >http://gwtapps.com/?page_id=31
>
> > > > Its a simple instant messenger which usescometfor events.  It
> > > > imports these two classes:
>
> > > > import org.apache.catalina.CometEvent;
> > > > import org.apache.catalina.CometProcessor;
>
> > > > But I guess I dont have them on my comp because it cant find them.
> > > > I'm new to usingcometso as a more general question, does anyone know
> > > > where I can get these two classes?  If not, is there an implementation
> > > > ofCometonGWTthat I can use instead of this?
>
> > > > Any other feedback would be much appreciated.
>
> > > > Thanks.- 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 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: MySQL Connection

2009-09-02 Thread GumbyGWTBeginner

Will this (what is documented on that link) work if I runn on my local
PC?

or

Do I have actually host the MySQL DB on a webserver?

Stephan

On Sep 3, 10:36 am, Isaac Truett  wrote:
> Stephan,
>
> You need to make a request to the server for the data. The server can
> connect to the database and return the results to the browser. If your
> server is running Java, then GWT RPC is a good method. For non-Java
> servers, JSON could work for you.
>
> See:http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication...
>
> Hope that helps.
>
> - Isaac
>
> On Wed, Sep 2, 2009 at 10:24 PM,
>
>
>
> GumbyGWTBeginner wrote:
>
> > Can you guys point in the direction of either a concept on how I would
> > do this or a sample project for Ecllipse / GWT that I can go thru.
>
> > Keeping in mind I am new at this too.
>
> > I can figure most things out with sample code.
>
> > My Secario:
> > I have installed MySQL Database on my PC
> > Trying to make a GWT application to interact with this Database
>
> > In the hope to Base this on the same senario but on a web based
> > system. i.e. MySQL on a website and the GWT app interacting with this.
>
> > Any help would greatly appricated.
>
> > Thanks for the help thus far.
>
> > Stephan
>
> > On Sep 3, 9:44 am, Isaac Truett  wrote:
> >> Hi,
>
> >> The problem is that you're trying to mix GWT and java.sql. That's not
> >> going to work. JS in the browser can't connect to your database.
>
> >> The cause of your specific error is that Class.forName() is not a part
> >> of the JRE that GWT emulates.
>
> >> See also:http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html
>
> >> - Isaac
>
> >> On Wed, Sep 2, 2009 at 7:21 PM,
>
> >> GumbyGWTBeginner wrote:
>
> >> > Hi Guys,
>
> >> > Was wondering if anyone could answer a small question?
>
> >> >  I have created a class called DBFlow  (Code below) which connects to
> >> > a MySQL DB and retrieve the number of rows in a DB.
>
> >> > I am new at this could anyone throw some light on the subject.
>
> >> > Error Message
>
> >> > [ERROR] Line 51: The method forName(String) is undefined for the type
> >> > Class
>
> >> > Code to Call Class
>
> >> >                  DBFlow TestTheDB = new DBFlow();
> >> >                  TestTheDB.main();
>
> >> > Class Code
>
> >> > import java.sql.Connection;
> >> > import java.sql.DriverManager;
> >> > import java.sql.ResultSet;
> >> > import java.sql.SQLException;
> >> > import java.sql.Statement;
> >> > import java.lang.Class;
> >> > import com.google.gwt.user.client.Window;
>
> >> > public class DBFlow {
>
> >> >        public void onModuleLoad() {
> >> >                //sdsd
>
> >> >        }
>
> >> >        public DBFlow() {
> >> >                //sdsd
>
> >> >        }
>
> >> >        public void main() {
> >> >                Connection conn = null;
> >> >                try {
> >> >                        conn = getConnection();
> >> >                        String tableName = "family";
> >> >                        Window.alert("tableName=" + tableName);
> >> >                        Window.alert("conn=" + conn);
> >> >                        Window.alert("rowCount=" + countRows(conn, 
> >> > tableName));
> >> >                } catch (Exception e) {
> >> >                        Window.alert("No Connect");
> >> >                        e.printStackTrace();
> >> >                        //System.exit(1);  // Edit out as it is an erro
> >> >                } finally {
> >> >                        // release database resources
> >> >                        try {
> >> >                                conn.close();
> >> >                        } catch (SQLException e) {
> >> >                                e.printStackTrace();
> >> >                        }
> >> >                }
> >> >        }
>
> >> >        public Connection getConnection() throws Exception {
> >> >                String driver = "com.mysql.jdbc.Driver";
> >> >                String url = "jdbc:mysql://localhost:3306/dogs";
> >> >                String username = "root";
> >> >                String password = "mypass";
>
> >> >                Class.forName(driver); // load MySQL driver
> >> > ***Error here apprantly
> >> >                Connection conn = DriverManager.getConnection(url, 
> >> > username,
> >> > password);
> >> >                return conn;
> >> >        }
>
> >> >        public int countRows(Connection conn, String tableName) throws
> >> > SQLException {
> >> >           // select the number of rows in the table
> >> >                Statement stmt = null;
> >> >                ResultSet rs = null;
> >> >                int rowCount = -1;
> >> >                try {
> >> >                        stmt = conn.createStatement();
> >> >                        rs = stmt.executeQuery("SELECT COUNT(*) FROM " + 
> >> > tableName);
> >> >                        // get

Re: MySQL Connection

2009-09-02 Thread Isaac Truett

Stephan,

You need to make a request to the server for the data. The server can
connect to the database and return the results to the browser. If your
server is running Java, then GWT RPC is a good method. For non-Java
servers, JSON could work for you.

See:
http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html

Hope that helps.

- Isaac

On Wed, Sep 2, 2009 at 10:24 PM,
GumbyGWTBeginner wrote:
>
> Can you guys point in the direction of either a concept on how I would
> do this or a sample project for Ecllipse / GWT that I can go thru.
>
> Keeping in mind I am new at this too.
>
> I can figure most things out with sample code.
>
> My Secario:
> I have installed MySQL Database on my PC
> Trying to make a GWT application to interact with this Database
>
> In the hope to Base this on the same senario but on a web based
> system. i.e. MySQL on a website and the GWT app interacting with this.
>
> Any help would greatly appricated.
>
> Thanks for the help thus far.
>
> Stephan
>
>
> On Sep 3, 9:44 am, Isaac Truett  wrote:
>> Hi,
>>
>> The problem is that you're trying to mix GWT and java.sql. That's not
>> going to work. JS in the browser can't connect to your database.
>>
>> The cause of your specific error is that Class.forName() is not a part
>> of the JRE that GWT emulates.
>>
>> See also:http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html
>>
>> - Isaac
>>
>> On Wed, Sep 2, 2009 at 7:21 PM,
>>
>>
>>
>> GumbyGWTBeginner wrote:
>>
>> > Hi Guys,
>>
>> > Was wondering if anyone could answer a small question?
>>
>> >  I have created a class called DBFlow  (Code below) which connects to
>> > a MySQL DB and retrieve the number of rows in a DB.
>>
>> > I am new at this could anyone throw some light on the subject.
>>
>> > Error Message
>>
>> > [ERROR] Line 51: The method forName(String) is undefined for the type
>> > Class
>>
>> > Code to Call Class
>>
>> >                  DBFlow TestTheDB = new DBFlow();
>> >                  TestTheDB.main();
>>
>> > Class Code
>>
>> > import java.sql.Connection;
>> > import java.sql.DriverManager;
>> > import java.sql.ResultSet;
>> > import java.sql.SQLException;
>> > import java.sql.Statement;
>> > import java.lang.Class;
>> > import com.google.gwt.user.client.Window;
>>
>> > public class DBFlow {
>>
>> >        public void onModuleLoad() {
>> >                //sdsd
>>
>> >        }
>>
>> >        public DBFlow() {
>> >                //sdsd
>>
>> >        }
>>
>> >        public void main() {
>> >                Connection conn = null;
>> >                try {
>> >                        conn = getConnection();
>> >                        String tableName = "family";
>> >                        Window.alert("tableName=" + tableName);
>> >                        Window.alert("conn=" + conn);
>> >                        Window.alert("rowCount=" + countRows(conn, 
>> > tableName));
>> >                } catch (Exception e) {
>> >                        Window.alert("No Connect");
>> >                        e.printStackTrace();
>> >                        //System.exit(1);  // Edit out as it is an erro
>> >                } finally {
>> >                        // release database resources
>> >                        try {
>> >                                conn.close();
>> >                        } catch (SQLException e) {
>> >                                e.printStackTrace();
>> >                        }
>> >                }
>> >        }
>>
>> >        public Connection getConnection() throws Exception {
>> >                String driver = "com.mysql.jdbc.Driver";
>> >                String url = "jdbc:mysql://localhost:3306/dogs";
>> >                String username = "root";
>> >                String password = "mypass";
>>
>> >                Class.forName(driver); // load MySQL driver
>> > ***Error here apprantly
>> >                Connection conn = DriverManager.getConnection(url, username,
>> > password);
>> >                return conn;
>> >        }
>>
>> >        public int countRows(Connection conn, String tableName) throws
>> > SQLException {
>> >           // select the number of rows in the table
>> >                Statement stmt = null;
>> >                ResultSet rs = null;
>> >                int rowCount = -1;
>> >                try {
>> >                        stmt = conn.createStatement();
>> >                        rs = stmt.executeQuery("SELECT COUNT(*) FROM " + 
>> > tableName);
>> >                        // get the number of rows from the result set
>> >                        rs.next();
>> >                   rowCount = rs.getInt(1);
>> >                } finally {
>> >                        rs.close();
>> >                        stmt.close();
>> >                }
>> >                return rowCount;
>> >        }
>>
>> > }- Hide quoted text -
>>
>> - Show quoted text -

Re: MySQL Connection

2009-09-02 Thread Christian Goudreau
He's right, I was assuming that you were trying to do it from a servlet
anyway

Christian

On Wed, Sep 2, 2009 at 9:44 PM, Isaac Truett  wrote:

> Hi,
>
> The problem is that you're trying to mix GWT and java.sql. That's not
> going to work. JS in the browser can't connect to your database.
>
> The cause of your specific error is that Class.forName() is not a part
> of the JRE that GWT emulates.
>
> See also:
> http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html
>
>
> - Isaac
>
>
> On Wed, Sep 2, 2009 at 7:21 PM,
> GumbyGWTBeginner wrote:
> >
> > Hi Guys,
> >
> > Was wondering if anyone could answer a small question?
> >
> >  I have created a class called DBFlow  (Code below) which connects to
> > a MySQL DB and retrieve the number of rows in a DB.
> >
> > I am new at this could anyone throw some light on the subject.
> >
> > Error Message
> >
> >
> >
> > [ERROR] Line 51: The method forName(String) is undefined for the type
> > Class
> >
> >
> > Code to Call Class
> >
> >
> >  DBFlow TestTheDB = new DBFlow();
> >  TestTheDB.main();
> >
> >
> >
> > Class Code
> >
> > import java.sql.Connection;
> > import java.sql.DriverManager;
> > import java.sql.ResultSet;
> > import java.sql.SQLException;
> > import java.sql.Statement;
> > import java.lang.Class;
> > import com.google.gwt.user.client.Window;
> >
> > public class DBFlow {
> >
> >public void onModuleLoad() {
> >//sdsd
> >
> >}
> >
> >public DBFlow() {
> >//sdsd
> >
> >}
> >
> >public void main() {
> >Connection conn = null;
> >try {
> >conn = getConnection();
> >String tableName = "family";
> >Window.alert("tableName=" + tableName);
> >Window.alert("conn=" + conn);
> >Window.alert("rowCount=" + countRows(conn,
> tableName));
> >} catch (Exception e) {
> >Window.alert("No Connect");
> >e.printStackTrace();
> >//System.exit(1);  // Edit out as it is an erro
> >} finally {
> >// release database resources
> >try {
> >conn.close();
> >} catch (SQLException e) {
> >e.printStackTrace();
> >}
> >}
> >}
> >
> >public Connection getConnection() throws Exception {
> >String driver = "com.mysql.jdbc.Driver";
> >String url = "jdbc:mysql://localhost:3306/dogs";
> >String username = "root";
> >String password = "mypass";
> >
> >Class.forName(driver); // load MySQL driver
> > ***Error here apprantly
> >Connection conn = DriverManager.getConnection(url,
> username,
> > password);
> >return conn;
> >}
> >
> >public int countRows(Connection conn, String tableName) throws
> > SQLException {
> >   // select the number of rows in the table
> >Statement stmt = null;
> >ResultSet rs = null;
> >int rowCount = -1;
> >try {
> >stmt = conn.createStatement();
> >rs = stmt.executeQuery("SELECT COUNT(*) FROM " +
> tableName);
> >// get the number of rows from the result set
> >rs.next();
> >   rowCount = rs.getInt(1);
> >} finally {
> >rs.close();
> >stmt.close();
> >}
> >return rowCount;
> >}
> >
> > }
> >
> > >
> >
>
> >
>

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

2009-09-02 Thread kristian

Dear All,

Thanks for the explanation. Now i have no more doubt to start using
GWT.

On Sep 2, 5:27 pm, Chris Lowe  wrote:
> Kristian,
>
> Do GMail or the GWT showcase application work well enough for you in
> your intended browser?  If so, then in all likelihood your GWT
> application will perform adequately.
>
> I'm not aware of any reliability issues as such. The only thing that
> springs to mind is that GWT compiles for specific browsers that it
> knows about at compile time.  Like many other web application
> technologies, if a new browser comes out then they can break
> compatibility. Recent examples of this are with IE8 and FF 3.5,
> however Google have always endeavoured to roll out compiler updates to
> rectify these issues.
>
> Loading times can be a problem and it boils down to a couple of
> things: 1. I believe IE's JavaScript parser gets disproportionately
> slower the larger your GWT application is (other browsers do not
> suffer with this); 2. a compressed GWT application can still be fairly
> large, say 150k to 200k, which can be an issue if your target audience
> are all on dial up connections.  Remember though that this download is
> a one-off and the browser will cache that version of the app forever
> so all subsequent app launches are significantly quicker.  Also, GWT
> 2.0 has a number of things in the pipeline to address these issues
> (like code splitting).
>
> Cheers,
>
> Chris.
>
> On Sep 2, 5:32 am, kristian  wrote:
>
> > Hello All, i am a newbie that want to try to build a web application
> > using GWT, but i heard from some of my colleague that GWT has some
> > issue with its performance (reliability, load slowly). So, is there
> > anyone can enlighten me? 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: MySQL Connection

2009-09-02 Thread GumbyGWTBeginner

Can you guys point in the direction of either a concept on how I would
do this or a sample project for Ecllipse / GWT that I can go thru.

Keeping in mind I am new at this too.

I can figure most things out with sample code.

My Secario:
I have installed MySQL Database on my PC
Trying to make a GWT application to interact with this Database

In the hope to Base this on the same senario but on a web based
system. i.e. MySQL on a website and the GWT app interacting with this.

Any help would greatly appricated.

Thanks for the help thus far.

Stephan


On Sep 3, 9:44 am, Isaac Truett  wrote:
> Hi,
>
> The problem is that you're trying to mix GWT and java.sql. That's not
> going to work. JS in the browser can't connect to your database.
>
> The cause of your specific error is that Class.forName() is not a part
> of the JRE that GWT emulates.
>
> See also:http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html
>
> - Isaac
>
> On Wed, Sep 2, 2009 at 7:21 PM,
>
>
>
> GumbyGWTBeginner wrote:
>
> > Hi Guys,
>
> > Was wondering if anyone could answer a small question?
>
> >  I have created a class called DBFlow  (Code below) which connects to
> > a MySQL DB and retrieve the number of rows in a DB.
>
> > I am new at this could anyone throw some light on the subject.
>
> > Error Message
>
> > [ERROR] Line 51: The method forName(String) is undefined for the type
> > Class
>
> > Code to Call Class
>
> >                  DBFlow TestTheDB = new DBFlow();
> >                  TestTheDB.main();
>
> > Class Code
>
> > import java.sql.Connection;
> > import java.sql.DriverManager;
> > import java.sql.ResultSet;
> > import java.sql.SQLException;
> > import java.sql.Statement;
> > import java.lang.Class;
> > import com.google.gwt.user.client.Window;
>
> > public class DBFlow {
>
> >        public void onModuleLoad() {
> >                //sdsd
>
> >        }
>
> >        public DBFlow() {
> >                //sdsd
>
> >        }
>
> >        public void main() {
> >                Connection conn = null;
> >                try {
> >                        conn = getConnection();
> >                        String tableName = "family";
> >                        Window.alert("tableName=" + tableName);
> >                        Window.alert("conn=" + conn);
> >                        Window.alert("rowCount=" + countRows(conn, 
> > tableName));
> >                } catch (Exception e) {
> >                        Window.alert("No Connect");
> >                        e.printStackTrace();
> >                        //System.exit(1);  // Edit out as it is an erro
> >                } finally {
> >                        // release database resources
> >                        try {
> >                                conn.close();
> >                        } catch (SQLException e) {
> >                                e.printStackTrace();
> >                        }
> >                }
> >        }
>
> >        public Connection getConnection() throws Exception {
> >                String driver = "com.mysql.jdbc.Driver";
> >                String url = "jdbc:mysql://localhost:3306/dogs";
> >                String username = "root";
> >                String password = "mypass";
>
> >                Class.forName(driver); // load MySQL driver
> > ***Error here apprantly
> >                Connection conn = DriverManager.getConnection(url, username,
> > password);
> >                return conn;
> >        }
>
> >        public int countRows(Connection conn, String tableName) throws
> > SQLException {
> >           // select the number of rows in the table
> >                Statement stmt = null;
> >                ResultSet rs = null;
> >                int rowCount = -1;
> >                try {
> >                        stmt = conn.createStatement();
> >                        rs = stmt.executeQuery("SELECT COUNT(*) FROM " + 
> > tableName);
> >                        // get the number of rows from the result set
> >                        rs.next();
> >                   rowCount = rs.getInt(1);
> >                } finally {
> >                        rs.close();
> >                        stmt.close();
> >                }
> >                return rowCount;
> >        }
>
> > }- 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 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



How can I center arbitrary content on a fixed-size button?

2009-09-02 Thread Jim Douglas

I'm getting hung up on something that seems like it ought to be
trivial.  I've got a fixed-size GWT Button and I need to render it
(preferably using just static CSS rules) such that any arbitrary text
or HTML content a user throws at it is centered both horizontally
(that part's easy) and vertically (that part is driving me around the
bend).

In Java, AbstractButton.setVerticalAlignment(CENTER) just happens; you
don't have to think about it.  But I can't seem to find any way to
achieve this same effect on a GWT Button.

Horizontal alignment is trivial:  text-align: center.  But I've spent
a couple of days trying increasingly bizarre strategies (http://
www.google.com/search?q=css+vertical+align) trying to achieve vertical
alignment, with no success to speak of.

Has anyone else struggled with this problem (or solved it)?

Regards,
Jim.
--~--~-~--~~~---~--~~
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: Best way for storing a static list of strings?

2009-09-02 Thread Jarda

OK. I'm pretty familiar with Enums so I will just use them.
Thanks a lot, sir! :)

Best regards
  Jarda

On Sep 3, 1:53 am, Daniel Jue  wrote:
> I think enums serve just that purpose.  For now, put it in code.  If
> it becomes a problem later, you can copy and paste that date
> elsewhere.  I know the feeling of wanting to do things right the first
> time, but premature optimization turns out to be pretty harmful.
>
> Best of all, you can probably just find someone's existing enum on
> google code search.  Plug and play!
>
> On Wed, Sep 2, 2009 at 7:45 PM, Jarda wrote:
>
> > I mean I need to provide like 100+ strings that I know at compile-
> > time. But I had this feeling that writing all of them directly into
> > code is not the proper way. (But I am far from thinking of myself like
> > of expert. :)
>
> > On Sep 3, 1:34 am, Daniel Jue  wrote:
> >> Is the static list editable?
>
> >> If not:
> >> static final String
> >> or
> >> enum
>
> >> Note that enums can be more complex than just named elements.
>
> >> 2009/9/2 Jaroslav Záruba :
>
> >> > Hello
>
> >> > What is the best way in GWT to store static list of strings?
> >> > I need to provide list of countries, so creating a Constants interface
> >> > does not seem to be the best solution.
>
> >> > I supposed I could store the list in properties-file (countryCode:
> >> > countryName) and then iterate over its keys. But I failed to
> >> > accomplish that as I am yet to find out how to access such files in
> >> > GWT-environment.
>
> >> > I have only seen one video about Linkers and Generators in GWT (http://
> >> >www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer...
> >> > somehow... ?
--~--~-~--~~~---~--~~
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: hosted mode trouble

2009-09-02 Thread Jeff Chimene

On 09/02/2009 03:42 PM, sidkdbl07 wrote:
> 
> The output of my php is a JSON object (see below). Shouldn't I be able
> to just call the php file?

Are you using the builtin Jetty server? It doesn't have a php engine.

--~--~-~--~~~---~--~~
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: hosted mode trouble

2009-09-02 Thread sidkdbl07

My php file is on a web server configured with PHP5. The address of
the weather.php5 file is http://www.myserver.com/weather.php5.

I'm debugging my GWT files in Eclipse. The GWT class (see above) makes
a call to the weather.php5 page with the following line...

RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
URL.encode("http://www.myserver.com/weather.php5";));

Honestly, I don't know if I'm using the Jetty server. How do I tell? I
have no app engine configured in Eclipse.

When I debug my GWT project in Eclipse response.getStatusCode() comes
back as 0 (zero)
When I add -noserver to the run configuration, the GWT hosted mode
browser doesn't display my page... it seems to just sit there empty.

I hope this clears up what I'm trying to accomplish.
--~--~-~--~~~---~--~~
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: MySQL Connection

2009-09-02 Thread Isaac Truett
Hi,

The problem is that you're trying to mix GWT and java.sql. That's not
going to work. JS in the browser can't connect to your database.

The cause of your specific error is that Class.forName() is not a part
of the JRE that GWT emulates.

See also:
http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html


- Isaac


On Wed, Sep 2, 2009 at 7:21 PM,
GumbyGWTBeginner wrote:
>
> Hi Guys,
>
> Was wondering if anyone could answer a small question?
>
>  I have created a class called DBFlow  (Code below) which connects to
> a MySQL DB and retrieve the number of rows in a DB.
>
> I am new at this could anyone throw some light on the subject.
>
> Error Message
>
>
>
> [ERROR] Line 51: The method forName(String) is undefined for the type
> Class
>
>
> Code to Call Class
>
>
>                  DBFlow TestTheDB = new DBFlow();
>                  TestTheDB.main();
>
>
>
> Class Code
>
> import java.sql.Connection;
> import java.sql.DriverManager;
> import java.sql.ResultSet;
> import java.sql.SQLException;
> import java.sql.Statement;
> import java.lang.Class;
> import com.google.gwt.user.client.Window;
>
> public class DBFlow {
>
>        public void onModuleLoad() {
>                //sdsd
>
>        }
>
>        public DBFlow() {
>                //sdsd
>
>        }
>
>        public void main() {
>                Connection conn = null;
>                try {
>                        conn = getConnection();
>                        String tableName = "family";
>                        Window.alert("tableName=" + tableName);
>                        Window.alert("conn=" + conn);
>                        Window.alert("rowCount=" + countRows(conn, tableName));
>                } catch (Exception e) {
>                        Window.alert("No Connect");
>                        e.printStackTrace();
>                        //System.exit(1);  // Edit out as it is an erro
>                } finally {
>                        // release database resources
>                        try {
>                                conn.close();
>                        } catch (SQLException e) {
>                                e.printStackTrace();
>                        }
>                }
>        }
>
>        public Connection getConnection() throws Exception {
>                String driver = "com.mysql.jdbc.Driver";
>                String url = "jdbc:mysql://localhost:3306/dogs";
>                String username = "root";
>                String password = "mypass";
>
>                Class.forName(driver); // load MySQL driver
> ***Error here apprantly
>                Connection conn = DriverManager.getConnection(url, username,
> password);
>                return conn;
>        }
>
>        public int countRows(Connection conn, String tableName) throws
> SQLException {
>           // select the number of rows in the table
>                Statement stmt = null;
>                ResultSet rs = null;
>                int rowCount = -1;
>                try {
>                        stmt = conn.createStatement();
>                        rs = stmt.executeQuery("SELECT COUNT(*) FROM " + 
> tableName);
>                        // get the number of rows from the result set
>                        rs.next();
>                   rowCount = rs.getInt(1);
>                } finally {
>                        rs.close();
>                        stmt.close();
>                }
>                return rowCount;
>        }
>
> }
>
> >
>

--~--~-~--~~~---~--~~
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: MySQL Connection

2009-09-02 Thread Christian Goudreau
You forgot .newInstance() after forname(string).

There's a lot of documentation here :
http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-basic.html#connector-j-examples-connection-drivermanager

Christian

On Wed, Sep 2, 2009 at 7:21 PM, GumbyGWTBeginner
wrote:

>
> Hi Guys,
>
> Was wondering if anyone could answer a small question?
>
>  I have created a class called DBFlow  (Code below) which connects to
> a MySQL DB and retrieve the number of rows in a DB.
>
> I am new at this could anyone throw some light on the subject.
>
> Error Message
>
>
>
> [ERROR] Line 51: The method forName(String) is undefined for the type
> Class
>
>
> Code to Call Class
>
>
>  DBFlow TestTheDB = new DBFlow();
>  TestTheDB.main();
>
>
>
> Class Code
>
> import java.sql.Connection;
> import java.sql.DriverManager;
> import java.sql.ResultSet;
> import java.sql.SQLException;
> import java.sql.Statement;
> import java.lang.Class;
> import com.google.gwt.user.client.Window;
>
> public class DBFlow {
>
>public void onModuleLoad() {
>//sdsd
>
>}
>
>public DBFlow() {
>//sdsd
>
>}
>
>public void main() {
>Connection conn = null;
>try {
>conn = getConnection();
>String tableName = "family";
>Window.alert("tableName=" + tableName);
>Window.alert("conn=" + conn);
>Window.alert("rowCount=" + countRows(conn,
> tableName));
>} catch (Exception e) {
>Window.alert("No Connect");
>e.printStackTrace();
>//System.exit(1);  // Edit out as it is an erro
>} finally {
>// release database resources
>try {
>conn.close();
>} catch (SQLException e) {
>e.printStackTrace();
>}
>}
>}
>
>public Connection getConnection() throws Exception {
>String driver = "com.mysql.jdbc.Driver";
>String url = "jdbc:mysql://localhost:3306/dogs";
>String username = "root";
>String password = "mypass";
>
>Class.forName(driver); // load MySQL driver
> ***Error here apprantly
>Connection conn = DriverManager.getConnection(url, username,
> password);
>return conn;
>}
>
>public int countRows(Connection conn, String tableName) throws
> SQLException {
>   // select the number of rows in the table
>Statement stmt = null;
>ResultSet rs = null;
>int rowCount = -1;
>try {
>stmt = conn.createStatement();
>rs = stmt.executeQuery("SELECT COUNT(*) FROM " +
> tableName);
>// get the number of rows from the result set
>rs.next();
>   rowCount = rs.getInt(1);
>} finally {
>rs.close();
>stmt.close();
>}
>return rowCount;
>}
>
> }
>
> >
>

--~--~-~--~~~---~--~~
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: Iframe = multithreading ???

2009-09-02 Thread ben fenster

your answear is based on your knolage in js but i need an answear
based on actual in depth knowlage in how browser work since each
iframe act as an independed wep page and loaded sepertly then the
containing page made me wonder about how its being done without a
diffrent thread ?
and if another thread is envolved in loading then maybe the new thread
is also responsible on running the js code contained in the page of
the iframe ?
On Sep 2, 5:46 pm, David Given  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> ben fenster wrote:
> > i was wondering that if by opening another module in an iframe tag the
> > code of that module runs in another thread ??
>
> Nope. There is no way of getting access to multiple Javascript threads
> from a web browser, unless you use some sort of extension like Google
> Gears or HTML5 web workers. Every part of the Javascript VM that your
> code can see is part of the same event loop.
>
> > more over is the limit of 2 open http request apply on 2 diffrent
> > modules running in diffrent iframes ??
>
> Don't know about this one.
>
> - --
> ┌─── dg@cowlark.com ─http://www.cowlark.com─
> │
> │ "People who think they know everything really annoy those of us who
> │ know we don't." --- Bjarne Stroustrup
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> iD8DBQFKnxH6f9E0noFvlzgRApqiAKC/xF4z1x0t7s+8kAsTVoSxYFRFmQCfaUcx
> 7F+QaH0Fdc9baW9Wcgl3swM=
> =ukVk
> -END PGP SIGNATURE-
--~--~-~--~~~---~--~~
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, MVP, and nested widgets

2009-09-02 Thread Ian Bambury
Hi Jeff,
No I don't need the event bus to set all this up, but I do need to set it
all up to use an event bus.

I don't need a HasMenuItem method because I don't (the way I have it now)
need to get hold of menu items, I just need to tell the menu panel to add a
menu item. Menu items fire an event if clicked, and other parts of the
system react if they decide they need to.

Ian

http://examples.roughian.com


2009/9/2 Jeff Chimene 

>
> On 09/02/2009 11:22 AM, Ian Bambury wrote:
> > Hi all,
> >
> > I have a question for the GWT-MVP experts out there. If there is a more
> > suitable forum, please let me know.
> >
> > I have a menu panel which contains a flowpanel for menu items, and
> > another flowpanel where the required page will display itself when the
> > associated menu item is clicked.
> >
> > The MenuPanel presenter is creating menu items and sending the MenuItem
> > views to the MenuPanel view to be added.
> >
> > The problem is this: If there are a number of possible MenuPanel views,
> > then the MenuPanel presenter can't know which MenuItem view it should
> > create (blue, green, red, text-based, image-based, therefore presumably
> > each MenuPanel view should decide.
> >
> > The MenuPanel view can't be the creator of the MenuItems because it
> > doesn't know which menu items should be created (for example, you might
> > be allowed to see admin menu items or not - this kind of logic should
> > not be in the view).
> >
> > So my current solution is to get the MenuPanel presenter to fetch the
> > MenuItem view from the MenuPanel view.
> >
> > Now, if you are still following me, is this what I should be doing? Or
> > have I completely lost the plot somewhere along the line?
> >
> > Although there are endless (generally slightly contradictory)
> > explanations of MVP (and please note that I don't think I need another
> > explanation of that), there isn't anything I can find that explains how
> > to nail together the various self-contained MVP widgets - at least, not
> > in a way that allows an event bus to operate.
>
>
> Are you sure you need the event bus for this? Perhaps it's time to add a
> HasMenuItem interface in your Display interface, implement it in the
> View, call it from the Presenter.
>
> >
>

--~--~-~--~~~---~--~~
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 determine space available to RootPanel.get('some_div')?

2009-09-02 Thread Ian Bambury
I asked before what exactly you are trying to get the space of because
getting the available height of the browser window is easy, but if you want
to get the height of an individual element of your HTML, then you will need
to supply some code.
If it's the former, then try something like

html, body
{
margin  :   0;
height  :   100%;
}

in your css.

Ian

http://examples.roughian.com


2009/9/3 jah 

> Well I've spent the day experimenting with trying to get the available
> height and I'm giving it up as a bad job!
> I'll modify the app ( http://code.google.com/p/picavue/ ) and not bother
> about paginating the gallery of thumbnails.  I can get the width OK so I
> can set Grid columns to fit the available space, but trying to show an
> optimum number of rows is just too damn hard - I'll just show all the
> thumbs.  Ah well.
>
> jah
>

--~--~-~--~~~---~--~~
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: Is Google Web Toolkit for me?

2009-09-02 Thread David Given

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

spierce7 wrote:
[...]
> By the way, I'm going to need to integrate with a web database. The
> obvious one for me was MySQL, but that was mainly because PHP
> integrates so easily with it. What kind of options do I have with this
> while using GWT? I'd rather not have to have GWT integrate with PHP,
> and then MySQL, or some other ridiculous thing. What options do I have
> here? Thanks in advance!

I'm using Berkeley DB JE for one of my apps; it's a pure-Java
reimplementation of the old classic Berkeley DB non-relational database.
It's got some really nice Java reflection glue that combines well with
GWT's RPC glue. I can pull an object out of the database on the server
and pass it directly to the client in about three lines of code, and GWT
and Berkeley DB take care of all the plumbing. And because it's pure
Java, there's no extra dependencies on the server --- you just drop the
jarfile in WEB-INF/lib and it Just Works(tm).

A server-side RPC implementation can be as literally trivial as this:

DataObject getFromDB(int key)
{
  try
  {
return _index.get(key);
  }
  catch (DatabaseException e)
  {
return null;
  }
}

- --
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ "People who think they know everything really annoy those of us who
│ know we don't." --- Bjarne Stroustrup
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFKnxPQf9E0noFvlzgRAhmbAJ9VSY0eSfTjCoUUwNyJtf32UyYNcgCghhbe
Qe2VV/Tvae3wndsEBQJvyKo=
=4rPN
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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: Best way for storing a static list of strings?

2009-09-02 Thread Daniel Jue

I think enums serve just that purpose.  For now, put it in code.  If
it becomes a problem later, you can copy and paste that date
elsewhere.  I know the feeling of wanting to do things right the first
time, but premature optimization turns out to be pretty harmful.

Best of all, you can probably just find someone's existing enum on
google code search.  Plug and play!

On Wed, Sep 2, 2009 at 7:45 PM, Jarda wrote:
>
> I mean I need to provide like 100+ strings that I know at compile-
> time. But I had this feeling that writing all of them directly into
> code is not the proper way. (But I am far from thinking of myself like
> of expert. :)
>
> On Sep 3, 1:34 am, Daniel Jue  wrote:
>> Is the static list editable?
>>
>> If not:
>> static final String
>> or
>> enum
>>
>> Note that enums can be more complex than just named elements.
>>
>> 2009/9/2 Jaroslav Záruba :
>>
>>
>>
>> > Hello
>>
>> > What is the best way in GWT to store static list of strings?
>> > I need to provide list of countries, so creating a Constants interface
>> > does not seem to be the best solution.
>>
>> > I supposed I could store the list in properties-file (countryCode:
>> > countryName) and then iterate over its keys. But I failed to
>> > accomplish that as I am yet to find out how to access such files in
>> > GWT-environment.
>>
>> > I have only seen one video about Linkers and Generators in GWT (http://
>> >www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer...
>> > somehow... ?
> >
>

--~--~-~--~~~---~--~~
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: Thank you google!

2009-09-02 Thread zinkronz network
i also want to thanks, good job google


buzz

On Thu, Sep 3, 2009 at 2:39 AM, Jim Douglas  wrote:

>
> I second that.  We're making rapid progress porting a Swing front end
> to GWT.  The Google/GWT engineers have done some really impressive
> work here.
>
> On Sep 2, 12:17 pm, charlie  wrote:
> > Err, haven't :).
> >
> > On Wed, Sep 2, 2009 at 2:16 PM, charlie  wrote:
> > > For making programming fun again.  I really have been this excited
> about a
> > > technology in a decade and wanted to express my appreciation for all
> that
> > > you guys are doing.
> >
> > > So 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 determine space available to RootPanel.get('some_div')?

2009-09-02 Thread jah

Well I've spent the day experimenting with trying to get the available
height and I'm giving it up as a bad job!
I'll modify the app ( http://code.google.com/p/picavue/ ) and not bother
about paginating the gallery of thumbnails.  I can get the width OK so I
can set Grid columns to fit the available space, but trying to show an
optimum number of rows is just too damn hard - I'll just show all the
thumbs.  Ah well.

jah

--~--~-~--~~~---~--~~
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, MVP, and nested widgets

2009-09-02 Thread Ian Bambury
Hi Jason,
Thanks for the reply and suggestions.

My idea was to have the MenuPanelView have a factory method for
MenuItemViews.

The MenuPanel presenter has to determine what menu items are required
depending on whether the user privileges.

I don't really understand how your addMenuItem( Object i ); method would
work.

I can't really have each view just create its own presenter (as a general
principle) as far as I can see. What I want to end up with is a menu item
which fires a PlaceChange event when it is clicked - for this it needs a
token, for example GWT/Panels/SimplePanel (where GWT is an item in the
top-level menu, Panels is an item in the GWT menu, and SimplePanel is a
final page of information to be displayed).

Each menu would set itself up if required by listening for a PlaceChange
event, and if a page recognised it was needed, it would display itself.

This, though, means that the MenuPanel needs to do a bit of setting up for
the menu items and associated pages.

It isn't actually quite the mess it probably sounds. All the hard work is
done in a hierarchy of a few abstract classes, so to create a new menu, all
you really need to is specify the menu text and the page it refers to, But I
do get the feeling I'm stretching the MVP pattern well out of shape in order
to get it all to work.


Ian

http://examples.roughian.com


2009/9/3 Jason A. Beranek 

>
> Ian,
>
> When you mention your current solution fetches the MenuItem view from
> the MenuPanel view, do you mean the MenuItem view(s) are already in
> the MenuPanel view or do you mean the MenuPanel view acts as a factory
> for MenuItem views? I have been experimenting a bit with the former,
> though I imagine the latter would work. One approach I've also tried
> for list based structures that might work for your list of Menu Items
> is to make a function on the display interface to add the data
> elements to build the MenuItem view from primitives:
>
> interface MenuIPanelView {
>  void addMenuItem( Object i );
> }
>
> This presents a similar mapping problem to managing DTOs if the data
> your are representing in the view changes or the underlying model
> object populating that data changes, but it is an option (especially
> if the individual MenuItem's events could be bubbled up to the
> MenuPanel and reduce code size).
>
> The above are more what I've thought about or tried, and I don't claim
> to be any expert. I've been trying to figure if there is some magic
> approach that makes composition work, however I haven't seen a clear
> winner yet. I hope we'll get from Ray Ryan's sample code when he's
> able to put it together. Most non-GWT examples I've looked at seem to
> imply that you don't directly instantiate the presenter, but that the
> presenter is created when the view is constructed (and the view is
> passed as an argument to the presenter at that time). For some reason,
> this just feels wrong to me, though I can't put my finger on why this
> bidirectional coupling would be an issue since the view is already
> tightly coupled to the presenter. I don't know how well such an
> approach would work with dependency injection or UI binder (my gut
> feel is it wouldn't really).
>
> I'll be interested to see anyone else's thoughts.
>
> -Jason
>
> On Sep 2, 1:22 pm, Ian Bambury  wrote:
> > Hi all,
> >
> > I have a question for the GWT-MVP experts out there. If there is a more
> > suitable forum, please let me know.
> >
> > I have a menu panel which contains a flowpanel for menu items, and
> another
> > flowpanel where the required page will display itself when the associated
> > menu item is clicked.
> >
> > The MenuPanel presenter is creating menu items and sending the MenuItem
> > views to the MenuPanel view to be added.
> >
> > The problem is this: If there are a number of possible MenuPanel views,
> then
> > the MenuPanel presenter can't know which MenuItem view it should create
> > (blue, green, red, text-based, image-based, therefore presumably each
> > MenuPanel view should decide.
> >
> > The MenuPanel view can't be the creator of the MenuItems because it
> doesn't
> > know which menu items should be created (for example, you might be
> allowed
> > to see admin menu items or not - this kind of logic should not be in the
> > view).
> >
> > So my current solution is to get the MenuPanel presenter to fetch the
> > MenuItem view from the MenuPanel view.
> >
> > Now, if you are still following me, is this what I should be doing? Or
> have
> > I completely lost the plot somewhere along the line?
> >
> > Although there are endless (generally slightly contradictory)
> explanations
> > of MVP (and please note that I don't think I need another explanation of
> > that), there isn't anything I can find that explains how to nail together
> > the various self-contained MVP widgets - at least, not in a way that
> allows
> > an event bus to operate.
> >
> > Ian
> >
> > http://examples.roughian.com
> >
>

--~--~-~--~~~--

Re: Iframe = multithreading ???

2009-09-02 Thread ben fenster

another thing about the http request limitation most browsers rejects
more then 2 simultinus requests to a spacific  url and i wondered i
its aplays to 2 diffrent browser windows (diffrent process in new
browsers) and if iframe acts as new web page  maybe the limitation
grows by 2 for each iframe

On Sep 2, 5:05 pm, ben fenster  wrote:
> your answear is based on your knolage in js but i need an answear
> based on actual in depth knowlage in how browser work since each
> iframe act as an independed wep page and loaded sepertly then the
> containing page made me wonder about how its being done without a
> diffrent thread ?
> and if another thread is envolved in loading then maybe the new thread
> is also responsible on running the js code contained in the page of
> the iframe ?
> On Sep 2, 5:46 pm, David Given  wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
>
> > ben fenster wrote:
> > > i was wondering that if by opening another module in an iframe tag the
> > > code of that module runs in another thread ??
>
> > Nope. There is no way of getting access to multiple Javascript threads
> > from a web browser, unless you use some sort of extension like Google
> > Gears or HTML5 web workers. Every part of the Javascript VM that your
> > code can see is part of the same event loop.
>
> > > more over is the limit of 2 open http request apply on 2 diffrent
> > > modules running in diffrent iframes ??
>
> > Don't know about this one.
>
> > - --
> > ┌─── dg@cowlark.com ─http://www.cowlark.com─
> > │
> > │ "People who think they know everything really annoy those of us who
> > │ know we don't." --- Bjarne Stroustrup
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.9 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> > iD8DBQFKnxH6f9E0noFvlzgRApqiAKC/xF4z1x0t7s+8kAsTVoSxYFRFmQCfaUcx
> > 7F+QaH0Fdc9baW9Wcgl3swM=
> > =ukVk
> > -END PGP SIGNATURE-
--~--~-~--~~~---~--~~
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: hosted mode trouble

2009-09-02 Thread sidkdbl07

The output of my php is a JSON object (see below). Shouldn't I be able
to just call the php file?

Here is my php code:

getMessage()."\n"); }

$data = $metar->getWeather("CYBW", "Metric");
$icon = $metar->getWeatherIcon($data['condition'], $data['clouds'],
$data['wind'], $data['temperature'],51.083,-114.083);
$fmt = 1;

function chgFmt($flag) {
$flag = (($flag==0)?1:0);
return $flag;
}

$value{"Weather"}{0}{"Icon"} = $icon;
$value{"Weather"}{0}{"Condition"} = ucfirst($data['condition']);
$value{"Weather"}{0}{"Temperature"} = $data['temperature']."°C";
$value{"Weather"}{0}{"Humidity"} = $data['humidity']."%";
$value{"Weather"}{0}{"Wind"} = $data['wind']." kph";
$value{"Weather"}{0}{"Clouds"} = $data['clouds'][0]['amount'];

$output = json_encode($value);
print($output);
?>

The output is some variant of this...

{"Weather":[{"Icon":
34,"Condition":"","Temperature":"13°C","Humidity":"76.7%","Wind":"0
kph","Clouds":"few"}]
--~--~-~--~~~---~--~~
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: Iframe = multithreading ???

2009-09-02 Thread David Given

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

ben fenster wrote:
> i was wondering that if by opening another module in an iframe tag the
> code of that module runs in another thread ??

Nope. There is no way of getting access to multiple Javascript threads
from a web browser, unless you use some sort of extension like Google
Gears or HTML5 web workers. Every part of the Javascript VM that your
code can see is part of the same event loop.

> more over is the limit of 2 open http request apply on 2 diffrent
> modules running in diffrent iframes ??

Don't know about this one.

- --
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ "People who think they know everything really annoy those of us who
│ know we don't." --- Bjarne Stroustrup
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFKnxH6f9E0noFvlzgRApqiAKC/xF4z1x0t7s+8kAsTVoSxYFRFmQCfaUcx
7F+QaH0Fdc9baW9Wcgl3swM=
=ukVk
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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: Best way for storing a static list of strings?

2009-09-02 Thread Daniel Jue

Is the static list editable?

If not:
static final String
or
enum

Note that enums can be more complex than just named elements.

2009/9/2 Jaroslav Záruba :
>
> Hello
>
> What is the best way in GWT to store static list of strings?
> I need to provide list of countries, so creating a Constants interface
> does not seem to be the best solution.
>
> I supposed I could store the list in properties-file (countryCode:
> countryName) and then iterate over its keys. But I failed to
> accomplish that as I am yet to find out how to access such files in
> GWT-environment.
>
> I have only seen one video about Linkers and Generators in GWT (http://
> www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer...
> somehow... ?
> >
>

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

2009-09-02 Thread Dominik Steiner

To add my two cents here too, for our large GWT app we found out that
IE especially was getting slow because we had a lot of equalsIgnoreCase
() method called in our controllers that checked for property changes
of the model objects. Changing this to equals() already helped a bit,
and using maps instead was getting the performance back to what it was
in the other browsers.

HTH

Dominik

On 2 Sep., 04:27, Chris Lowe  wrote:
> Kristian,
>
> Do GMail or the GWT showcase application work well enough for you in
> your intended browser?  If so, then in all likelihood your GWT
> application will perform adequately.
>
> I'm not aware of any reliability issues as such. The only thing that
> springs to mind is that GWT compiles for specific browsers that it
> knows about at compile time.  Like many other web application
> technologies, if a new browser comes out then they can break
> compatibility. Recent examples of this are with IE8 and FF 3.5,
> however Google have always endeavoured to roll out compiler updates to
> rectify these issues.
>
> Loading times can be a problem and it boils down to a couple of
> things: 1. I believe IE's JavaScript parser gets disproportionately
> slower the larger your GWT application is (other browsers do not
> suffer with this); 2. a compressed GWT application can still be fairly
> large, say 150k to 200k, which can be an issue if your target audience
> are all on dial up connections.  Remember though that this download is
> a one-off and the browser will cache that version of the app forever
> so all subsequent app launches are significantly quicker.  Also, GWT
> 2.0 has a number of things in the pipeline to address these issues
> (like code splitting).
>
> Cheers,
>
> Chris.
>
> On Sep 2, 5:32 am, kristian  wrote:
>
> > Hello All, i am a newbie that want to try to build a web application
> > using GWT, but i heard from some of my colleague that GWT has some
> > issue with its performance (reliability, load slowly). So, is there
> > anyone can enlighten me? 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
-~--~~~~--~~--~--~---



MySQL Connection

2009-09-02 Thread GumbyGWTBeginner

Hi Guys,

Was wondering if anyone could answer a small question?

 I have created a class called DBFlow  (Code below) which connects to
a MySQL DB and retrieve the number of rows in a DB.

I am new at this could anyone throw some light on the subject.

Error Message



[ERROR] Line 51: The method forName(String) is undefined for the type
Class


Code to Call Class


  DBFlow TestTheDB = new DBFlow();
  TestTheDB.main();



Class Code

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.lang.Class;
import com.google.gwt.user.client.Window;

public class DBFlow {

public void onModuleLoad() {
//sdsd

}

public DBFlow() {
//sdsd

}

public void main() {
Connection conn = null;
try {
conn = getConnection();
String tableName = "family";
Window.alert("tableName=" + tableName);
Window.alert("conn=" + conn);
Window.alert("rowCount=" + countRows(conn, tableName));
} catch (Exception e) {
Window.alert("No Connect");
e.printStackTrace();
//System.exit(1);  // Edit out as it is an erro
} finally {
// release database resources
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}

public Connection getConnection() throws Exception {
String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/dogs";
String username = "root";
String password = "mypass";

Class.forName(driver); // load MySQL driver
***Error here apprantly
Connection conn = DriverManager.getConnection(url, username,
password);
return conn;
}

public int countRows(Connection conn, String tableName) throws
SQLException {
   // select the number of rows in the table
Statement stmt = null;
ResultSet rs = null;
int rowCount = -1;
try {
stmt = conn.createStatement();
rs = stmt.executeQuery("SELECT COUNT(*) FROM " + 
tableName);
// get the number of rows from the result set
rs.next();
   rowCount = rs.getInt(1);
} finally {
rs.close();
stmt.close();
}
return rowCount;
}

}

--~--~-~--~~~---~--~~
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, MVP, and nested widgets

2009-09-02 Thread Jeff Chimene

On 09/02/2009 11:22 AM, Ian Bambury wrote:
> Hi all,
> 
> I have a question for the GWT-MVP experts out there. If there is a more
> suitable forum, please let me know.
> 
> I have a menu panel which contains a flowpanel for menu items, and
> another flowpanel where the required page will display itself when the
> associated menu item is clicked.
> 
> The MenuPanel presenter is creating menu items and sending the MenuItem
> views to the MenuPanel view to be added.
> 
> The problem is this: If there are a number of possible MenuPanel views,
> then the MenuPanel presenter can't know which MenuItem view it should
> create (blue, green, red, text-based, image-based, therefore presumably
> each MenuPanel view should decide.
> 
> The MenuPanel view can't be the creator of the MenuItems because it
> doesn't know which menu items should be created (for example, you might
> be allowed to see admin menu items or not - this kind of logic should
> not be in the view).
> 
> So my current solution is to get the MenuPanel presenter to fetch the
> MenuItem view from the MenuPanel view.
> 
> Now, if you are still following me, is this what I should be doing? Or
> have I completely lost the plot somewhere along the line?
> 
> Although there are endless (generally slightly contradictory)
> explanations of MVP (and please note that I don't think I need another
> explanation of that), there isn't anything I can find that explains how
> to nail together the various self-contained MVP widgets - at least, not
> in a way that allows an event bus to operate.


Are you sure you need the event bus for this? Perhaps it's time to add a
HasMenuItem interface in your Display interface, implement it in the
View, call it from the Presenter.

--~--~-~--~~~---~--~~
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, MVP, and nested widgets

2009-09-02 Thread Jason A. Beranek

Ian,

When you mention your current solution fetches the MenuItem view from
the MenuPanel view, do you mean the MenuItem view(s) are already in
the MenuPanel view or do you mean the MenuPanel view acts as a factory
for MenuItem views? I have been experimenting a bit with the former,
though I imagine the latter would work. One approach I've also tried
for list based structures that might work for your list of Menu Items
is to make a function on the display interface to add the data
elements to build the MenuItem view from primitives:

interface MenuIPanelView {
  void addMenuItem( Object i );
}

This presents a similar mapping problem to managing DTOs if the data
your are representing in the view changes or the underlying model
object populating that data changes, but it is an option (especially
if the individual MenuItem's events could be bubbled up to the
MenuPanel and reduce code size).

The above are more what I've thought about or tried, and I don't claim
to be any expert. I've been trying to figure if there is some magic
approach that makes composition work, however I haven't seen a clear
winner yet. I hope we'll get from Ray Ryan's sample code when he's
able to put it together. Most non-GWT examples I've looked at seem to
imply that you don't directly instantiate the presenter, but that the
presenter is created when the view is constructed (and the view is
passed as an argument to the presenter at that time). For some reason,
this just feels wrong to me, though I can't put my finger on why this
bidirectional coupling would be an issue since the view is already
tightly coupled to the presenter. I don't know how well such an
approach would work with dependency injection or UI binder (my gut
feel is it wouldn't really).

I'll be interested to see anyone else's thoughts.

-Jason

On Sep 2, 1:22 pm, Ian Bambury  wrote:
> Hi all,
>
> I have a question for the GWT-MVP experts out there. If there is a more
> suitable forum, please let me know.
>
> I have a menu panel which contains a flowpanel for menu items, and another
> flowpanel where the required page will display itself when the associated
> menu item is clicked.
>
> The MenuPanel presenter is creating menu items and sending the MenuItem
> views to the MenuPanel view to be added.
>
> The problem is this: If there are a number of possible MenuPanel views, then
> the MenuPanel presenter can't know which MenuItem view it should create
> (blue, green, red, text-based, image-based, therefore presumably each
> MenuPanel view should decide.
>
> The MenuPanel view can't be the creator of the MenuItems because it doesn't
> know which menu items should be created (for example, you might be allowed
> to see admin menu items or not - this kind of logic should not be in the
> view).
>
> So my current solution is to get the MenuPanel presenter to fetch the
> MenuItem view from the MenuPanel view.
>
> Now, if you are still following me, is this what I should be doing? Or have
> I completely lost the plot somewhere along the line?
>
> Although there are endless (generally slightly contradictory) explanations
> of MVP (and please note that I don't think I need another explanation of
> that), there isn't anything I can find that explains how to nail together
> the various self-contained MVP widgets - at least, not in a way that allows
> an event bus to operate.
>
> Ian
>
> http://examples.roughian.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: Best way for storing a static list of strings?

2009-09-02 Thread Jarda

I mean I need to provide like 100+ strings that I know at compile-
time. But I had this feeling that writing all of them directly into
code is not the proper way. (But I am far from thinking of myself like
of expert. :)

On Sep 3, 1:34 am, Daniel Jue  wrote:
> Is the static list editable?
>
> If not:
> static final String
> or
> enum
>
> Note that enums can be more complex than just named elements.
>
> 2009/9/2 Jaroslav Záruba :
>
>
>
> > Hello
>
> > What is the best way in GWT to store static list of strings?
> > I need to provide list of countries, so creating a Constants interface
> > does not seem to be the best solution.
>
> > I supposed I could store the list in properties-file (countryCode:
> > countryName) and then iterate over its keys. But I failed to
> > accomplish that as I am yet to find out how to access such files in
> > GWT-environment.
>
> > I have only seen one video about Linkers and Generators in GWT (http://
> >www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer...
> > somehow... ?
--~--~-~--~~~---~--~~
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 Google Web Toolkit for me?

2009-09-02 Thread spierce7

Hey, I'm looking to make a webapp, and right now I'm really intrigued
by what the Google Web Toolkit offers. I'm familiar with PHP, MySQL,
HTML, and CSS from a few years ago, and I've taken a few Java classes
a few years back. Right now I'm trying to make a Web App that is very
similar to a calendar that is going to manipulate dates and times and
what not. I was going to use AJAX to connect with the server, and PHP
to manipulate the dates etc. Anyways, I read some articles, such as
this: 
http://www.ryandoherty.net/2007/04/29/why-google-web-toolkit-rots-your-brain/
and was wondering what you guys have experienced with this. I LOVE
google products, so I figured this couldn't be bad, but I thought I'd
get a second oppinion before I started devoting large amounts of time
learning to do something to just find that I'd have been better off
sticking with PHP, JS, & CSS.

By the way, I'm going to need to integrate with a web database. The
obvious one for me was MySQL, but that was mainly because PHP
integrates so easily with it. What kind of options do I have with this
while using GWT? I'd rather not have to have GWT integrate with PHP,
and then MySQL, or some other ridiculous thing. What options do I have
here? Thanks in advance!

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



Iframe = multithreading ???

2009-09-02 Thread ben fenster

i was wondering that if by opening another module in an iframe tag the
code of that module runs in another thread ??
more over is the limit of 2 open http request apply on 2 diffrent
modules running in diffrent iframes ??
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Best way for storing a static list of strings?

2009-09-02 Thread Jaroslav Záruba

Hello

What is the best way in GWT to store static list of strings?
I need to provide list of countries, so creating a Constants interface
does not seem to be the best solution.

I supposed I could store the list in properties-file (countryCode:
countryName) and then iterate over its keys. But I failed to
accomplish that as I am yet to find out how to access such files in
GWT-environment.

I have only seen one video about Linkers and Generators in GWT (http://
www.youtube.com/watch?v=cyfVHNAM80E), could they be the answer...
somehow... ?
--~--~-~--~~~---~--~~
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: hosted mode trouble

2009-09-02 Thread Jeff Chimene

On 09/02/2009 02:44 PM, sidkdbl07 wrote:
> 
> I want to call a php file on my server to provide a weather service.
> When I'm running in hosted mode, response.getStatusCode() gives 0
> (zero). Is there a way to make this work in hosted mode?

Are you using hosted mode -noserver? The embedded Jetty server doesn't
know what to do w/ your php code.

> 
> public class IMFPanelWeather extends Composite {
> 
>   private VerticalPanel table = new VerticalPanel();
>   private HTML mIcon = new HTML();
>   private HTML mConditions = new HTML();
>   private HTML mTemperature = new HTML();
>   private HTML mHumidity = new HTML();
>   private HTML mClouds = new HTML();
> 
>   public IMFPanelWeather() {
>   callServerPage();
> 
>   table.add(mIcon);
>   table.add(mConditions);
>   table.add(mTemperature);
>   table.add(mHumidity);
>   table.add(mClouds);
> 
>   initWidget(table);
>   }
> 
>   private void callServerPage() {
>   RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
> URL.encode("http://www.myserver.com/weather.php5";));
> 
>   try {
>   builder.sendRequest(null , new RequestCallback() {
>   public void onError(Request request, Throwable 
> exception) {
>   
> requestFailed((RequestException)exception);
>   }
> 
>   public void onResponseReceived(Request request, 
> Response response)
> {
>   if (200 == response.getStatusCode()) {
>   try {
>   // The response was 
> successful
>   JSONValue jsonValue = 
> JSONParser.parse(response.getText());
>   JSONArray jsonArray = 
> jsonValue.isArray();
> 
>   if (jsonArray != null) {
>   
> updateTable(jsonArray);
>   } else {
>   throw new 
> JSONException();
>   }
>   } catch (Exception e) {
>   // There has been a 
> problem on the server.
>   mConditions.setHTML("No 
> data");
>   }
>   }
> 
>   }
>   });
>   }catch(RequestException e) {
>   requestFailed(e);
>   }
>   }
> 
>   private void requestFailed(RequestException pException) {
>   mConditions.setHTML("Request failed");
>   System.out.println("Weather request failed.");
>   }
> 
> }
> > 


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



hosted mode trouble

2009-09-02 Thread sidkdbl07

I want to call a php file on my server to provide a weather service.
When I'm running in hosted mode, response.getStatusCode() gives 0
(zero). Is there a way to make this work in hosted mode?

public class IMFPanelWeather extends Composite {

private VerticalPanel table = new VerticalPanel();
private HTML mIcon = new HTML();
private HTML mConditions = new HTML();
private HTML mTemperature = new HTML();
private HTML mHumidity = new HTML();
private HTML mClouds = new HTML();

public IMFPanelWeather() {
callServerPage();

table.add(mIcon);
table.add(mConditions);
table.add(mTemperature);
table.add(mHumidity);
table.add(mClouds);

initWidget(table);
}

private void callServerPage() {
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
URL.encode("http://www.myserver.com/weather.php5";));

try {
builder.sendRequest(null , new RequestCallback() {
public void onError(Request request, Throwable 
exception) {

requestFailed((RequestException)exception);
}

public void onResponseReceived(Request request, 
Response response)
{
if (200 == response.getStatusCode()) {
try {
// The response was 
successful
JSONValue jsonValue = 
JSONParser.parse(response.getText());
JSONArray jsonArray = 
jsonValue.isArray();

if (jsonArray != null) {

updateTable(jsonArray);
} else {
throw new 
JSONException();
}
} catch (Exception e) {
// There has been a 
problem on the server.
mConditions.setHTML("No 
data");
}
}

}
});
}catch(RequestException e) {
requestFailed(e);
}
}

private void requestFailed(RequestException pException) {
mConditions.setHTML("Request failed");
System.out.println("Weather request failed.");
}

}
--~--~-~--~~~---~--~~
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: translate DateTimeFormat output

2009-09-02 Thread Dominik Steiner

Hi PH,

you mean how you can set the locale for a specific language?

I added this line to the modules gwt.xml file



This one will set the locale for the language of spanish.

HTH

Dominik

On 2 Sep., 14:34, PH  wrote:
> Hi guys,
>
>  sorry if this question looks stupid, but I didn't find an answer for
> it.
>
>  How could I translate the DateTimeFormat.getFormat().format() output?
> ie.:
>
>  DateTimeFormat.getFormat(" ").format(dateobject);
>
>  from: "October 2009" to "Outubro 2009"
>
>  Tnx in advance.
>
>  Best regards,
>
>  PH
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Custom boot-strap / setting locale from request headers

2009-09-02 Thread mayop100

Hey Guys -

There's a section on this page:
http://code.google.com/webtoolkit/tutorials/1.6/i18n.html

That suggests that there's an easy way to set the user's locale by
parsing the Accept-Language header in the user's request. I want to
have my GWT app always display the locale specified in the client's
Accept-Language header - not the locale specified in the host page. I
think I should be able to write a servlet to do this... and it sounds
like this is possible based on that page, but I don't know enough
about the bootstrap process to actually make this work. Has anyone
else done this?

A more general question is - is there a way I could write a servlet
that pulls the client's browser type and locale from the request
headers and returns the appropriate GWT permutation? This would let me
skip the entire .nocache.js bootstrap process and speed up
initialization. I feel like this shouldn't be too hard, but I don't
really know what setup goes on in the nocache.js bootstrap file. Has
anyone done this before? Can this be done? or is there essential setup
that occurs in the bootstrap file?

Any help will be appreciated. Thanks!

-Andrew

--~--~-~--~~~---~--~~
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: GWTCanvas and IE...

2009-09-02 Thread Xlorep DarkHelm

That is why I explained I was using GWTCanvas from the gwt-incubator
project. Supposedly, it works with IE, at least, for what I need, I've
even been able to see it work in IE8 with their demo (of GWTCanvas
working in the gwt-incubator project). But for the life of me, I can't
get it to work myself in my own code...

On Sep 2, 11:49 am, Alexander Cherednichenko  wrote:
> IE does not support canvas well. You may use wrapper libraries, which
> dispatch output to canvas if possible, and for IE try to emulate it
> with VML.
>
> Here's blog posting about 
> this:http://lexaux.blogspot.com/2009/08/gwt-canvas-widget-drawing-in-brows...
>
> You can select among several libraries; make sure you create some
> prototypes before making a decision.
>
> I succeeded with GWT-Widgets canvas proof of concept widget.
>
> On Sep 2, 10:39 am, Xlorep DarkHelm  wrote:
>
> > Umm... for anyone trying to see what I mean, I broke the app last
> > night, and I hope to have it running soon again this morning.
>
> > On Sep 1, 1:45 pm, Xlorep DarkHelm  wrote:
>
> > > Ok I'm hitting a roadblock here, and I'm hoping that it is just
> > > something obvious that I'm unable to see.
>
> > > My situation is this -- I'm working on a simple web app, using GWT and
> > > the GWTCanvas widget from gwt-incubator.
>
> > > With the canvas, I am trying to draw little black squares, which
> > > represent values at a specific position in an array.
>
> > > To me, it is pretty straight-forward, I have a method:
>
> > > -
>
> > >         public void draw(int row, int col, int color) {
> > >                 canvas.setFillStyle(Settings.colors[color]);
> > >                 canvas.fillRect(col * Settings.PIXEL_SIZE, row *
> > > Settings.PIXEL_SIZE, Settings.PIXEL_SIZE, Settings.PIXEL_SIZE);
> > >         }
>
> > > -
>
> > > in my class that wraps the canvas. On every major browser other than
> > > IE (and I can only test with IE8... which might make a difference, I
> > > dunno...), this works exactly as I'd expect.
>
> > > In IE... it never draws anything. Like... at all. I see that my code
> > > is running (I have some text which gets updated outside the canvas),
> > > but IE isn't drawing, well... anything. This somewhat leaves my little
> > > app as pretty useless for people who visit using IE.
>
> > > Like I said... I'm hoping that it is something I'm just plain missing
> > > here. The address to my app is:
>
> > >http://showsort.appspot.com
>
> > > I'm not really trying anything elaborate with the canvas in this...
> > > just drawing some squares on it.
>
> > > Any help would be most appreciated.
>
> > > I can provide other code if it helps...
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



translate DateTimeFormat output

2009-09-02 Thread PH

Hi guys,

 sorry if this question looks stupid, but I didn't find an answer for
it.

 How could I translate the DateTimeFormat.getFormat().format() output?
ie.:

 DateTimeFormat.getFormat(" ").format(dateobject);

 from: "October 2009" to "Outubro 2009"

 Tnx in advance.

 Best regards,

 PH

--~--~-~--~~~---~--~~
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 Help in setting up GWT

2009-09-02 Thread Rahul

Hi Satya,

Here are some tutorials which tell you step by step how to work with
GWT

http://code.google.com/webtoolkit/tutorials/1.6/create.html

also you would also like this, these are some basic tutorials abt gwt

http://examples.roughian.com/#Home

On Sep 2, 4:10 am, Satya  wrote:
> Hello All,
>
> My need is to develop a web application with rich UI and deploy onto
> externat server, so i decided to use GWT.
> Can you let me understand in setting up "dynamic web project" in
> eclipse?
>
> I tried setting up project using "WebAppCreator.cmd" from gwt
> distribution but i cannot deploy that onto eclipse-integrated-tomcat-
> server. I created "dynamic web project" from eclipse but that does not
> run on hosted mode.
> I also created project by using google plugin, but no success on
> running on integrated-tomcat, but i can run this as
> "GoogleWebApplication" .
>
> How do I create a project in eclipse and proceed?
>
> Regards,
> Satya
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



PORTINGO : GWT + GoogleMAPs

2009-09-02 Thread Daniele De Gregorio

There is any kind of porting of "Advanced MarkerClusterer" in
GoogleMap library for GWT develpers
--~--~-~--~~~---~--~~
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: Catching Hyperlinks before they are executed.

2009-09-02 Thread Chris Bailey

I tried that code and that actuall activates every time something is
clicked. I only want to get the "A" tags so what I had before works a
little better. but thanks for turning me on to the anchorElement.

On Sep 2, 5:23 am, Thomas Broyer  wrote:
> On 2 sep, 04:26, Chris Bailey  wrote:
>
>
>
>
>
> > OK here is the soluction I came up with:
>
> > Event.addNativePreviewHandler(new Event.NativePreviewHandler() {
> >                         @Override
> >                         public void onPreviewNativeEvent(NativePreviewEvent 
> > event) {
> >                                 if (event.getTypeInt() == Event.ONCLICK) {
>
> >                                         // do something with the keycode
> >                                         // 
> > doSomething(event.getNativeEvent().getKeyCode());
>
> >                                         
> > if(com.google.gwt.dom.client.Element.is(event.getNativeEvent
> > ().getEventTarget())){
> >                                                 Element targetElement = 
> > (Element) Element.as(event.getNativeEvent
> > ().getEventTarget());
> >                                                 
> > if("a".equalsIgnoreCase(getTagName(targetElement))) {
> >                                                         //String hostURL = 
> > GWT.getHostPageBaseURL();
>
> >                                                         String href = 
> > DOM.getElementAttribute
> > ((com.google.gwt.user.client.Element) targetElement, "href");
>
> How about:
> EventTarget eventTarget = event.getNativeEvent().getEventTarget();
> if (AnchorElement.is(eventTarget)) {
>    AnchorElement targetElement = eventTarget.cast();
>    String href = targetElement.getHref();
>    ...
>
> I'd also wrap the whole thing within an if (!event.isCancelled())
> { ... }
>
> > check href against hostURL to see if the link is realitive or absolute
> > then do whatever you want.
>
> Oh, so you meant "relative"! I thought you meant something related to
> "real" (like, links to something "real", i.e. make a request and see
> if it returns an error)- 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 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Thank you google!

2009-09-02 Thread charlie
Err, haven't :).

On Wed, Sep 2, 2009 at 2:16 PM, charlie  wrote:

> For making programming fun again.  I really have been this excited about a
> technology in a decade and wanted to express my appreciation for all that
> you guys are doing.
>
> So 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
-~--~~~~--~~--~--~---



Thank you google!

2009-09-02 Thread charlie
For making programming fun again.  I really have been this excited about a
technology in a decade and wanted to express my appreciation for all that
you guys are doing.

So 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: Creating a plugin framework with GWT

2009-09-02 Thread David Tinker

Hi Dave

The GWT Portlets framework (http://code.google.com/p/gwtportlets/)
will do most of what you want. Developers will have to recompile your
application to add new 'plugins' (Portlets) but all your other
requirements are covered (and more).

Cheers
David

On Aug 24, 12:23 pm, Dave  wrote:
> Cheers Nathan,
>
> That's a useful response.  I didn't feel happy trying to send the UI
> classes across RPC, for the reasons you stated.  I'm still looking at
> ways, where I will let developers 'produce' plugins that consist of a
> back and frontend. So the frontend widget/java script can easily be
> loaded, although I like your HTML suggestion.
>
> On Aug 22, 9:06 pm, Nathan Wells  wrote:
>
> > Dave,
>
> > the first thing need to know is that you're attempting to break some
> > core rules. Widgets can only be created on the client-side. There are
> > numerous reasons for this, but essentially it boils down to this: RPC
> > calls should be about the model... data transfer, not UI component
> > transfer. That's not to say that what you're talking about is
> > impossible, it's just not going to be as pretty as you would like it
> > to be. You can make it so that your TreeItem contains an "HTML"
> > widget. Then you would probably provide some hook on the server-side
> > for someone to specify what that html is.
>
> > Again, this breaks the rules, though
>
> > On Aug 21, 4:56 am, Dave  wrote:
>
> > > Hi,
>
> > > I am trying to figure out how to create a pluginframeworkwithGWT,
> > > let me explain
>
> > > I have created an application that has a menu on the left side and a
> > > form on the right site of the screen.  The menu is a tree and the form
> > > is a vertical panel (think of the example mail application).
>
> > > I have created a new class called CustomTreeItem that extends
> > > TreeItem.
> > > My custom class contains a member variable which is a vertical panel.
> > > When a user click on a instance of CustomTreeItem in the menu the
> > > vertical panel is displayed on the right site of the screen.
>
> > > I would like to extend this by allowing developers to produce custom
> > > forms. i.e allow developers to add in there own CustomTreeItems,
> > > without having to recompile with my code.
> > > My inital plan was to have a directory in the classpath, so at runtime
> > > a class loader on the server side would look for any classes that were
> > > derived from my CustomTreeItem in that folder and load them.
> > > The client would make an RPC request for the tree items, so it could
> > > build up the Tree.  I quickly discovered that VerticalPanel couldn't
> > > be serialized (I assume because this is translated to javascript), so
> > > this wouldn't work.
>
> > > Is it possible for developers to create a vertical panel, and then
> > > translate it to js (storing it somewhere on the server)
> > > Then within my application if I know the name of the js/verticalpanel
> > > instance, load in and construct the panel?
>
> > > Any info/ideas/suggestions would be appreciated
>
> > > Cheers
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



What are people using for ServerPush?

2009-09-02 Thread charlie
I've seen a few gwt projects, but just wanted to get some input on what
people are using, how well it works, any pitfalls you've come across.

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: Thank you google!

2009-09-02 Thread Jim Douglas

I second that.  We're making rapid progress porting a Swing front end
to GWT.  The Google/GWT engineers have done some really impressive
work here.

On Sep 2, 12:17 pm, charlie  wrote:
> Err, haven't :).
>
> On Wed, Sep 2, 2009 at 2:16 PM, charlie  wrote:
> > For making programming fun again.  I really have been this excited about a
> > technology in a decade and wanted to express my appreciation for all that
> > you guys are doing.
>
> > So 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: blank page and other weirdness after upgrade, 1.5 to 1.7

2009-09-02 Thread Dave

Thanks ddsnelle, but I'm fairly certain that I've got the app deployed
correctly.

Regards,
Dave.

On Sep 2, 8:05 am, ddsnelle  wrote:
> Dave, make sure you have published your application to the server
> correctly.
>
> Copy the contents of this folder:  .\workspace\GWT Test Project
> 1\war
> To your webapps folder:  \webapps\gwt_test_project_1
>
> "webapps/gwt_test_project" should look like this:
>   gwt_test_project
>   WEB-INF
>   GWT_Test_Project_1.css
>   GWT_Test_Project_1.html
>
> Good luck!
>
> On Aug 25, 4:20 pm, Dave  wrote:
>
> > Thanks Rajeev.
> > I understand where the 304s are coming from (basically, cache
> > indications). I can clear these while running in hosted mode, (on
> > windows) by running delete files in Internet Tools.
> > So the main problem is the blank page. What I've discovered is that
> > using the module name ('mmcclient') as a dom identifier in the index
> > file, seems to cause the server to stop processing the entry point
> > code, and thus give me essentially a blank page.
> > Maybe this is a no-no, that I missed in the docs/readme. However, in
> > case it's a new issue I'll describe what I'm doing:
>
> > What I did is create a sample gwt project, which runs fine and lets me
> > enter my user name. Next I added
>
> >  after the h1 header line,   Web
> > Application Starter Project
>
> > so now the index file looks like:
>
> > 
> > 
> >   
> >     
> >      > href="Bcc_mmcclient_gwt_test1.css">
> >     Web Application Starter Project
> >      > src="mmcclient/mmcclient.nocache.js">
> >   
> >   
> >     Web Application Starter Project
> >         
>
> >     
> >       
> >         Please enter your
> > name:
> >       
> >       
> >         
> >         
> >       
> >     
> >   
> > 
>
> > I also inserted a trace statement in the entry point method:
> > System.out.println("in entry point"); so now the MMCClient class looks
> > like:
>
> > public class MMCClient implements EntryPoint {
> >         private static final String SERVER_ERROR = "An error occurred while 
> > "
> >                         + "attempting to contact the server. Please check 
> > your network "
> >                         + "connection and try again.";
>
> >         private final GreetingServiceAsync greetingService = GWT
> >                         .create(GreetingService.class);
>
> >         public void onModuleLoad() {
> >                 System.out.println("in entry point");
>
> >                 final Button sendButton = new Button("Send");
> >                 final TextBox nameField = new TextBox();
> >                 nameField.setText("GWT User");
> > ...
>
> > }
>
> > After clean and build, and gwt compile, when I run the gwt launcher, I
> > only see
> >   Web Application Starter Project
> >        Please enter your name:
>
> > There is no input field or send button and the host browser status
> > line says 'Done'
>
> > Now, if I change the div id to xmmcclient, as  > div>, and run it again, everything works.
>
> > So my conclusion is not to use the module name as a DOM ID...
>
> > Am I onto something? - sorry if this is already documented somewhere
> > obvious -
>
> > Thanks,
> > Dave
>
> > On Aug 25, 9:20 am, Rajeev Dayal  wrote:> Hey Dave,
> > > A couple things to try:
>
> > > -Blow away the mmclient subdirectory located under your war directory
> > > -Clear your FF3 cache
>
> > > Try that out and see if that helps. If not, post back here and we'll dig
> > > deeper.
>
> > > Rajeev
>
> > > On Mon, Aug 24, 2009 at 2:36 PM, Dave  wrote:
>
> > > > Hi all,
>
> > > > I'm getting several problems after upgrading to 1.7.
> > > > In hosted mode:
> > > > - all the http status codes are 304 (Not Modified)
> > > > - I only see a blank page
> > > > - when I Compile/Browse, FF3 tells me GWT Module needs to be (re)
> > > > compiled, (I've tried refreshing first - same thing)
> > > > - if I change the module name to something bogus in my host html file,
> > > > and refresh, things seem to work.
> > > > For example, when I change from  to  > > > id="x_mmcclient">, I still get 304s, but I also get
> > > >  [ERROR] Unable to load module entry point ...
> > > >   com.google.gwt.core.client.JavaScriptException: (Error): Invalid
> > > > argument.
> > > >     number: -2147024809
> > > >   description: Invalid argument.
> > > >  [ERROR] Failure to load module 'mmcclient'
> > > > with the line number of my entry point class where I call
> > > >  RootPanel.get("mmcclient").add(containerLayout);
>
> > > > But then the module is loaded and my app is fine. No blank page!
>
> > > > - finally, one of my css resource directories (sc) must be copied into
> > > > the public root, otherwise it will not be found.
>
> > > > Some further info,
> > > > the war directory structure looks like this (my module name is
> > > > mmcclient),
> > > > - war
> > > >  - conf
> > > >  - images
> > > >  - mmcclient
> > > >  - sc
> > > >  - WEB-INF
> > > >  - MMCClient.css
> > > >  - MMCClient.html
>
> > > > The module is loaded 

GWT, MVP, and nested widgets

2009-09-02 Thread Ian Bambury
Hi all,

I have a question for the GWT-MVP experts out there. If there is a more
suitable forum, please let me know.

I have a menu panel which contains a flowpanel for menu items, and another
flowpanel where the required page will display itself when the associated
menu item is clicked.

The MenuPanel presenter is creating menu items and sending the MenuItem
views to the MenuPanel view to be added.

The problem is this: If there are a number of possible MenuPanel views, then
the MenuPanel presenter can't know which MenuItem view it should create
(blue, green, red, text-based, image-based, therefore presumably each
MenuPanel view should decide.

The MenuPanel view can't be the creator of the MenuItems because it doesn't
know which menu items should be created (for example, you might be allowed
to see admin menu items or not - this kind of logic should not be in the
view).

So my current solution is to get the MenuPanel presenter to fetch the
MenuItem view from the MenuPanel view.

Now, if you are still following me, is this what I should be doing? Or have
I completely lost the plot somewhere along the line?

Although there are endless (generally slightly contradictory) explanations
of MVP (and please note that I don't think I need another explanation of
that), there isn't anything I can find that explains how to nail together
the various self-contained MVP widgets - at least, not in a way that allows
an event bus to operate.

Ian

http://examples.roughian.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: GWTCanvas and IE...

2009-09-02 Thread Alexander Cherednichenko

IE does not support canvas well. You may use wrapper libraries, which
dispatch output to canvas if possible, and for IE try to emulate it
with VML.

Here's blog posting about this:
http://lexaux.blogspot.com/2009/08/gwt-canvas-widget-drawing-in-browser.html

You can select among several libraries; make sure you create some
prototypes before making a decision.

I succeeded with GWT-Widgets canvas proof of concept widget.

On Sep 2, 10:39 am, Xlorep DarkHelm  wrote:
> Umm... for anyone trying to see what I mean, I broke the app last
> night, and I hope to have it running soon again this morning.
>
> On Sep 1, 1:45 pm, Xlorep DarkHelm  wrote:
>
> > Ok I'm hitting a roadblock here, and I'm hoping that it is just
> > something obvious that I'm unable to see.
>
> > My situation is this -- I'm working on a simple web app, using GWT and
> > the GWTCanvas widget from gwt-incubator.
>
> > With the canvas, I am trying to draw little black squares, which
> > represent values at a specific position in an array.
>
> > To me, it is pretty straight-forward, I have a method:
>
> > -
>
> >         public void draw(int row, int col, int color) {
> >                 canvas.setFillStyle(Settings.colors[color]);
> >                 canvas.fillRect(col * Settings.PIXEL_SIZE, row *
> > Settings.PIXEL_SIZE, Settings.PIXEL_SIZE, Settings.PIXEL_SIZE);
> >         }
>
> > -
>
> > in my class that wraps the canvas. On every major browser other than
> > IE (and I can only test with IE8... which might make a difference, I
> > dunno...), this works exactly as I'd expect.
>
> > In IE... it never draws anything. Like... at all. I see that my code
> > is running (I have some text which gets updated outside the canvas),
> > but IE isn't drawing, well... anything. This somewhat leaves my little
> > app as pretty useless for people who visit using IE.
>
> > Like I said... I'm hoping that it is something I'm just plain missing
> > here. The address to my app is:
>
> >http://showsort.appspot.com
>
> > I'm not really trying anything elaborate with the canvas in this...
> > just drawing some squares on it.
>
> > Any help would be most appreciated.
>
> > I can provide other code if it helps...
--~--~-~--~~~---~--~~
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: Using javascript widget in a GWT widget

2009-09-02 Thread Sumit Chandel
Hi Yossi,
You can wrap accesses to the external widget that you want to include using
JavaScript Native Interface (JSNI) methods from the widget class that you
want to use as the container. Check out the documentation on using JSNI
below and let us know if that solves your problem.

JavaScript Native Interface methods:
http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideJavaScriptNativeInterface

Hope that helps,
-Sumit Chandel

On Sun, Aug 30, 2009 at 3:19 PM, Yossi  wrote:

>
> Hi All,
>
> I found a widget on the web that I want to use in my GWT application.
>
> I want to be able to add it inside a widget and to wrap it with some
> java methods (like setting the height, width, getting value and
> more...)
>
> Can someone post a simple example of how this is done or link an
> article about this.
>
> I searched the web for it and found nothing.
>
> Thanks,
> Yossi
>
> >
>

--~--~-~--~~~---~--~~
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: "semaphores" in gwt

2009-09-02 Thread Sumit Chandel
Hi Jaap,
I would also consider restructuring your code to only require one RPC call,
where the data you needed to get from both individual calls can be returned
in that one single call. This would be ideal if the payload would still be
of a reasonable size as you would avoid extra HTTP roundtrips and sidestep
the hit in execution speed when starting up your application using nested
calls or waiting on a flag.

Hope that helps,
-Sumit Chandel

On Sat, Aug 29, 2009 at 5:20 PM, Jaap  wrote:

>
> Hi,
>
> When starting my webapp I do two RPC calls. I need the data of both of
> them in order to display something. If you work with threads with a
> native program you just use semaphores to achieve this. What's the
> way to do this in GWT?
>
> Thanks
>
> Jaap
> >
>

--~--~-~--~~~---~--~~
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: DOM.getElementById() vs $doc.getElementById()

2009-09-02 Thread Bob Rozelle



>FYI, I'm using UIObject.setVisible(element, true) with the same effect
>but a bit more readable IMO ;-)
Thanks, there are a lot of ways to skin a cat, but 1 line for 3 is a
nice trade off.

>> I've gotten username/password autofill working in Firefox, Chrome,
>> Opera, Safari, but not IE; still trying to figure that out.

>That's most probably because of the following line:

>> parentPanel.add(form);//Moves the form in the DOM

>Try keeping the form where it originally lives in the markup and see
>if it changes something (I bet it does!)

I know its because of that line, but I want the form to show up
there.  I guess, if IE requires that, I'll try a Z-axis and position
move to get it sitting over where I want it to be without adding to my
panel.

Regards,
Bob

--~--~-~--~~~---~--~~
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: Pls, help to parse ASP.NET JSON Date format.

2009-09-02 Thread Mike Chaliy

Huh... Seems I need some sleep... Thank you very much!

On 2 Вер, 19:35, Thomas Broyer  wrote:
> On 2 sep, 17:17, Mike Chaliy  wrote:
>
> > Hi everyone,
>
> > ASP.NET JSON serialize DateTime into the following format "\/Date
> > (1251877601000)\/". Pls, help parse this string into the java(GWT)
> > Date object.
>
> > At this time the solution I came with is native javascript parsing
> > with regex, extract long.. but then I cannot push long through JSNI. I
> > hope to find something better.
>
> Let's try something:
>
> String dateStr = "/Date(1251877601000)/";
>
> // start by extracting the timestamp
> dateStr = dateStr.substring(6, dateStr.length() - 2);
> // we could have used dateStr.replace("/Date(", "").replace(")/", "")
> too
>
> // now convert this to a long
> long  timestamp = Long.parseLong(dateStr);
>
> // then to a date:
> Date d = new Date(timestamp);
--~--~-~--~~~---~--~~
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: DOM.getElementById() vs $doc.getElementById()

2009-09-02 Thread Thad

On Sep 1, 6:30 pm, Thomas Broyer  wrote:
> On 2 sep, 00:16, Thad  wrote:
>
> > Using Document.get().getElementById() returns an element, but it has
> > no value:
>
> >         Element el = Document.get().getElementById("username");
> >         if (el != null)
> >                 GWT.log("element: "+el.getNodeValue(), null);
>
> > prints only "element: " in the console.
>
> Try el.cast().getValue() instead; getNodeValue() is a
> "generic" DOM method that cannot be aware of the ".value" property
> specific to InputElement's.

Thanks.  This works:
String name = ((InputElement)Document.get().getElementById
("username")).getValue();
Using a native function was no big deal, but this code seems cleaner.

> > Right now I'm having bigger problems trying to do things 
> > byhttp://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecur...
> > --
> > When the logon is successful, I hide the logon RootPanel , show
> > the application RootPanel , and add my widget to the application
> > .  This works fine in Firefox and Safari, but in IE7, I get a
> > blank browser.  The application  never shows.
>
> Any JS error? does it work in hosted mode?
>
> > Whoever wrote the LoginSecurityFAQ, it's time "TODO: Expand on this
> > section" on the auto-complete section.  :)
>
> From the comments on that 
> page:http://groups.google.fr/group/Google-Web-Toolkit/t/2b2ce0b6aaa82461

I've followed the link above.  What I have works excellently in hosted
mode, as well as in Firefox 3.5, and Safari 4--the browser's password
manager is triggered, and the user is logged in.  However I've still
no luck with IE7 (and no Javascript error indicated).

Does IE have a problem with hiding/showing DIV's?  The form behaves
properly.  injectLoginFunction() works (see below), the doLogin()
method is called, and the user logged in (so says my server's
console).  As you see below, on a successful login, the LOGIN_DIV in
the original panel is hidden, the APPLICATION_DIV is made visible, and
the application's MainWindowWidget is created and added to the
APPLICATION_DIV.  (After a user logs off the server, the showLoginDiv
() method is called, and we start over.)

As I said, this works in hosted mode, Firefox 3.5, and Safari 4.  In
IE, after the login completes, all I see is a blank browser, and
"Done" in the lower left message area (no JS error).

Is there another way to handle this that will work with IE?

private static native void injectLoginFunction() /*-{
$wnd.__gwt_login = function() {
@com.mycorp.web.client.Workstation::doLogin()();
};
}-*/;

@SuppressWarnings("unused")
private static void doLogin() {
final RootPanel applPanel = RootPanel.get
(Workstation.APPLICATION_DIV);
final RootPanel logonPanel = RootPanel.get(Workstation.LOGIN_DIV);
AsyncCallback callback = new AsyncCallback() {
public void onSuccess(LoginInformation result) {
Workstation.setLoginInfo(result);
logonPanel.setVisible(false);
applPanel.setVisible(true);
MainWindowWidget mw = new MainWindowWidget();
applPanel.add(mw);
}
public void onFailure(Throwable caught) {
if 
(caught.getMessage().contains("java.net.ConnectException"))
Window.alert("Cannot connect to server.\n"+
"Server name or RPC number 
invalid.");
else
Window.alert(caught.getMessage());
}
};

String name = ((InputElement)Document.get().getElementById
("username")).getValue();
String pw = ((InputElement)Document.get().getElementById
("password")).getValue();
String svr = ((InputElement)Document.get().getElementById
("server")).getValue();
ClientInfo ci = new ClientInfo();
LiloServicesAsync service = (LiloServicesAsync) GWT.create
(LiloServices.class);
service.doLogin(name, pw, svr, ci, callback);
}

public static void showLoginDiv() {
RootPanel applPanel = RootPanel.get(Workstation.APPLICATION_DIV);
applPanel.clear();
applPanel.setVisible(false);
RootPanel logonPanel = RootPanel.get(Workstation.LOGIN_DIV);
logonPanel.setVisible(true);
}
--~--~-~--~~~---~--~~
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 use multiple servers in a single client

2009-09-02 Thread Sumit Chandel
Hi Ganesh,
You can also consider using the JSONP technique, which allows you to mash up
services from various origins in a single application. Dan Morrill wrote an
excellent article treating this subject on the GWT Articles page. I
recommend checking it out if JSONP sounds like a viable solution in your
case.

Using GWT for JSON Mashups:
http://code.google.com/webtoolkit/articles/using_gwt_for_json_mashups.html

Hope
that helps,
-Sumit Chandel

On Fri, Aug 28, 2009 at 6:11 AM, Ganesh  wrote:

>
> Hi
>
> I am working on a GWT application. In this, what my client needs is I
> send calls to different servers on basis of request types.
>
> Suppose there are 4 request types SELECT/INSERT/UPDATE/DELETE on basis
> of operation to be performed on server. If request type is SELECT, we
> need to send request to SERVER_1 and if request type is INSERT, UPDATE
> OR DELETE, we need to send request to SERVER_2.
>
> Now my question is how to send call to 2 different servers through
> same client window.
>
> Please help
>
> Ganesh Bansal
> >
>

--~--~-~--~~~---~--~~
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: gin + Javascript Overlay types

2009-09-02 Thread Jeff Chimene

On 09/02/2009 10:37 AM, Sumit Chandel wrote:
> Hi Jeff,
> 
> I haven't used the GIN library extensively enough to know how it would
> handle binding JSO types offhand, but you might have better luck getting
> a useful reply on the google-gin discussion group if you haven't posted
> there already.
> 
> Google GIN Discussion Group:
> http://groups.google.com/group/google-gin
> 
> Cheers,
> -Sumit Chandel

Hi Sumit:

I haven't used Gin extensively enough to realize there is a Gin list ...

/me sighs

Thanks for the pointer!

--~--~-~--~~~---~--~~
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 application does not run ie7

2009-09-02 Thread Ian Bambury
7.0.6001.18000
Setting all css tags to the same for all browsers. E.g. body tags have
varying amounts of margin/padding etc depending on the browser. So set them
all to 0 and then build it all up again to what *you* want it to be.

Ian

http://examples.roughian.com


2009/9/2 aftershock 

>
> What is your IE7 version?
> What do you mean by leveling css?
>
> >
>

--~--~-~--~~~---~--~~
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: javax.persistence package

2009-09-02 Thread Tolga Özdemir
Hi, hmm it sounds good..
I downloaded a sample gwt project with dozer (the music store)..When I look
at the file structure, I noticed that this sample contains all mapping files
and DTOs.. Including I have to write a dozer map file..

In my own sample project I did the same putting my DTOs into the client side
directly without dozer map but it still works...

I wonder what dozer gives me as an advantage - it seems it does not
guarantee writing less config files? is it a security issue that we do not
to put DTOs in client side in dozer project?

Thanks,

Tolga






On Wed, Sep 2, 2009 at 4:54 PM, Dalla  wrote:

>
> Yes, exactly.
>
> This is pretty much it:
>
> DozerBeanMapper mapper = new DozerBeanMapper();
>
> //This is a mapping from EJB to POJO
> //SimpleHeader is my POJO, purchaseOrderHeader is an instance of the
> corresponding EJB.
> SimpleHeader header = (SimpleHeader) mapper.map(purchaseOrderHeader,
> SimpleHeader.class);
>
> //Mapping from POJO back to EJB looks exactly the same
> //Here, Arrivals is the EJB, arrivaldata is an instance of the
> corresponding POJO
> Arrivals arrivals = (Arrivals) mapper.map(arrivaldata,
> Arrivals.class);
>
> So if you already have EJBs and want to use Dozer, all you have to do
> is basically make a copy of your EJB, remove all annotations
> and imports of javax.* packages, create a default no argument
> constructor, and make the new POJO implement IsSerializable.
>
> On 2 Sep, 14:19, Tolga Özdemir  wrote:
> > hmm.. you mean your EJB classes - your DTOs - are in serverside and by
> using
> > dozer.. you automatically translate them and use in client side, right?
> >
> >
> >
> >
> >
> > On Wed, Sep 2, 2009 at 3:03 PM, Dalla  wrote:
> >
> > > Correct, not on the client side anyway.
> > > GWT does not emulate  javax.persistence.*, importing that package on
> > > the client side would cause errors when compiling.
> > > However you COULD use EJB3, if you keep the mappings in a separate
> > > file. But´s that´s not very flexible.
> >
> > > I use EJB3 myself on the server side, and then use Dozer to convert
> > > the EJBs to POJOs before sending them to the client.
> > > Once the objects is sent back, you convert it back to an EJB, Works
> > > like a charm so far.
> >
> > > On 2 Sep, 13:26, Tolga Özdemir  wrote:
> > > > oh..it does mean we cannot use ejb3 yet.. right?
> >
> > > > On Wed, Sep 2, 2009 at 2:13 PM, David Given 
> wrote:
> >
> > > > > tolga ozdemir wrote:
> > > > > [...]
> > > > > > Can you enlighten me wheather we could use javax.persistence.* in
> our
> > > > > > serialized DTO objects for the sake of RPC??
> >
> > > > > > can I use @Table, @Id or other annotations?
> >
> > > > > The GWT runtime ignores annotations --- they're not kept at runtime
> on
> > > > > the client. So you can pass annotated objects perfectly happily
> over
> > > the
> > > > > link and they'll work fine.
> >
> > > > > I've had good experiences using Berkeley DB JE and GWT. It's
> possible
> > > to
> > > > > query an object on the server, have Berkeley DB instantiate it for
> me,
> > > > > and then just return it directly to the client for display. So I'd
> > > > > imagine you could use something similar with javax.persistence.
> >
> > > > > The only thing you probably need to be concerned with is that if
> you
> > > > > instantiate an object on the server, pass it to the client, then
> pass
> > > it
> > > > > back to the server, you're getting a different physical object than
> the
> > > > > one you originally instantiated so the persistence layer might get
> its
> > > > > cacheing confused. (Berkeley DB doesn't seem to be bothered by
> this.)
> >
> > > > > --
> > > > > ┌─── dg@cowlark.com ─http://www.cowlark.com─
> > > > > │
> > > > > │ "They laughed at Newton. They laughed at Einstein. Of course,
> they
> > > > > │ also laughed at Bozo the Clown." --- Carl Sagan
> >
> > > > --
> > > > Tolga Özdemir
> >
> > > > Mobile 0 536 963 7890
> > > > MSN ozde...@hotmail.com- Dölj citerad text -
> >
> > > > - Visa citerad text -
> >
> > --
> > Tolga Özdemir
> >
> > Mobile 0 536 963 7890
> > MSN ozde...@hotmail.com- Dölj citerad text -
> >
> > - Visa citerad text -
> >
>


-- 
Tolga Özdemir

Mobile 0 536 963 7890
MSN ozde...@hotmail.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: Gwt Portlets and Fries on the side

2009-09-02 Thread David Tinker

Hi Shannon

You can use GWT Portlets with whatever widget libraries you like. It
provides a portal server like environment and programming model. Your
portlets can be built using any set of GWT Widgets including "ExtGwt".
We are planning to add some more demos to GWT Portlets using different
widget libraries (e.g. the pageable grid from the incubator project).

Cheers
David

On Aug 21, 4:53 pm, Shannon Sumner  wrote:
> Hello all,
>
> I need your advice.  I've really fallen in love withGwtfor my web
> projects - especially "ExtGwt".  I've been using the tool to create
> very attractive apps for my company intranet.  My boss would like me
> to assemble these apps within a portal structure.  I've read a lot
> about doing this and I'm not certain JSR-168 portal is right forGwt.
> I've read some articles about OpenSocial and am leaning in that
> direction.  I'm not sure if OpenSocial containers handle
> authentication and saving widget states.  I'm also a bit concerned
> that Apache Shindig (OpenSocial Container) is still in the incubator.
>
> I'm sure the Apache Shindig container is lightweight enough where I
> could "skin" it to make it look like a Ext Js Portal.  Has anyone else
> attempted this?  Would you recommend a more traditional portal
> environment like JBoss or LifeRay?
>
> I noticed an article on OnGwt.com about "GwtPortlets" (http://
> code.google.com/p/gwtportlets/).  It looks like what I'm after but I
> would have to supply all the widgets myself.  OpenSocial and JSR-168
> Portals have tons ofportlets/widgets available from day one.
>
> I really don't know where to turn.  I'm reaching out to theGwt
> community and asking for your advice.  Please let me know what you
> think.
>
> Shannon
>
> P.S. Can I HaveFrieswith That?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



wide linebreak after html code before embedded gwt application

2009-09-02 Thread aftershock

Hi,

I noticed there is at least two line linebreak after top html code
before embedded gwt application in case of IE6/7/8, For other browser,
this cannot be seen.

E.g. html code


mymenu


There will be two lines after mymenu and gwt application. Note the
application uses absolute panel which may be relevant.
There is no problem if there is no mymenu like html code. A very
simple text already produces this effect.
Moving up the gwt application by repositioning the absolute y
coordinate does not help because then the top of the application is
hidden by the white horizontal wide "line".


Any ideas? 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 determine space available to RootPanel.get('some_div')?

2009-09-02 Thread jah
On 02/09/2009 17:56, Ian Bambury wrote:
> What exactly is it you are trying to get the space of? The total
> browser window, or some element of the html?
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/9/2 jahcasa mailto:jahbo...@gmail.com>>
>
> Thanks Ian.
>
> I've tried using getOffsetHeight/Width and whilst it seems to work OK
> in Hosted mode, it doesn't in Firefox.  Specifically, getOffsetWidth
> returns the correct width,  but getOffsetHeight returns zero,
> presumably because at that time, the div is empty and has a height of
> zero.
>
> Just want to be clear that I'm trying to get the available space,
> before adding anything to rootPanel, such that the content to be added
> will fit inside the browser and inside the allotted div element and
> will all be visible without the need to scroll.
>
> I'm thinking that I may need to add rows to the Grid one at a time and
> back-off when Window getClientHeight or getScrollTop increases.  I'm
> not sure how I'll do that at the moment, I'll have to experiment.
> Does it sound like a feasible solution?
>
> jah
>
>
Oops, forgot to reply to the list.

I'm trying to get the dimensions of the RootPanel which will be bound to
an html div element in the host page.  The app can be added to any
webpage (as long as it's got the required div) and those webpages may
well have headers, footers and sidebars so I want to determine what
space is available to the div - taking into account any surrounding
elements.

jah

--~--~-~--~~~---~--~~
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: gin + Javascript Overlay types

2009-09-02 Thread Sumit Chandel
Hi Jeff,
I haven't used the GIN library extensively enough to know how it would
handle binding JSO types offhand, but you might have better luck getting a
useful reply on the google-gin discussion group if you haven't posted there
already.

Google GIN Discussion Group:
http://groups.google.com/group/google-gin

Cheers,
-Sumit Chandel

On Sat, Aug 29, 2009 at 6:01 PM, Jeff Chimene  wrote:

>
> Hi,
>
> Is it expected that the following binding to a JSO type would fail?
>
>bind(Jsot.class).in(Singleton.class)
>
> The issue is: "Deferred binding failed for
> 'com.google.gwt.core.client.JavaScriptObject"
>
> The get() method in the JSO type is
>
>public final native Jsot get() /*-{
>return this;
>}-*/;
>
> However, if I create the following binding:
>
>bind(Jsot.class).toProvider(JsotProvider.class)
>
> that has the following get() method
>
>private Jsot jsot;
>public Jsot get() {
>  return jsot;
>}
>
> everything is copacetic.
>
> Thomas Broyer and I were talking earlier about using Provider methods
> with JSO types. He mentioned the @Provides annotation, but I cannot get
> that to work either.
>
> >
>

--~--~-~--~~~---~--~~
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: Upload PDF and Parse it

2009-09-02 Thread Daniel Jue

After you initiate the file upload, you're going to want to do all the
parsing on the server side, using some existing PDF reading library
that has nothing to do with GWT.

On Wed, Sep 2, 2009 at 3:35 AM, Sara
Broderick wrote:
>
> Good Morning, I have just stumbled across the google web toolkit and
> am going to utilise it for a college project.  I see a company
> Scenechronize has used the toolkit to build they site and I am
> particularly interested in the upload PDF / Parse PDF functionality.
>
> Is there functionality to perform this task in GWT as I am looking to
> do something similar with PDF file upload / read / parse
>
> I would really appreciate any advice.
>
> Sara
>
> >
>

--~--~-~--~~~---~--~~
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: Hosted-mode - how to set the Jetty URL?

2009-09-02 Thread Thomas Broyer



On 2 sep, 11:26, "tedlief...@gmail.com"  wrote:
> I am trying to work through the getting started tutorial.  I am on a
> mac with Atempo live-update that is already running on  and as a
> result the hosted mode jetty server can't start properly.  How do I
> configure the hosted mode to use a different port?

-port 8080 ?
--~--~-~--~~~---~--~~
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: Pls, help to parse ASP.NET JSON Date format.

2009-09-02 Thread Thomas Broyer


On 2 sep, 17:17, Mike Chaliy  wrote:
> Hi everyone,
>
> ASP.NET JSON serialize DateTime into the following format "\/Date
> (1251877601000)\/". Pls, help parse this string into the java(GWT)
> Date object.
>
> At this time the solution I came with is native javascript parsing
> with regex, extract long.. but then I cannot push long through JSNI. I
> hope to find something better.

Let's try something:

String dateStr = "/Date(1251877601000)/";

// start by extracting the timestamp
dateStr = dateStr.substring(6, dateStr.length() - 2);
// we could have used dateStr.replace("/Date(", "").replace(")/", "")
too

// now convert this to a long
long  timestamp = Long.parseLong(dateStr);

// then to a date:
Date d = new Date(timestamp);
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Hosted-mode - how to set the Jetty URL?

2009-09-02 Thread tedlief...@gmail.com

I am trying to work through the getting started tutorial.  I am on a
mac with Atempo live-update that is already running on  and as a
result the hosted mode jetty server can't start properly.  How do I
configure the hosted mode to use a different port?

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



Upload PDF and Parse it

2009-09-02 Thread Sara Broderick

Good Morning, I have just stumbled across the google web toolkit and
am going to utilise it for a college project.  I see a company
Scenechronize has used the toolkit to build they site and I am
particularly interested in the upload PDF / Parse PDF functionality.

Is there functionality to perform this task in GWT as I am looking to
do something similar with PDF file upload / read / parse

I would really appreciate any advice.

Sara

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



Need Help in setting up GWT

2009-09-02 Thread Satya

Hello All,

My need is to develop a web application with rich UI and deploy onto
externat server, so i decided to use GWT.
Can you let me understand in setting up "dynamic web project" in
eclipse?

I tried setting up project using "WebAppCreator.cmd" from gwt
distribution but i cannot deploy that onto eclipse-integrated-tomcat-
server. I created "dynamic web project" from eclipse but that does not
run on hosted mode.
I also created project by using google plugin, but no success on
running on integrated-tomcat, but i can run this as
"GoogleWebApplication" .

How do I create a project in eclipse and proceed?

Regards,
Satya

--~--~-~--~~~---~--~~
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: RAD 7.5 with GWT 1.7

2009-09-02 Thread dinesh shivram
hi

my name dinesh working for CTS bangalore so u want know how to deploy the
project to WAS server 7.0
how to make webservice call right do give  call.k call me on friday i will
explain u k my contact number is 9986625114 if want a help for me u call me.

On Tue, Sep 1, 2009 at 8:05 PM, Deepa  wrote:

>
> Hi All,
> Currently we are designing a web application using GWT 1.7 with RAD
> 7.5.
>
> I am very new to GWT
>
> I want to know if you can please help me with following:
>  how to deploy the project to WAS server 7.0
> how to make webservice call
> Intially we were able to deploy the project through tomcat builtin
> with GWT. but when tried accessing webservice it was givig a 404
> error. Asking to publish the webservice.
>
> Can anybody please help with it.
>
> Thanks in advance.
>
> >
>

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



Re: CSS: how get the rule

2009-09-02 Thread Nathan Wells

I'm not exactly clear on what you're looking for, but you probably
want to use

Element.getStyle()

once you have a handle on the element (however you do that), you just
call getStyle() which will return the element's style object. I'm not
sure if that will include the styles from the CSS files or not.

On Sep 1, 12:44 am, sgiudice  wrote:
> I need to set in dynamic mode the font size of my widgets; for gwt
> widgets I defined a .css file, how I could read these properties to
> modify other external objects (like flash objects)? Is it possible to
> read the css property like "font-size" with gwt SDK (in DOM there are
> objects like styleSheet and properties like cssRules[])?
>
> 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
-~--~~~~--~~--~--~---



Pls, help to parse ASP.NET JSON Date format.

2009-09-02 Thread Mike Chaliy

Hi everyone,

ASP.NET JSON serialize DateTime into the following format "\/Date
(1251877601000)\/". Pls, help parse this string into the java(GWT)
Date object.

At this time the solution I came with is native javascript parsing
with regex, extract long.. but then I cannot push long through JSNI. I
hope to find something better.

--~--~-~--~~~---~--~~
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: blank page and other weirdness after upgrade, 1.5 to 1.7

2009-09-02 Thread ddsnelle

Dave, make sure you have published your application to the server
correctly.

Copy the contents of this folder:  .\workspace\GWT Test Project
1\war
To your webapps folder:  \webapps\gwt_test_project_1

"webapps/gwt_test_project" should look like this:
  gwt_test_project
  WEB-INF
  GWT_Test_Project_1.css
  GWT_Test_Project_1.html

Good luck!


On Aug 25, 4:20 pm, Dave  wrote:
> Thanks Rajeev.
> I understand where the 304s are coming from (basically, cache
> indications). I can clear these while running in hosted mode, (on
> windows) by running delete files in Internet Tools.
> So the main problem is the blank page. What I've discovered is that
> using the module name ('mmcclient') as a dom identifier in the index
> file, seems to cause the server to stop processing the entry point
> code, and thus give me essentially a blank page.
> Maybe this is a no-no, that I missed in the docs/readme. However, in
> case it's a new issue I'll describe what I'm doing:
>
> What I did is create a sample gwt project, which runs fine and lets me
> enter my user name. Next I added
>
>  after the h1 header line,   Web
> Application Starter Project
>
> so now the index file looks like:
>
> 
> 
>   
>     
>      href="Bcc_mmcclient_gwt_test1.css">
>     Web Application Starter Project
>      src="mmcclient/mmcclient.nocache.js">
>   
>   
>     Web Application Starter Project
>         
>
>     
>       
>         Please enter your
> name:
>       
>       
>         
>         
>       
>     
>   
> 
>
> I also inserted a trace statement in the entry point method:
> System.out.println("in entry point"); so now the MMCClient class looks
> like:
>
> public class MMCClient implements EntryPoint {
>         private static final String SERVER_ERROR = "An error occurred while "
>                         + "attempting to contact the server. Please check 
> your network "
>                         + "connection and try again.";
>
>         private final GreetingServiceAsync greetingService = GWT
>                         .create(GreetingService.class);
>
>         public void onModuleLoad() {
>                 System.out.println("in entry point");
>
>                 final Button sendButton = new Button("Send");
>                 final TextBox nameField = new TextBox();
>                 nameField.setText("GWT User");
> ...
>
> }
>
> After clean and build, and gwt compile, when I run the gwt launcher, I
> only see
>   Web Application Starter Project
>        Please enter your name:
>
> There is no input field or send button and the host browser status
> line says 'Done'
>
> Now, if I change the div id to xmmcclient, as  div>, and run it again, everything works.
>
> So my conclusion is not to use the module name as a DOM ID...
>
> Am I onto something? - sorry if this is already documented somewhere
> obvious -
>
> Thanks,
> Dave
>
> On Aug 25, 9:20 am, Rajeev Dayal  wrote:> Hey Dave,
> > A couple things to try:
>
> > -Blow away the mmclient subdirectory located under your war directory
> > -Clear your FF3 cache
>
> > Try that out and see if that helps. If not, post back here and we'll dig
> > deeper.
>
> > Rajeev
>
> > On Mon, Aug 24, 2009 at 2:36 PM, Dave  wrote:
>
> > > Hi all,
>
> > > I'm getting several problems after upgrading to 1.7.
> > > In hosted mode:
> > > - all the http status codes are 304 (Not Modified)
> > > - I only see a blank page
> > > - when I Compile/Browse, FF3 tells me GWT Module needs to be (re)
> > > compiled, (I've tried refreshing first - same thing)
> > > - if I change the module name to something bogus in my host html file,
> > > and refresh, things seem to work.
> > > For example, when I change from  to  > > id="x_mmcclient">, I still get 304s, but I also get
> > >  [ERROR] Unable to load module entry point ...
> > >   com.google.gwt.core.client.JavaScriptException: (Error): Invalid
> > > argument.
> > >     number: -2147024809
> > >   description: Invalid argument.
> > >  [ERROR] Failure to load module 'mmcclient'
> > > with the line number of my entry point class where I call
> > >  RootPanel.get("mmcclient").add(containerLayout);
>
> > > But then the module is loaded and my app is fine. No blank page!
>
> > > - finally, one of my css resource directories (sc) must be copied into
> > > the public root, otherwise it will not be found.
>
> > > Some further info,
> > > the war directory structure looks like this (my module name is
> > > mmcclient),
> > > - war
> > >  - conf
> > >  - images
> > >  - mmcclient
> > >  - sc
> > >  - WEB-INF
> > >  - MMCClient.css
> > >  - MMCClient.html
>
> > > The module is loaded from the host html as:
> > >     > > src="mmcclient/mmcclient.nocache.js">
> > > Even when I get a blank page, I believe this file is being found.
> > > (Firebug shows its JS functions).
>
> > > I'm working with the Eclipse (3.4.2) GWT plugin, if that's important.
>
> > > Thanks for any advice!
> > > -Dave

--~--~-~--~~~---~--~~
You received this message beca

Re: question from a novice in GWT

2009-09-02 Thread Chad

@nyankov: Simple, really. Leave your current (non-GWT) site intact.
Then, create a separate application (GWT) with a vertical panel
containing a frame and the toolbar. Disable the window scroll bars.
Add a window resize handler to keep your vertical panel sized full
page (or maybe just set the vertical panel height and width to 100%).
Make sure the toolbar height is set absolutely. Set the url of your
frame to that of your original site (relative path should work being
on the same server). The frame will have scroll bars if needed. That
should do it, I think.

If you don't like that idea, you could always use frame sets (yuck)
and create two frames (vertically). Just put your current site in the
top frame and your GWT site (toolbar) in the bottom frame. Assuming
you want to change pages via the toolbar, you'd be better off with the
solution above over frame set.

@Ian: I think that's what the OP was doing originally, but was unhappy
with the jumpiness on scrolling and resizing.

On Sep 2, 5:08 am, Ian Bambury  wrote:
> Why not just add your toolbar and use a window resize handler to put it at
> the bottom of the page?
> Ian
>
> http://examples.roughian.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: rpc serialization problem

2009-09-02 Thread jvoro...@googlemail.com

Hallo,
i have the same problem.
List (GWT) can not be used in DataNuceleus.

Can every one help pleas!
THX

On 5 Aug., 04:52, mike  wrote:
> I have a simple one-to-many betwen two entities.  The parent entity
> uses List to contain the child entities.  I am able to persist these
> entities in the datastore without problems.
>
> However, when reading a root entity at the server, I get:
>
> rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
> not included in the set of types  which can be serialized...
>
> The entities are successfully read from the datastore, but something
> in Datanucleus doesn't build the List correctly.
>
> Has anyone found a workaround for this serialization problem.
>
> Thanks
>
> GWT 1.7 GAE 1.2.2

--~--~-~--~~~---~--~~
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 application does not run ie7

2009-09-02 Thread aftershock

What is your IE7 version?
What do you mean by leveling css?

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



errors with google plugin for eclipse

2009-09-02 Thread pepgrifell

hi,

I moved from GWT1.5.3 to GWT1.6/1.7.  I installed google plguin in
eclipse (Europa) and I did the changes in the directory structure.
When I try to compile the app. with the pguing (red suitcase) I get
thsi error:

Loading module 'GemmaModule'
   [ERROR] Failure while parsing XML
org.xml.sax.SAXNotRecognizedException: 
http://apache.org/xml/features/nonvalidating/load-external-dtd
at oracle.xml.jaxp.JXSAXParserFactory.setFeature
(JXSAXParserFactory.java:128)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse
(ReflectiveParser.java:307)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100
(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse
(ReflectiveParser.java:385)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad
(ModuleDefLoader.java:243)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:
155)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule
(ModuleDefLoader.java:269)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath
(ModuleDefLoader.java:127)
at com.google.gwt.dev.Compiler.run(Compiler.java:156)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:124)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:131)

In a post, I read that someone has put xercesImpl.jar inside jdk/jre/
lib/ext. Then error disappear and compilation is ok.  The problem then
is that when I deploy the application (EAR) in my application server,
when I start the server I get an error caused by xercesImpl.jar inside
jdk/jre/lib/ext.

Apart from this, if I start the emulated host, without the xerces lib
I get this error:
*
Unable to process 'file:/D:/branch_eclipse3.3_view/sources/GemmaWeb/
war/WEB-INF/web.xml' for servlet validation
[DEBUG] Bootstrap link for command-line module 'GemmaModule'
[TRACE] Loading module 'GemmaModule'
Failure while parsing XML

with this error:

[ERROR] Failure while parsing XML
org.xml.sax.SAXNotRecognizedException: 
http://apache.org/xml/features/nonvalidating/load-external-dtd
at oracle.xml.jaxp.JXSAXParserFactory.setFeature
(JXSAXParserFactory.java:128)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse
(ReflectiveParser.java:307)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100
(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse
(ReflectiveParser.java:385)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad
(ModuleDefLoader.java:243)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:
155)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule
(ModuleDefLoader.java:269)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath
(ModuleDefLoader.java:127)
at com.google.gwt.dev.HostedModeBase.loadModule(HostedModeBase.java:
536)
at com.google.gwt.dev.HostedMode.loadModule(HostedMode.java:426)
at com.google.gwt.dev.HostedMode.doStartup(HostedMode.java:351)
at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:585)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

*

Placing the xerces lib in jdk/jre/lib/ext I go a bit further away:

*
Unable to process 'file:/D:/branch_eclipse3.3_view/sources/GemmaWeb/
war/WEB-INF/web.xml' for servlet validation
[DEBUG] Bootstrap link for command-line module 'GemmaModule'
Validating  tags for module 'GemmaModule'
   More info: file:/C:/eclipse/configuration/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.win32_1.7.0.v200907131018/gwt-
windows-1.7.0/doc/helpInfo/servletMappings.html
   Module declares 17  declaration(s), but a valid 'web.xml'
was not found at 'D:\branch_eclipse3.3_view\sources\GemmaWeb\war\WEB-
INF\web.xml'
More info: file:/C:/eclipse/configuration/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.win32_1.7.0.v200907131018/gwt-
windows-1.7.0/doc/helpInfo/servletMappings.html
Module declares 17  declaration(s), but a valid 'web.xml' was
not found at 'D:\branch_eclipse3.3_view\sources\GemmaWeb\war\WEB-INF
\web.xml'
The browser widget class could not be instantiated --> and the error
shown is:

[ERROR] The browser widget class could not be instantiated
java.lang.RuntimeException: Unable to snatch field 'site' from class
org.eclipse.swt.browser.Browser
at com.google.gwt.dev.shell.LowLevel.snatchFieldObjectValue

Re: DOM.getElementById() vs $doc.getElementById()

2009-09-02 Thread Thomas Broyer



On 2 sep, 12:51, Bob Rozelle  wrote:
> I'm using the approach of wrapping the form in a FormPanel
>
> FormPanel form = FormPanel.wrap(element, false);
> Style style = element.getStyle();
> style.setProperty("display", "block");//Statically set to
> "display:none"

FYI, I'm using UIObject.setVisible(element, true) with the same effect
but a bit more readable IMO ;-)

> I've gotten username/password autofill working in Firefox, Chrome,
> Opera, Safari, but not IE; still trying to figure that out.

That's most probably because of the following line:
> parentPanel.add(form);//Moves the form in the DOM

Try keeping the form where it originally lives in the markup and see
if it changes something (I bet it does!)
--~--~-~--~~~---~--~~
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: GWTCanvas and IE...

2009-09-02 Thread Xlorep DarkHelm

Umm... for anyone trying to see what I mean, I broke the app last
night, and I hope to have it running soon again this morning.

On Sep 1, 1:45 pm, Xlorep DarkHelm  wrote:
> Ok I'm hitting a roadblock here, and I'm hoping that it is just
> something obvious that I'm unable to see.
>
> My situation is this -- I'm working on a simple web app, using GWT and
> the GWTCanvas widget from gwt-incubator.
>
> With the canvas, I am trying to draw little black squares, which
> represent values at a specific position in an array.
>
> To me, it is pretty straight-forward, I have a method:
>
> -
>
>         public void draw(int row, int col, int color) {
>                 canvas.setFillStyle(Settings.colors[color]);
>                 canvas.fillRect(col * Settings.PIXEL_SIZE, row *
> Settings.PIXEL_SIZE, Settings.PIXEL_SIZE, Settings.PIXEL_SIZE);
>         }
>
> -
>
> in my class that wraps the canvas. On every major browser other than
> IE (and I can only test with IE8... which might make a difference, I
> dunno...), this works exactly as I'd expect.
>
> In IE... it never draws anything. Like... at all. I see that my code
> is running (I have some text which gets updated outside the canvas),
> but IE isn't drawing, well... anything. This somewhat leaves my little
> app as pretty useless for people who visit using IE.
>
> Like I said... I'm hoping that it is something I'm just plain missing
> here. The address to my app is:
>
> http://showsort.appspot.com
>
> I'm not really trying anything elaborate with the canvas in this...
> just drawing some squares on it.
>
> Any help would be most appreciated.
>
> I can provide other code if it helps...
--~--~-~--~~~---~--~~
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: javax.persistence package

2009-09-02 Thread Dalla

Yes, exactly.

This is pretty much it:

DozerBeanMapper mapper = new DozerBeanMapper();

//This is a mapping from EJB to POJO
//SimpleHeader is my POJO, purchaseOrderHeader is an instance of the
corresponding EJB.
SimpleHeader header = (SimpleHeader) mapper.map(purchaseOrderHeader,
SimpleHeader.class);

//Mapping from POJO back to EJB looks exactly the same
//Here, Arrivals is the EJB, arrivaldata is an instance of the
corresponding POJO
Arrivals arrivals = (Arrivals) mapper.map(arrivaldata,
Arrivals.class);

So if you already have EJBs and want to use Dozer, all you have to do
is basically make a copy of your EJB, remove all annotations
and imports of javax.* packages, create a default no argument
constructor, and make the new POJO implement IsSerializable.

On 2 Sep, 14:19, Tolga Özdemir  wrote:
> hmm.. you mean your EJB classes - your DTOs - are in serverside and by using
> dozer.. you automatically translate them and use in client side, right?
>
>
>
>
>
> On Wed, Sep 2, 2009 at 3:03 PM, Dalla  wrote:
>
> > Correct, not on the client side anyway.
> > GWT does not emulate  javax.persistence.*, importing that package on
> > the client side would cause errors when compiling.
> > However you COULD use EJB3, if you keep the mappings in a separate
> > file. But´s that´s not very flexible.
>
> > I use EJB3 myself on the server side, and then use Dozer to convert
> > the EJBs to POJOs before sending them to the client.
> > Once the objects is sent back, you convert it back to an EJB, Works
> > like a charm so far.
>
> > On 2 Sep, 13:26, Tolga Özdemir  wrote:
> > > oh..it does mean we cannot use ejb3 yet.. right?
>
> > > On Wed, Sep 2, 2009 at 2:13 PM, David Given  wrote:
>
> > > > tolga ozdemir wrote:
> > > > [...]
> > > > > Can you enlighten me wheather we could use javax.persistence.* in our
> > > > > serialized DTO objects for the sake of RPC??
>
> > > > > can I use @Table, @Id or other annotations?
>
> > > > The GWT runtime ignores annotations --- they're not kept at runtime on
> > > > the client. So you can pass annotated objects perfectly happily over
> > the
> > > > link and they'll work fine.
>
> > > > I've had good experiences using Berkeley DB JE and GWT. It's possible
> > to
> > > > query an object on the server, have Berkeley DB instantiate it for me,
> > > > and then just return it directly to the client for display. So I'd
> > > > imagine you could use something similar with javax.persistence.
>
> > > > The only thing you probably need to be concerned with is that if you
> > > > instantiate an object on the server, pass it to the client, then pass
> > it
> > > > back to the server, you're getting a different physical object than the
> > > > one you originally instantiated so the persistence layer might get its
> > > > cacheing confused. (Berkeley DB doesn't seem to be bothered by this.)
>
> > > > --
> > > > ┌─── dg@cowlark.com ─http://www.cowlark.com─
> > > > │
> > > > │ "They laughed at Newton. They laughed at Einstein. Of course, they
> > > > │ also laughed at Bozo the Clown." --- Carl Sagan
>
> > > --
> > > Tolga Özdemir
>
> > > Mobile 0 536 963 7890
> > > MSN ozde...@hotmail.com- Dölj citerad text -
>
> > > - Visa citerad text -
>
> --
> Tolga Özdemir
>
> Mobile 0 536 963 7890
> MSN ozde...@hotmail.com- Dölj citerad text -
>
> - Visa citerad 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 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: @RemoteServiceRelativePath

2009-09-02 Thread Thomas Broyer



On 2 sep, 15:02, Aximilli302  wrote:
> I have the following tag:
>
>  class="com.google.tabs.server.MyServiceImpl" />

This is no longer used in HostedMode (vs. GWTShell; i.e. since GWT
1.6), and it should have warned you about it.
You have to configure your war/WEB-INF/web.xml just like with any Java
webapp.

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



new project - ImageBundleMap's - look up image by name

2009-09-02 Thread Dean S. Jones

http://code.google.com/p/asmodaiosgwt/

My first project, but many people have asked "How do I look up an
image by a name ( String ) from an ImageBundle.

Generally, it's kind of a mess to try to do that, so I thought I would
make it simpler.


--~--~-~--~~~---~--~~
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 determine space available to RootPanel.get('some_div')?

2009-09-02 Thread Ian Bambury
getOffsetHeight/Width
It is in the FM

:-)

Ian

http://examples.roughian.com


2009/9/2 jahboite 

>
> Greetings,
>
> I'm writing a simple client-side-only photo gallery and want to
> determine the space available in the host page.  The app is added
> inside a div element in the host page and I know I can get the top and
> left offsets for that div, but I cannot for the life of me work out
> how to get the bottom and right offsets too.  I can make assumptions
> about what they /might/ be based on top and left, but in practise this
> doesn't work well.
>
> Is there a best practise for getting the space available to an app?
> Anyone got any good ideas? Examples?
> Should I RTFM?
> >
>

--~--~-~--~~~---~--~~
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 application does not run ie7

2009-09-02 Thread Ian Bambury
Works fine for me in IE7 - well, I say 'fine' - you obviously need to level
your css and build it up as you want it and I haven't played around with it,
but I see everything in IE7 that I see in Chrome.
Ian

http://examples.roughian.com


2009/9/2 Ian Bambury 

> Yes, a link might be useful.
> Ian
>
> http://examples.roughian.com
>
>
> 2009/9/1 aftershock 
>
>
>> It is Internet explorer 7.00.6000.16386 .
>> I could not see any error. Internet explorer printed a message done in
>> statusbar.
>> I could not see any triangle.
>> I could see the html part of page but not gwt application embedded.
>> The code is not so small. It would not fit here.
>> I can send you zipped.
>> Basically, it uses one or two native javascripts functions, the rest
>> generates the interface: checkboxes,textboxes, one abspanel, one
>> notebook.
>> I could link the application , it is online.
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: Download file

2009-09-02 Thread ALEXEI BARBONI
Hi chandrahas, thanks for the answer

I've been out from work last week.

Now I have to create a way to the user of my application make a download of
a file that is in the server.
I know the exactly location of the file and its name.

But I don't understand how to create a link (would be a GWT Hyperlink) that
point to my file. I think this way is easier than to create a servlet.

Could anybody give me a little help about?

thank you guys again

2009/8/25 chandrahas koyari 

>
> There are two general methods to achieve it
> 1. Create a link which directly point to that resource (file)
> 2. Point to a Servlet which respond with a file (by using
> getResourceAsFile() )
>
> On Aug 25, 2:50 am, Alexei Telles  wrote:
> > Hi...
> >
> > I need to create a link in my web application where the user will
> > download a file that is in my server.
> >
> > I was searching for something in the web, but I could not find
> > something about.
> >
> > Is there any GWT tool that allow me to develop a link in my
> > application to make a download from the server to the client?
> >
> > Or another way that you guys use to do?
> >
> > Thanks again
>
> >
>

--~--~-~--~~~---~--~~
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: @RemoteServiceRelativePath

2009-09-02 Thread Aximilli302

I have this tag:



On Sep 1, 1:43 pm, Thad  wrote:
> Do you have the proper servlet and servlet-mapping tags in your
> web.xml?
>
> On Sep 1, 10:31 am, Aximilli302  wrote:
>
>
>
> > Me again, I have another quick question for the general comunity.
>
> > What goes into the @RemoteServiceRelativePath tag? Is it the name of
> > the class it is in? for example,
>
> > package com.google.tabs.client;
>
> > import com.google.gwt.user.client.rpc.RemoteService;
> > import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
> > @RemoteServiceRelativePath("MyService")
>
> > public interface MyService extends RemoteService{
>
> >         public String myMethod(String s, String username);
>
> > }
>
> > I put that in, and the server call fails. I get a warning:
>
> > Sep 1, 2009 9:24:28 AM
> > com.google.appengine.tools.development.LocalResourceFileServlet doGet
> > WARNING: No file found for: /tabs/MyService
>
> > Does anyone know how to make this work?- 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 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWTTestCase not running?

2009-09-02 Thread charlie
Ahh!  That's it.

Thanks!

On Wed, Sep 2, 2009 at 4:32 AM, Thomas Broyer  wrote:

>
>
>
> On 2 sep, 00:39, charlie  wrote:
> > None of the test methods get called, I'm sysout'ing everywhere and
> stepping
> > it through a debugger, it isn't being run at all.  And I notice the
> output
> > never says it gets run, only compiled.
>
> Your test class is in a .server. package, so unless your module
> (com.charlie.MP3Player) has a  in it, your
> class isn't treated as "client code" and won't be run as a "GWT unit
> test".
>
> > Can you give me an example of one of your GWTTestCase's ?
>
> Apart from the package issue, your class looks OK. Just a small nit:
> GWTTestCase is a "JUnit 3" test case, so you don't need the JUnit 4
> @Test annotation on your test methods (instead, you must name them
> testXXX)
> >
>

--~--~-~--~~~---~--~~
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: @RemoteServiceRelativePath

2009-09-02 Thread Aximilli302

I have the following tag:



On Sep 1, 1:43 pm, Thad  wrote:
> Do you have the proper servlet and servlet-mapping tags in your
> web.xml?
>
> On Sep 1, 10:31 am, Aximilli302  wrote:
>
>
>
> > Me again, I have another quick question for the general comunity.
>
> > What goes into the @RemoteServiceRelativePath tag? Is it the name of
> > the class it is in? for example,
>
> > package com.google.tabs.client;
>
> > import com.google.gwt.user.client.rpc.RemoteService;
> > import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
> > @RemoteServiceRelativePath("MyService")
>
> > public interface MyService extends RemoteService{
>
> >         public String myMethod(String s, String username);
>
> > }
>
> > I put that in, and the server call fails. I get a warning:
>
> > Sep 1, 2009 9:24:28 AM
> > com.google.appengine.tools.development.LocalResourceFileServlet doGet
> > WARNING: No file found for: /tabs/MyService
>
> > Does anyone know how to make this work?- 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 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



How to determine space available to RootPanel.get('some_div')?

2009-09-02 Thread jahboite

Greetings,

I'm writing a simple client-side-only photo gallery and want to
determine the space available in the host page.  The app is added
inside a div element in the host page and I know I can get the top and
left offsets for that div, but I cannot for the life of me work out
how to get the bottom and right offsets too.  I can make assumptions
about what they /might/ be based on top and left, but in practise this
doesn't work well.

Is there a best practise for getting the space available to an app?
Anyone got any good ideas? Examples?
Should I RTFM?
--~--~-~--~~~---~--~~
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: javax.persistence package

2009-09-02 Thread Tolga Özdemir
hmm.. you mean your EJB classes - your DTOs - are in serverside and by using
dozer.. you automatically translate them and use in client side, right?



On Wed, Sep 2, 2009 at 3:03 PM, Dalla  wrote:

>
> Correct, not on the client side anyway.
> GWT does not emulate  javax.persistence.*, importing that package on
> the client side would cause errors when compiling.
> However you COULD use EJB3, if you keep the mappings in a separate
> file. But´s that´s not very flexible.
>
> I use EJB3 myself on the server side, and then use Dozer to convert
> the EJBs to POJOs before sending them to the client.
> Once the objects is sent back, you convert it back to an EJB, Works
> like a charm so far.
>
> On 2 Sep, 13:26, Tolga Özdemir  wrote:
> > oh..it does mean we cannot use ejb3 yet.. right?
> >
> >
> >
> >
> >
> > On Wed, Sep 2, 2009 at 2:13 PM, David Given  wrote:
> >
> > > tolga ozdemir wrote:
> > > [...]
> > > > Can you enlighten me wheather we could use javax.persistence.* in our
> > > > serialized DTO objects for the sake of RPC??
> >
> > > > can I use @Table, @Id or other annotations?
> >
> > > The GWT runtime ignores annotations --- they're not kept at runtime on
> > > the client. So you can pass annotated objects perfectly happily over
> the
> > > link and they'll work fine.
> >
> > > I've had good experiences using Berkeley DB JE and GWT. It's possible
> to
> > > query an object on the server, have Berkeley DB instantiate it for me,
> > > and then just return it directly to the client for display. So I'd
> > > imagine you could use something similar with javax.persistence.
> >
> > > The only thing you probably need to be concerned with is that if you
> > > instantiate an object on the server, pass it to the client, then pass
> it
> > > back to the server, you're getting a different physical object than the
> > > one you originally instantiated so the persistence layer might get its
> > > cacheing confused. (Berkeley DB doesn't seem to be bothered by this.)
> >
> > > --
> > > ┌─── dg@cowlark.com ─http://www.cowlark.com─
> > > │
> > > │ "They laughed at Newton. They laughed at Einstein. Of course, they
> > > │ also laughed at Bozo the Clown." --- Carl Sagan
> >
> > --
> > Tolga Özdemir
> >
> > Mobile 0 536 963 7890
> > MSN ozde...@hotmail.com- Dölj citerad text -
> >
> > - Visa citerad text -
> >
>


-- 
Tolga Özdemir

Mobile 0 536 963 7890
MSN ozde...@hotmail.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: Catching Hyperlinks before they are executed.

2009-09-02 Thread Chris Bailey

wow, that looks better and so much shorter

On Sep 2, 5:23 am, Thomas Broyer  wrote:
> On 2 sep, 04:26, Chris Bailey  wrote:
>
>
>
>
>
> > OK here is the soluction I came up with:
>
> > Event.addNativePreviewHandler(new Event.NativePreviewHandler() {
> >                         @Override
> >                         public void onPreviewNativeEvent(NativePreviewEvent 
> > event) {
> >                                 if (event.getTypeInt() == Event.ONCLICK) {
>
> >                                         // do something with the keycode
> >                                         // 
> > doSomething(event.getNativeEvent().getKeyCode());
>
> >                                         
> > if(com.google.gwt.dom.client.Element.is(event.getNativeEvent
> > ().getEventTarget())){
> >                                                 Element targetElement = 
> > (Element) Element.as(event.getNativeEvent
> > ().getEventTarget());
> >                                                 
> > if("a".equalsIgnoreCase(getTagName(targetElement))) {
> >                                                         //String hostURL = 
> > GWT.getHostPageBaseURL();
>
> >                                                         String href = 
> > DOM.getElementAttribute
> > ((com.google.gwt.user.client.Element) targetElement, "href");
>
> How about:
> EventTarget eventTarget = event.getNativeEvent().getEventTarget();
> if (AnchorElement.is(eventTarget)) {
>    AnchorElement targetElement = eventTarget.cast();
>    String href = targetElement.getHref();
>    ...
>
> I'd also wrap the whole thing within an if (!event.isCancelled())
> { ... }
>
> > check href against hostURL to see if the link is realitive or absolute
> > then do whatever you want.
>
> Oh, so you meant "relative"! I thought you meant something related to
> "real" (like, links to something "real", i.e. make a request and see
> if it returns an error)- 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 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: javax.persistence package

2009-09-02 Thread Dalla

Correct, not on the client side anyway.
GWT does not emulate  javax.persistence.*, importing that package on
the client side would cause errors when compiling.
However you COULD use EJB3, if you keep the mappings in a separate
file. But´s that´s not very flexible.

I use EJB3 myself on the server side, and then use Dozer to convert
the EJBs to POJOs before sending them to the client.
Once the objects is sent back, you convert it back to an EJB, Works
like a charm so far.

On 2 Sep, 13:26, Tolga Özdemir  wrote:
> oh..it does mean we cannot use ejb3 yet.. right?
>
>
>
>
>
> On Wed, Sep 2, 2009 at 2:13 PM, David Given  wrote:
>
> > tolga ozdemir wrote:
> > [...]
> > > Can you enlighten me wheather we could use javax.persistence.* in our
> > > serialized DTO objects for the sake of RPC??
>
> > > can I use @Table, @Id or other annotations?
>
> > The GWT runtime ignores annotations --- they're not kept at runtime on
> > the client. So you can pass annotated objects perfectly happily over the
> > link and they'll work fine.
>
> > I've had good experiences using Berkeley DB JE and GWT. It's possible to
> > query an object on the server, have Berkeley DB instantiate it for me,
> > and then just return it directly to the client for display. So I'd
> > imagine you could use something similar with javax.persistence.
>
> > The only thing you probably need to be concerned with is that if you
> > instantiate an object on the server, pass it to the client, then pass it
> > back to the server, you're getting a different physical object than the
> > one you originally instantiated so the persistence layer might get its
> > cacheing confused. (Berkeley DB doesn't seem to be bothered by this.)
>
> > --
> > ┌─── dg@cowlark.com ─http://www.cowlark.com─
> > │
> > │ "They laughed at Newton. They laughed at Einstein. Of course, they
> > │ also laughed at Bozo the Clown." --- Carl Sagan
>
> --
> Tolga Özdemir
>
> Mobile 0 536 963 7890
> MSN ozde...@hotmail.com- Dölj citerad text -
>
> - Visa citerad 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 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: javax.persistence package

2009-09-02 Thread Tolga Özdemir
oh..it does mean we cannot use ejb3 yet.. right?



On Wed, Sep 2, 2009 at 2:13 PM, David Given  wrote:

>
> tolga ozdemir wrote:
> [...]
> > Can you enlighten me wheather we could use javax.persistence.* in our
> > serialized DTO objects for the sake of RPC??
> >
> > can I use @Table, @Id or other annotations?
>
> The GWT runtime ignores annotations --- they're not kept at runtime on
> the client. So you can pass annotated objects perfectly happily over the
> link and they'll work fine.
>
> I've had good experiences using Berkeley DB JE and GWT. It's possible to
> query an object on the server, have Berkeley DB instantiate it for me,
> and then just return it directly to the client for display. So I'd
> imagine you could use something similar with javax.persistence.
>
> The only thing you probably need to be concerned with is that if you
> instantiate an object on the server, pass it to the client, then pass it
> back to the server, you're getting a different physical object than the
> one you originally instantiated so the persistence layer might get its
> cacheing confused. (Berkeley DB doesn't seem to be bothered by this.)
>
> --
> ┌─── dg@cowlark.com ─ http://www.cowlark.com ─
> │
> │ "They laughed at Newton. They laughed at Einstein. Of course, they
> │ also laughed at Bozo the Clown." --- Carl Sagan
>
> >
>


-- 
Tolga Özdemir

Mobile 0 536 963 7890
MSN ozde...@hotmail.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: javax.persistence package

2009-09-02 Thread David Given

tolga ozdemir wrote:
[...]
> Can you enlighten me wheather we could use javax.persistence.* in our
> serialized DTO objects for the sake of RPC??
> 
> can I use @Table, @Id or other annotations?

The GWT runtime ignores annotations --- they're not kept at runtime on 
the client. So you can pass annotated objects perfectly happily over the 
link and they'll work fine.

I've had good experiences using Berkeley DB JE and GWT. It's possible to 
query an object on the server, have Berkeley DB instantiate it for me, 
and then just return it directly to the client for display. So I'd 
imagine you could use something similar with javax.persistence.

The only thing you probably need to be concerned with is that if you 
instantiate an object on the server, pass it to the client, then pass it 
back to the server, you're getting a different physical object than the 
one you originally instantiated so the persistence layer might get its 
cacheing confused. (Berkeley DB doesn't seem to be bothered by this.)

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan

--~--~-~--~~~---~--~~
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 serialisation too slow

2009-09-02 Thread David Given

Chris Lowe wrote:
[...]
> 500-600 does seem like a lot of objects to be processing in one hit if
> performance on a low end server is a concern, but then again 20
> seconds seems like an awfully long time too.

Actually, thinking about it, it's more than that --- probably around 
1500 objects (500 large objects, but each one contains references to a 
few small just-data objects).

> What's the performance like in your dev environment?  Are your JVM
> settings the same as those on your target server?
[...]
 > You can also add a simple filter before the GWT servlet to
 > give you a very coarse request timing - you can at least then rule out
 > latencies and bandwidth to your server.

I wish. The target server is a solid-state ARM box -- a SheevaPlug 
(1.2GHz processor, 512MB RAM). Alas, there is no decent JIT for ARM yet, 
so it's running the interpreted JDK. I'll check out VisualVM, but I 
suspect that it's not up to running it.

Annoyingly the machine is perfectly capable of running the actual 
*application*. The actual logic takes a tiny fraction of the time of the 
serialisation.

My development machine is a traditional ix32 box and serialisation takes 
a trivial amount of time. I'll try the trick with the filter to get some 
actual figures.

[...]
> How large are your serialized objects prior to compression?  I think
> you can quickly test this by disabling gzip compression in FireFox:
> 
> http://forgetmenotes.blogspot.com/2009/05/how-to-disable-gzip-compression-in.html

This just causes the page to turn into garbage --- probably a server 
misconfiguration on my end.

> If the uncompressed size is particularly large then memory and
> compression time may be the limiting factor.

Looking at the server stats its VM size doesn't appear to change during 
the first serialisation process, indicating that it doesn't want to 
allocate more memory. I have a feeling that memory's not the problem.

> Finally, what kind of objects are you serialising?  Are you attempting
> to send something like Hibernate objects over the wire (or some other
> kind of proxied objects) which are causing unexpected database hits?

Nope. The entire DB is being held in-memory. In fact, the way my app 
works is that the server logic calculates the delta needed to be sent to 
the client, constructs a packet of client objects from this, and then 
returns that packet as the result from the RPC call, so the stuff being 
serialised doesn't actually content to the objects in the DB at all. (My 
400-object delta, the result of the initial DB sync, takes about 4s to 
generate.)

The delta generation uses reflection and annotations to query the DB 
objects for properties that need to be copied into the delta. (The 
client is only allowed to see information from the DB that the user is 
allowed to have.) Simply by adding a cache for Field objects I managed 
to reduce the time taken for the delta generation by a factor of ten, so 
I suspect that reflection is dog slow with this JVM. What does the GWT 
serialisation system use? If it uses reflection, is there any way of 
persuading it to use byte-code generation instead?

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan

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



javax.persistence package

2009-09-02 Thread tolga ozdemir

Hi guys,

Can you enlighten me wheather we could use javax.persistence.* in our
serialized DTO objects for the sake of RPC??

can I use @Table, @Id or other annotations?

Regards,

Tolga
--~--~-~--~~~---~--~~
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: DOM.getElementById() vs $doc.getElementById()

2009-09-02 Thread Bob Rozelle

I'm using the approach of wrapping the form in a FormPanel

FormPanel form = FormPanel.wrap(element, false);
Style style = element.getStyle();
style.setProperty("display", "block");//Statically set to
"display:none"
parentPanel.add(form);//Moves the form in the DOM
Element formElement = form.getElement();
NodeList inputs = formElement.getElementsByTagName("input");
int ln = inputs.getLength();
for (int i = 0; i < ln; i++)
{
Element element = inputs.getItem(i);
InputElement inelement = (InputElement)element;
String name = inelement.getName();
String value = inelement.getValue();
//Modify values here.
}

I've gotten username/password autofill working in Firefox, Chrome,
Opera, Safari, but not IE; still trying to figure that out.

Bob

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

2009-09-02 Thread Chris Lowe

Kristian,

Do GMail or the GWT showcase application work well enough for you in
your intended browser?  If so, then in all likelihood your GWT
application will perform adequately.

I'm not aware of any reliability issues as such. The only thing that
springs to mind is that GWT compiles for specific browsers that it
knows about at compile time.  Like many other web application
technologies, if a new browser comes out then they can break
compatibility. Recent examples of this are with IE8 and FF 3.5,
however Google have always endeavoured to roll out compiler updates to
rectify these issues.

Loading times can be a problem and it boils down to a couple of
things: 1. I believe IE's JavaScript parser gets disproportionately
slower the larger your GWT application is (other browsers do not
suffer with this); 2. a compressed GWT application can still be fairly
large, say 150k to 200k, which can be an issue if your target audience
are all on dial up connections.  Remember though that this download is
a one-off and the browser will cache that version of the app forever
so all subsequent app launches are significantly quicker.  Also, GWT
2.0 has a number of things in the pipeline to address these issues
(like code splitting).

Cheers,

Chris.


On Sep 2, 5:32 am, kristian  wrote:
> Hello All, i am a newbie that want to try to build a web application
> using GWT, but i heard from some of my colleague that GWT has some
> issue with its performance (reliability, load slowly). So, is there
> anyone can enlighten me? 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: question from a novice in GWT

2009-09-02 Thread Ian Bambury
Why not just add your toolbar and use a window resize handler to put it at
the bottom of the page?
Ian

http://examples.roughian.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: gwt application does not run ie7

2009-09-02 Thread Ian Bambury
Yes, a link might be useful.
Ian

http://examples.roughian.com


2009/9/1 aftershock 

>
> It is Internet explorer 7.00.6000.16386 .
> I could not see any error. Internet explorer printed a message done in
> statusbar.
> I could not see any triangle.
> I could see the html part of page but not gwt application embedded.
> The code is not so small. It would not fit here.
> I can send you zipped.
> Basically, it uses one or two native javascripts functions, the rest
> generates the interface: checkboxes,textboxes, one abspanel, one
> notebook.
> I could link the application , it is online.
>
> >
>

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



  1   2   >