Re: AsyncCallback RPC onSuccess() extremely slow!

2010-10-22 Thread John Ivens
You can automate the process, even launch Tomcat or Jboss inside of
Eclipse.  I know that is not the answer you are dreaming of... :)

On Fri, Oct 22, 2010 at 1:57 PM, Samuru Jackson <
samurujack...@googlemail.com> wrote:

> Uff!
>
> Deployed it under Tomcat - its feels like it is 1times faster :-)
>
> Still - is there a method to speed up things when developing GWT Apps? I
> mean the roundtrip of deploying the app on Tomcat is very time consuming and
> also brings to problem that I can't change the code more or less on the fly
> to test things.
>
> Any idea on this?
>
> /SJ
>
>
> On Fri, Oct 22, 2010 at 4:38 PM, John Ivens 
> wrote:
>
>> I would suggest deploying to a war file and using it in JBoss or another
>> application server and see how fast it is.
>>
>> On Fri, Oct 22, 2010 at 12:23 PM, Samuru Jackson <
>> samurujack...@googlemail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm experiencing some huge performance problems with async RPC calls.
>>>
>>> There is not much magic behind what I'm doing. It's almost as in a simple
>>> tutorial:
>>>
>>> private void doSomething() {
>>>   AsyncCallback callback = new AsyncCallback() {
>>>   public void onFailure(Throwable caught) {
>>>
>>>   }
>>>
>>>   @Override
>>>   public void onSuccess(List result) {
>>> doSomeStuff();
>>>   }
>>> };
>>>
>>> serverStuff.doSomeServerStuff();
>>> }
>>>
>>>
>>> My server-side code generates pretty fast a list of approx. 250 elements
>>> consisting of simple java object with some String properties.
>>>
>>> It takes approx. 45secs until onSuccess() triggers. This is measured
>>> after the server-side code finished. If I return null it takes some
>>> milliseconds.
>>>
>>> Reading the mailing list I found out that it seems to be really that
>>> slow.
>>>
>>> I tried to use a multidimensional String Array which results also in a
>>> poor performance.
>>>
>>> However, if pack all the data into one single String with some separators
>>> it takes some milliseconds.
>>>
>>> Any idea what I'm doing wrong? It can't be that it takes almost a minute
>>> to parse a list with a simple object on client side?!?
>>> The solution of putting everything into one single string and parse it
>>> back can't be the solution!
>>>
>>> I'm running everything in developer mode at the moment.
>>>
>>>
>>> Thanks for any advice!
>>> /SJ
>>>
>>>  --
>>> You received 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.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>
>
> --
> /SJ
> ---
> http://uncinuscloud.blogspot.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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: AsyncCallback RPC onSuccess() extremely slow!

2010-10-22 Thread John Ivens
I would suggest deploying to a war file and using it in JBoss or another
application server and see how fast it is.

On Fri, Oct 22, 2010 at 12:23 PM, Samuru Jackson <
samurujack...@googlemail.com> wrote:

> Hi,
>
> I'm experiencing some huge performance problems with async RPC calls.
>
> There is not much magic behind what I'm doing. It's almost as in a simple
> tutorial:
>
> private void doSomething() {
>   AsyncCallback callback = new AsyncCallback() {
>   public void onFailure(Throwable caught) {
>
>   }
>
>   @Override
>   public void onSuccess(List result) {
> doSomeStuff();
>   }
> };
>
> serverStuff.doSomeServerStuff();
> }
>
>
> My server-side code generates pretty fast a list of approx. 250 elements
> consisting of simple java object with some String properties.
>
> It takes approx. 45secs until onSuccess() triggers. This is measured after
> the server-side code finished. If I return null it takes some milliseconds.
>
> Reading the mailing list I found out that it seems to be really that slow.
>
> I tried to use a multidimensional String Array which results also in a poor
> performance.
>
> However, if pack all the data into one single String with some separators
> it takes some milliseconds.
>
> Any idea what I'm doing wrong? It can't be that it takes almost a minute to
> parse a list with a simple object on client side?!?
> The solution of putting everything into one single string and parse it back
> can't be the solution!
>
> I'm running everything in developer mode at the moment.
>
>
> Thanks for any advice!
> /SJ
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: GWT Hibernate Integration

2010-09-20 Thread John Ivens
Have you included the hibernate jars in your war/WEB-INF/lib directory when
you deploy?

On Mon, Sep 20, 2010 at 2:00 AM, Ketan Nale  wrote:

> Hi,
>
> I am doing GWT and Hibernate integration (without spring) in my
> application.
> I have put entry in of POJO’s and hbm file package
> In my ….gwt.xml file
> like
>  
>  
>
> I have written my hibernate.cfg.xml file and
> Accessing data from my service class (GreetingServiceImpl – which is
> by default get created using GWT eclipse plugin) as follows :
>
> public List getRecords() {
>Session session =
> HibernateUtil.getSessionFactory().getCurrentSession();
>  session.beginTransaction();
>  List registrations = new
> ArrayList(session.createQuery("from
> Registration").list());
>  session.getTransaction().commit();
>  return registrations;
> }
>
> After adding jars in my classpath everything gets compiled, but when I
> try to access my application link
> I get following error :
>
> Errors in 'file:/E:/ workspace/GwtTest/src/edu/projectDir/util/
> HibernateUtil.java
> Line 7: No source code is available for type
> org.hibernate.SessionFactory; did you forget to inherit a required
> module?
> Line 12: No source code is available for type
> org.hibernate.cfg.Configuration; did you forget to inherit a required
> module?
> Line 16: No source code is available for type
> java.lang.ExceptionInInitializerError; did you forget to inherit a
> required module?
>
> Can anyone faced similar problem, how to use classes in my (non-gwt)
> jars (like hibernate, etc)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: dumb / dto domain model

2010-08-25 Thread John Ivens
Won't the event bus and presenters solve this problem for you?  The
Model-View-Presenter paradigm?

On Wed, Aug 25, 2010 at 11:51 AM, Jeroen Wolff wrote:

> Hi, where are in the middle of designing a big app with a lot off
> difficult forms.
> On these forms there will be a lot of questions and based on the
> results more questions. Also lot of field validation.
> The current app is a standalone app and the domain model is a big tree
> with the Observable patterns (property change)
>  If a user is changing a field a lot of other data will than be
> trigger to change also.
>
> Now we want to port is to a web based application, and because with
> GWT we can write the same model and produce client side
> the same domain as in the old stand alone app. But.in Ray Ryan's
> talk about architecting GWT apps for production he said:
>
> "When you are in a web app, we've encouraged you to make your model,
> you're so-called model a very simple object.
> We don't really think that JavaBeans with property change events and
> that kind of thing work terribly well.
> We encourage you instead to use more of a DTO for your model portion.
> The odds are that the object that embodies the things that the
> users are thinking about is a dumb little bag of properties."
>
> Can somebody explain to me why it is not done? Why only DTO's at the
> client side?
> The business model lives on the server only than? How can i know and
> where do i specify what the next step or question or validation is
> when the user change a value is a form?
>
> It would be great to get some help on this design issue.
>
> Regard,
>
> Jeroen
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: GWT VECTOR GRAPHICS

2010-08-11 Thread John Ivens
Nice example... have you done anything with dragging rectangles around, and
having other rectangles scooch out of their way?  I would like to
investigate something like this for scheduling.

On Wed, Aug 4, 2010 at 5:22 AM, pschonefeld wrote:

> I've played around with svgweb and GWT ...
>
>new SvgRectangle("myRect","0", "0", "200", "200", "0", "0",
> "black", "orange", "5");
>...
>private class SvgRectangle extends Widget {
>private Element element;
>private String fill;
>private String svgns = "http://www.w3.org/2000/svg";;
>private SvgRectangle(String id, String x, String y,
> String width, String
> height,
> String rx, String ry,
> String fill, String stroke,
> String strokeWidth) {
>element = createElementNS(svgns,"rect");
>element.setAttribute("id", id);
>element.setAttribute("x", x);
>element.setAttribute("y", y);
>element.setAttribute("width", width);
>element.setAttribute("height", height);
>element.setAttribute("rx", rx);
>element.setAttribute("ry", ry);
>element.setAttribute("fill", fill);
>element.setAttribute("stroke", stroke);
>element.setAttribute("stroke-width",strokeWidth);
>this.fill = fill;
>setElement(element);
>Element elem = RootPanel.get("myg").getElement();
>elem.appendChild(element);
>addClickListener(this, id);
>
>}
>
>public void OnClick() {
>Element elem = getElementById("myRect");
>elem.setAttribute("fill", "green" );
>Window.alert("Ahhtahh!");
> }
>
>private native Element createElementNS(String ns, String
> localname) /*-{
>return elem = $doc.createElementNS(ns,localname);
>}-*/;
>
>private native Element getElementById(String id) /*-{
>return $doc.getElementById(id);
>}-*/;
>
>private native void addClickListener(SvgRectangle instance,
> String id) /*-{
>function pete_click(e) {
>if ($wnd.event || $wnd.Event) {
>if (!e) e = $wnd.event;
>
> instan...@com.example.client.index.svgrectangle::OnClick()();
>}
>}
>var rect =$doc.getElementById(id);
>rect.addEventListener("click",pete_click,false);
>}-*/;
>
>@Override
>protected void onLoad() {
>super.onLoad();
>addClickListener(this, "myRect");
>}
>
>@Override
>protected void onUnload() {
>super.onUnload();
>}
>}
>
> and in the html 
>
> path="src" data-debug="false">
>...
>
>http://www.w3.org/2000/svg"; width="200"
> height="200"
> version="1.1" baseProfile="full">
>
>
>
>
> probably not the out of the box solution that you're looking for but
> HTH.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: XML Validation directly

2010-07-29 Thread John Ivens
Thanks for the information!

On Wed, Jul 28, 2010 at 11:39 PM, Danny Goovaerts  wrote:

> I use saxon from Michael Kay  (www.saxonica.com) for programmatic XML
> validation. It's very good, but it does not proivided much more
> detailed error messages.
>
> You mention that you need this during development time. Do you want to
> validate XML files that you
> construct by hand before using them in your application? In that case,
> I would suggest to invest in a XML editor that provides
> validation. These generally provide much more detailed error messages,
> including the line numbers where the error occurs.
>  I use XML Studio from Progress, but there are others out there
> (Altova XML Spy, probably also some open source or  Eclipse plug ins).
> The investment in the license has been paid back multiple times in
> saved effort.
>
>
> On 28 jul, 23:52, John Ivens  wrote:
> > Okay, I tried one which produces some pretty bad messages, I will search
> for
> > something better, maybe xerces.
> >
> >
> >
> > On Mon, Jul 26, 2010 at 5:59 PM, Jeff Chimene 
> wrote:
> > > On 07/26/2010 04:09 PM, John Ivens wrote:
> > > > I know that this is off topic for GWT, but if anyone knows of how to
> > > > validate an XML file directly by using something like Apache Commons
> > > > Validation, but without needing to create a bean or a form, I would
> > > > appreciate knowing about it.  Basically, we have XML files that we
> would
> > > > like to validate directly out of XML, but using a validation in XML
> (in
> > > > a seperate or the same file).  The reason we want to do this is that
> > > > during development we would like to have a very quick way of
> generating
> > > > validation without needing to be constantly updating screens and
> forms,
> > > > just change the XML (in one file or two, depending on what resources
> are
> > > > out there).
> >
> > > > Thanks in advance...
> >
> > > Any validating parser will do what you want. hint: the google search
> > > term is in this answer.
> >
> > > > --
> > > > You received 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 cr...@googlegroups.com>
> > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> google-web-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: XML Validation directly

2010-07-28 Thread John Ivens
Okay, I tried one which produces some pretty bad messages, I will search for
something better, maybe xerces.

On Mon, Jul 26, 2010 at 5:59 PM, Jeff Chimene  wrote:

> On 07/26/2010 04:09 PM, John Ivens wrote:
> > I know that this is off topic for GWT, but if anyone knows of how to
> > validate an XML file directly by using something like Apache Commons
> > Validation, but without needing to create a bean or a form, I would
> > appreciate knowing about it.  Basically, we have XML files that we would
> > like to validate directly out of XML, but using a validation in XML (in
> > a seperate or the same file).  The reason we want to do this is that
> > during development we would like to have a very quick way of generating
> > validation without needing to be constantly updating screens and forms,
> > just change the XML (in one file or two, depending on what resources are
> > out there).
> >
> > Thanks in advance...
>
> Any validating parser will do what you want. hint: the google search
> term is in this answer.
>
> >
> > --
> > You received 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.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



XML Validation directly

2010-07-26 Thread John Ivens
I know that this is off topic for GWT, but if anyone knows of how to
validate an XML file directly by using something like Apache Commons
Validation, but without needing to create a bean or a form, I would
appreciate knowing about it.  Basically, we have XML files that we would
like to validate directly out of XML, but using a validation in XML (in a
seperate or the same file).  The reason we want to do this is that during
development we would like to have a very quick way of generating validation
without needing to be constantly updating screens and forms, just change the
XML (in one file or two, depending on what resources are out there).

Thanks in advance...

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



UI Binder and gwt-validation

2010-04-27 Thread John Ivens
Does anyone have these two (UI Binder and gwt-validation) working together?
Whenever I make a class that has an equivalent ui.xml file (and which
extends Composite, but this may not matter) implement IValidatable, I get an
error saying that GWT.create() can only be run on the client side.  All of
my code is on the client side, so I should not be getting this error... any
ideas?

What do people use for validation if not gwt-validation?

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



Re: creating a panel that will refreshes its content automatically from a database.

2010-02-11 Thread John Ivens
I used this technique also.  It would be better to do server push, but much
more complicated.  I haven't done push yet.

On Thu, Feb 11, 2010 at 12:35 AM, Anmol Kapoor wrote:

> thanks...
>
> On Mon, Feb 8, 2010 at 7:46 PM, mariyan nenchev  > wrote:
>
>> And you use it :
>> refresher.scheduleRepeating(1);// every 10 seconds
>>
>>
>> On Mon, Feb 8, 2010 at 4:15 PM, mariyan nenchev <
>> nenchev.mari...@gmail.com> wrote:
>>
>>> The simplest way is to use polling with gwt timer:
>>> Timer refresher = new Timer() {
>>>
>>> public void run() {
>>>  reloadData(); // this must call your rpc that gets the data from
>>> db
>>>  }
>>> };
>>>
>>>
>>> On Sun, Feb 7, 2010 at 2:07 AM, Anmol kapoor 
>>> wrote:
>>>
 i m working on a virtual stock exchange simple game with gwt... i want
 to design a panel showing all the stocks the panel should refresh
 its content automatically from the database. Please provide your kind
 guidance or any tutorial i should refer.

 thanks in advance.

 Anmol Kapoor

 --

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


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

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



Re: JBOSS deployment from GWT Eclipse projects

2010-02-11 Thread John Ivens
I don't know.  I guess you would need an ant task for that...

On Thu, Feb 11, 2010 at 2:19 AM, mariyan nenchev
wrote:

> What about if you use maven to manage your libs and build? Then copying the
> war folder will not work...
>
> On Thu, Feb 11, 2010 at 1:03 AM, John Ivens 
> wrote:
>
>> Okay, this is ulitmately easy...
>>
>> Step 1. Recursively copy your war directory to .war in
>> /server/default/deploy
>>
>> You HAVE to name it with the .war or JBOSS becomes TERRIBLY confused.
>>
>> Step 2. For some reason, database connectivity (for me, at least) broke in
>> JBOSS.  I needed to copy mysql-connector-java-3.0.17-ga-bin.jar into
>> /server/lib
>>
>> This lets JBOSS see the database connectivity in a way it understands.  I
>> don't understand, but hey, it works.  Of course, if you use Oracle you'll
>> probably copy a different file..
>>
>>
>> I hope that this saves someone time in case they have to do it themselves.
>>
>> Oh, when you start your project don't set it up as for GAE (Google App
>> Engine)... I think this might cause problems.
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: Does Image not serialize? How to transfer image back to client?

2010-02-11 Thread John Ivens
You mean using something like apache commons?   How would you do it?

On Thu, Feb 11, 2010 at 4:15 AM, obesga  wrote:

> It's not a little overcomplicated ?
> Just don't send the image into a normal HTTP request ?
>
>
> Oscar
>
> On Feb 10, 9:22 pm, John Ivens  wrote:
> > The trick I have used is to encode the image in Base64, and then send the
> > image as a String in the return.
> >
> > public String getDither(int steps, double spiralDistance, double
> magnitude)
> > {
> >  ... make the image  ( a spiral dither pattern) and save to disk
> >return Base64.encodeFromFile("myFile.png");
> >
> > }
> > On Wed, Feb 10, 2010 at 12:50 PM, Ralf B  wrote:
> > > Hello everybody,
> >
> > > I am new to GWT and want to have a service that transfers an Image
> > > object (com.google.gwt.user.client.ui.Image) back to the client.
> > > (Using GWT 2.0.0 with Eclipse Galileo and Eclipse GWT plugin).
> >
> > > On the client, I have the following service method:
> >
> > > import com.google.gwt.user.client.ui.Image;
> > > Image getImage();
> >
> > > and the following service async method:
> >
> > > import com.google.gwt.user.client.ui.Image;
> > > void getImage(AsyncCallback callback);
> >
> > > On the server, I have the following service implementation:
> >
> > > import com.google.gwt.user.client.ui.Image;
> > > @Override
> > >public Image getEventTimeline() {
> >
> > >// 1) code to generate image from data
> >
> > >// 2) create new image and return to client
> > >   Image image = new Image("test.png");
> > >return image;
> > >}
> >
> > > When I compile the code, I get the following error:
> >
> > > [ERROR] com.google.gwt.user.client.ui.Image is not assignable to
> > > 'com.google.gwt.user.client.rpc.IsSerializable' or
> > > 'java.io.Serializable' nor does it have a custom field serializer
> > > (reached via com.google.gwt.user.client.ui.Image)
> > >  [ERROR] com.google.gwt.user.client.ui.Image has no
> > > available instantiable subtypes. (reached via
> > > com.google.gwt.user.client.ui.Image)
> > > [ERROR]subtype
> > > com.google.gwt.user.client.ui.Image is not assignable to
> > > 'com.google.gwt.user.client.rpc.IsSerializable' or
> > > 'java.io.Serializable' nor does it have a custom field serializer
> > > (reached via com.google.gwt.user.client.ui.Image)
> >
> > > This suggests that an Image cannot be serialized. I have two questions
> > > about this:
> >
> > > 1) Isn't every Google object serializable  by default. Otherwise, what
> > > is the point of having a separate image class in GWT?
> >
> > > 2) What is the proper way of doing this? I want to create the image
> > > server-sided every time a user clicks a button and return it back to
> > > the user where it is supposed to be displayed in a panel.
> >
> > > Any suggestions?
> >
> > > Thanks a lot,
> >
> > > Ralf
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> google-web-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



JBOSS deployment from GWT Eclipse projects

2010-02-10 Thread John Ivens
Okay, this is ulitmately easy...

Step 1. Recursively copy your war directory to .war in
/server/default/deploy

You HAVE to name it with the .war or JBOSS becomes TERRIBLY confused.

Step 2. For some reason, database connectivity (for me, at least) broke in
JBOSS.  I needed to copy mysql-connector-java-3.0.17-ga-bin.jar into
/server/lib

This lets JBOSS see the database connectivity in a way it understands.  I
don't understand, but hey, it works.  Of course, if you use Oracle you'll
probably copy a different file..


I hope that this saves someone time in case they have to do it themselves.

Oh, when you start your project don't set it up as for GAE (Google App
Engine)... I think this might cause problems.

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



Re: Does Image not serialize? How to transfer image back to client?

2010-02-10 Thread John Ivens
The trick I have used is to encode the image in Base64, and then send the
image as a String in the return.

public String getDither(int steps, double spiralDistance, double magnitude)
{
 ... make the image  ( a spiral dither pattern) and save to disk
   return Base64.encodeFromFile("myFile.png");
}

On Wed, Feb 10, 2010 at 12:50 PM, Ralf B  wrote:

> Hello everybody,
>
> I am new to GWT and want to have a service that transfers an Image
> object (com.google.gwt.user.client.ui.Image) back to the client.
> (Using GWT 2.0.0 with Eclipse Galileo and Eclipse GWT plugin).
>
> On the client, I have the following service method:
>
> import com.google.gwt.user.client.ui.Image;
> Image getImage();
>
> and the following service async method:
>
> import com.google.gwt.user.client.ui.Image;
> void getImage(AsyncCallback callback);
>
>
> On the server, I have the following service implementation:
>
>
> import com.google.gwt.user.client.ui.Image;
> @Override
>public Image getEventTimeline() {
>
>// 1) code to generate image from data
>
>// 2) create new image and return to client
>   Image image = new Image("test.png");
>return image;
>}
>
> When I compile the code, I get the following error:
>
> [ERROR] com.google.gwt.user.client.ui.Image is not assignable to
> 'com.google.gwt.user.client.rpc.IsSerializable' or
> 'java.io.Serializable' nor does it have a custom field serializer
> (reached via com.google.gwt.user.client.ui.Image)
>  [ERROR] com.google.gwt.user.client.ui.Image has no
> available instantiable subtypes. (reached via
> com.google.gwt.user.client.ui.Image)
> [ERROR]subtype
> com.google.gwt.user.client.ui.Image is not assignable to
> 'com.google.gwt.user.client.rpc.IsSerializable' or
> 'java.io.Serializable' nor does it have a custom field serializer
> (reached via com.google.gwt.user.client.ui.Image)
>
> This suggests that an Image cannot be serialized. I have two questions
> about this:
>
> 1) Isn't every Google object serializable  by default. Otherwise, what
> is the point of having a separate image class in GWT?
>
> 2) What is the proper way of doing this? I want to create the image
> server-sided every time a user clicks a button and return it back to
> the user where it is supposed to be displayed in a panel.
>
> Any suggestions?
>
> Thanks a lot,
>
> Ralf
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: XMLParser Help

2010-02-10 Thread John Ivens
In the server impl file:

@Override

*public* String getMapURL(String theURL) {

URL url = *null*;

String s = *null*;

String retstr = "";

*try* {

url = *new* URL(theURL);

BufferedReader reader = *new*
BufferedReader(*new*InputStreamReader(url.openStream()));

*while* ((s = reader.readLine()) != *null*) {

retstr += s + "\n";

}

*return* retstr;

} *catch* (MalformedURLException e) {

e.printStackTrace();

} *catch* (IOException e) {

e.printStackTrace();

}

*return* retstr;

}

}

Call from the client with the name of the URL that you want.

On  the client side, you can parse with stuff similar to this:


*protected* MapWidget createMapWidget(String mapString, *int* width,
*int*height, TextArea ta) {

Document doc = XMLParser.*parse*(mapString);

Element root = doc.getDocumentElement();

NodeList tempNodes = root.getElementsByTagName("temp");

String s = *new* String("");

AreaWidget[] areas = *new* AreaWidget[tempNodes.getLength()];

*for* (*int* i=0; i 0 && itemList.item(0).hasChildNodes()) {

result = itemList.item(0).getFirstChild().getNodeValue();

}

*return* result;

}


In this example, I am parsing an XML file that describes an image map to be
applied to a jpg which I retrieve.

The XML contains entries like this:






044

Test *Temp* Sensor OTA 4,3: TTS(4,3)

0.508

0.566

0.477

0.532





081

Test *Temp* Sensor OTA 7,5: TTS(7,5)

0.731

0.795

0.332

0.387





066

Test *Temp* Sensor OTA 3,1: TTS(3,1)

0.434

0.496

0.622

0.685


.



The rectangles are percentages offsets from the top left corner of the image
(values range between 0 and 1)... by multiplying by the size of the image
(width and height) you can create an image map.
On Wed, Feb 10, 2010 at 9:59 AM, Russ  wrote:

> Thanks, but I'm really just looking for a basic tutorial or example on
> how to grab remote XML data using GWT's
> com.google.gwt.xml.client.XMLParser
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Deploying to jboss

2010-02-10 Thread John Ivens
In the older versions of GWT I created build.xml scripts and ran ant to
create war files to deploy to jboss.

Do I still have to do this with the new (2.0) architecture?  I tried copying
the war directory (generated by eclipse plugins for compilation) into
/server/default/deploy/ but I got errors.  My project runs
fine in the embedded jetty server.

Is there a simple script or command I can execute to do this?  My project is
not set up as a Google App Engine project... does it need to be?

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



Re: GWT with hibernate...

2010-02-08 Thread John Ivens
Not sure I've seen all the mistakes, but shouldn't it be
from User u where u.snarfle = blarg

Looks like the class is correctly annotated.
I use hbm files and in that case you need to tell hibernate which classes
are mapped to which hbm files in the hibernate.cfg.xml file.
You may need to do the equivalent when you annotate classes, but I am not
sure how.

On Sun, Feb 7, 2010 at 6:02 PM, Nenad  wrote:

> Hi,
> I am new in GWT and I like this concept, so I've tried to create GWT
> application with hibernate support. I have a problem with Object
> mapping.
> This is my "persistence.properties" file (it is in src folder of my
> project):
> hibernate.connection.driver_class = com.mysql.jdbc.Driver
> hibernate.connection.url = jdbc:mysql://localhost:3306/gwt_web_shop_db
> hibernate.connection.username = root
> hibernate.connection.password = somepass
> hibernate.c3p0.min_size=5
> hibernate.c3p0.max_size=20
> hibernate.c3p0.timeout=1800
> hibernate.c3p0.max_statements=50
> hibernate.dialect = org.hibernate.dialect.MySQLDialect
> hibernate.connection.pool_size = 4
> hibernate.show_sql = true
> hibernate.hbm2ddl.auto = create
> hibernate.archive.autodetection = class
>
> When I run application (in Eclipse) everything goes ok with this code:
> public UserServiceImpl(){
>EntityManagerFactory emf =
> Persistence.createEntityManagerFactory("");
>em = emf.createEntityManager();
> }
> ,but when I try something like this:
>
> Query q = em.createQuery("select u from User where u.username
> = :username");
> q.setParameter("username", username);
> List res = q.getResultList();
>
> I get this Exception: java.lang.IllegalArgumentException:
> org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [select
> u from User where u.username = :username]
>
> Here is my User.java class:
>
> package gwtWebshop.client.entities;
>
> import java.io.Serializable;
>
> import javax.persistence.Entity;
> import javax.persistence.GeneratedValue;
> import javax.persistence.GenerationType;
> import javax.persistence.Id;
> import javax.persistence.Table;
>
> @Entity(name="User")
> @Table(name="users")
> public class User implements Serializable{
>/**
> *
> */
>private static final long serialVersionUID = 1L;
>private int id;
>private String username;
>public User() {
>}
>
>@Id
>@GeneratedValue(strategy = GenerationType.IDENTITY)
>public int getId() {
>return id;
>}
>public String getUsername() {
>return username;
>}
>public void setId(int id) {
>this.id = id;
>}
>public void setUsername(String username) {
>this.username = username;
>}
> }
>
> I concluded that the mapping is not done automatically based on the
> annotation, but I do not know how to change that.
>
> Please help me and tell me the right way to do this.
> Thank you.
>
> Regards,
> Nenad
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Charts in Visualization API -- pushing data

2010-02-05 Thread John Ivens
Thanks, guys.  In the meantime I am polling, and resetting down to intervals
currently of 5 seconds per refresh.  Actually works fairly well if you don't
have too many data points.

I definitely want to investigate Comet later, though.   For a bunch of
reasons...

On Fri, Feb 5, 2010 at 2:43 PM, Richard  wrote:

> You can use gwt-comet to streaming messages to the browser over long
> lived HTTP requests.
>
> http://code.google.com/p/gwt-comet/
>
> On Feb 4, 11:33 pm, Sean  wrote:
> > http://code.google.com/p/rocket-gwt/wiki/Comet
> >
> > Comet will allow you to push data from the Server to the Client. I've
> > never used it personally, but it gets suggested on these boards all
> > the time.
> >
> > On Feb 3, 5:47 pm, John Ivens  wrote:
> >
> > > Suppose that I would want to use the Google Visualization API and
> somehow
> > > have events pushing data into a line graph... fairly rapidly.
> > > I would want this line graph to real-time update itself.  So, let's say
> I
> > > would want it to continuously graph the last 10 data points that it had
> > > recieved, updating the time axis labels and the data points and line
> > > appropriately... is this possible?
> >
> > > Anyone have an example of somehow tying the data source to events from
> the
> > > server side?
> >
> > > I would also like real-time updating of gauges, if possible... is it
> > > possible?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Embedded jetty

2010-02-03 Thread John Ivens
I would be interested in knowing where that file is also...

On Tue, Feb 2, 2010 at 12:12 PM, Thom with an H  wrote:

> I'm trying to modify the jetty.xml file so I can define JDBC settings
> for my jetty instance, but I can't seem to find where to do this with
> the embedded jetty that comes with GWT. Does anyone have an idea?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Charts in Visualization API -- pushing data

2010-02-03 Thread John Ivens
Suppose that I would want to use the Google Visualization API and somehow
have events pushing data into a line graph... fairly rapidly.
I would want this line graph to real-time update itself.  So, let's say I
would want it to continuously graph the last 10 data points that it had
recieved, updating the time axis labels and the data points and line
appropriately... is this possible?

Anyone have an example of somehow tying the data source to events from the
server side?

I would also like real-time updating of gauges, if possible... is it
possible?

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



Re: GWT and MySQL Connection! Help!

2010-01-27 Thread John Ivens
What are you using in the back end?  Hibernate?  Or are you writing
individual SQL statements using JDBC (yikes!).

On Tue, Jan 26, 2010 at 9:18 PM, Jay  wrote:

> I'm sorry if this has been asked many times, I tried googling and some
> links led to Google Examples but I can't checkout the source code for
> this link.
>
>
> http://code.google.com/p/gwt-examples/source/browse/trunk/gwt-test-MySQLConn/src/com/tribling/gwt/test/mysqlconn/?r=713#mysqlconn/client
>
> I'm trying to use GWT access MySQL, I understand that I have to use
> RPC, I'm familiar with that but I just don't know how to implement
> MySQL connection into it, can anyone help me out here? Many thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Gilead 1.3 + Hibernate + GWT 2.0

2010-01-20 Thread John Ivens
Thanks!

On Wed, Jan 20, 2010 at 7:46 AM, Richard Berger wrote:

> I had Gilead 1.2.3 working with GWT 1.6 and Hibernate 3.3.2 then
> upgraded to Gilead 1.3, GWT 2.0 and Hibernate 3.3.2.  I never ran into
> the problem that you are seeing.
> My .classpath file in Eclipse has:
> 
>
>
> On Jan 20, 6:10 am, mig  wrote:
> > I've got Gilead 1.2.3 set up and working with Gilead and GWT 2.0 RC2
> > in both stateless proxy mode and dynamic proxy mode. Although there
> > are some problems with dynamic proxy generators (not Gileads fault),
> > everything works just fine. Do you strictly need Gilead 1.3 ?
> >
> > On 19. Jan, 23:16 h., John Ivens  wrote:
> >
> >
> >
> > > Has anyone gotten this to work?
> >
> > > I have followed advice on the web and tried my darndest to set this up.
>  I
> > > am talking to mysql in the background but that shouldn't matter.
> >
> > > I am switching to DTOs because I have run out of time, but I will
> switch
> > > back at a convenient time if anyone can tell me how to set this up.
> > > I'd like to know especially what all the jar files are that you used,
> which
> > > version of beanlib, hibernate, etc.  I am following the latest
> instructions
> > > for gilead.
> > > No matter what I do I get this message:
> >
> > > java.lang.NoSuchMethodError:
> > >
> net.sf.beanlib.hibernate.UnEnhancer.unenhanceClass(Ljava/lang/Class;)Ljava/
> lang/Class;
> >
> > > This seems like a library mismatch but I'm darned if I know what I am
> doing
> > > wrong.  I switched from using adapter classes to using gilead classes,
> > > changed the
> > > inheritance, everything to reflect the new stuff.
> >
> > > The strange thing is that on the server side the call to retrieve a
> List
> > > works, because on the server I can get a print out by iterating through
> my
> > > objects after the committing the transaction.
> > > The problem is getting the objects back through RPC in the return call.
> >
> > > Thanks!  If anyone could share their wisdom, I would appreciate it..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>
>
-- 

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-web-tool...@googlegroups.com.

To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Gilead 1.3 + Hibernate + GWT 2.0

2010-01-20 Thread John Ivens
I don't strictly need Gilead 1.3... I'd be happy to get 1.2.3 working...

On Wed, Jan 20, 2010 at 7:10 AM, mig  wrote:

> I've got Gilead 1.2.3 set up and working with Gilead and GWT 2.0 RC2
> in both stateless proxy mode and dynamic proxy mode. Although there
> are some problems with dynamic proxy generators (not Gileads fault),
> everything works just fine. Do you strictly need Gilead 1.3 ?
>
> On 19. Jan, 23:16 h., John Ivens  wrote:
> > Has anyone gotten this to work?
> >
> > I have followed advice on the web and tried my darndest to set this up.
>  I
> > am talking to mysql in the background but that shouldn't matter.
> >
> > I am switching to DTOs because I have run out of time, but I will switch
> > back at a convenient time if anyone can tell me how to set this up.
> > I'd like to know especially what all the jar files are that you used,
> which
> > version of beanlib, hibernate, etc.  I am following the latest
> instructions
> > for gilead.
> > No matter what I do I get this message:
> >
> > java.lang.NoSuchMethodError:
> >
> net.sf.beanlib.hibernate.UnEnhancer.unenhanceClass(Ljava/lang/Class;)Ljava/lang/Class;
> >
> > This seems like a library mismatch but I'm darned if I know what I am
> doing
> > wrong.  I switched from using adapter classes to using gilead classes,
> > changed the
> > inheritance, everything to reflect the new stuff.
> >
> > The strange thing is that on the server side the call to retrieve a List
> > works, because on the server I can get a print out by iterating through
> my
> > objects after the committing the transaction.
> > The problem is getting the objects back through RPC in the return call.
> >
> > Thanks!  If anyone could share their wisdom, I would appreciate it..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>
>
-- 

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-web-tool...@googlegroups.com.

To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Gilead 1.3 + Hibernate + GWT 2.0

2010-01-19 Thread John Ivens
Has anyone gotten this to work?

I have followed advice on the web and tried my darndest to set this up.  I
am talking to mysql in the background but that shouldn't matter.

I am switching to DTOs because I have run out of time, but I will switch
back at a convenient time if anyone can tell me how to set this up.
I'd like to know especially what all the jar files are that you used, which
version of beanlib, hibernate, etc.  I am following the latest instructions
for gilead.
No matter what I do I get this message:

java.lang.NoSuchMethodError:
net.sf.beanlib.hibernate.UnEnhancer.unenhanceClass(Ljava/lang/Class;)Ljava/lang/Class;

This seems like a library mismatch but I'm darned if I know what I am doing
wrong.  I switched from using adapter classes to using gilead classes,
changed the
inheritance, everything to reflect the new stuff.

The strange thing is that on the server side the call to retrieve a List
works, because on the server I can get a print out by iterating through my
objects after the committing the transaction.
The problem is getting the objects back through RPC in the return call.

Thanks!  If anyone could share their wisdom, I would appreciate it..
-- 

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-web-tool...@googlegroups.com.

To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Using Gilead with GWT 2.0 ms1

2010-01-19 Thread John Ivens
Oops.. the list, easier to read..

adapter-core-1.2.3.823.jar

adapter4gwt-1.2.3.823.jar

antlr-2.7.6.jar

asm-3.2.jar

beanlib-3.3.0beta6.jar

beanlib-hibernate-3.3.0beta6.jar

beanlib-hibernate-5.0.2beta-bundle.jar

beanlib-hibernate-5.0.2beta.jar

cglib-2.2.jar

commons-collections-3.1.jar

commons-lang-2.4.jar

commons-logging-1.1.1.jar

dom4j-1.6.1.jar

hibernate-util-1.2.3.823.jar

hibernate3.jar

hsqldb.jar

javassist-3.4.GA.jar

jboss-serialization.jar

jta-1.1.jar

log4j-1.2.15.jar

mysql-connector-java-3.0.17-ga-bin.jar

slf4j-api-1.5.2.jar

slf4j-simple-1.5.2.jar

trove-2.0.4.jar


On Tue, Jan 19, 2010 at 10:26 AM, John Ivens wrote:

> Anyone seen this error message?
>
> [WARN] Exception while dispatching incoming RPC call
>
> java.lang.NoSuchMethodError:
> net.sf.beanlib.hibernate.UnEnhancer.unenhanceClass(Ljava/lang/Class;)Ljava/lang/Class;
> I am getting this using gilead with hibernate with GWT 2.0, and I suspect
> that I am having some library conflict... I cannot understand which
> library.  Could someone tell me what they have working under GWT 2.0, what
> all of the jars they include in the war file are...
>
> This is my list:
>
> On Tue, Jan 19, 2010 at 7:27 AM, Dan Billings  wrote:
>
>> FYI
>>
>> A guy on sourceforge apparently made some more changes because it
>> wasn't working for him.
>>
>> http://sourceforge.net/projects/gilead/forums/forum/957377/topic/3493335
>>
>> On Dec 28 2009, 9:57 am, Trevor Skaife  wrote:
>> > RB,
>> >
>> > That's odd you had an error at that line, though it probably is a
>> > difference in the versions ofGileadwe are using. The classes were
>> > created usingGilead1.2.3.823. But it's true if you are using GWT
>> > 2.0.0 that line of code would never see the light of day.
>> >
>> > Trevor
>> >
>> > On Dec 25, 7:39 pm, Richard Berger  wrote:
>> >
>> >
>> >
>> > > Trevor:
>> >
>> > > Thank you for the post - it was a life saver.  When I copied the java
>> > > files to my system, I had a compiler error at line 161 of
>> > > RPCCopy.java:
>> > > return RPCCopy_GWT16.invoke(target, serviceMethod, args,
>> > > serializationPolicy);
>> > > The error was:
>> > > The method invoke(Object, Method, Object[], SerializationPolicy) is
>> > > undefined for the type RPCCopy_GWT16.
>> >
>> > > Since I am on GWT2, I figured I could replace that line with
>> > > return null;
>> >
>> > > Seemed to work for me.
>> >
>> > > Thanks again for your work here!
>> > > RB
>> >
>> > > On Dec 23, 6:02 am, Trevor Skaife  wrote:
>> >
>> > > > I'm just glad to see people are able to use my fix for usinggilead
>> > > > with GWT 2.0.0
>> >
>> > > > On Dec 22, 11:08 am, lucamen  wrote:
>> >
>> > > > > Thanks Josh!! That really help me a lot and now everything is
>> working
>> > > > > properly!
>> >
>> > > > > BTW Bruno (theGileadmain developer) wrote herehttp://
>> sourceforge.net/projects/gilead/forums/forum/868076/topic/3484314
>> > > > > that a new release is coming "very" soon... so just wait and hope
>> in a
>> > > > > stable version that works with gwt2.0
>> >
>> > > > > Thanks again and merry christmas! :-P
>> >
>> > > > > On 18 Dic, 22:53, Josh Martin  wrote:
>> >
>> > > > > > What worked for me was to add the files Trevor specified to 'my'
>> > > > > > project, and not into the originalgileadsource directories.  You
>> > > > > > just have to make sure to match the original package directory
>> he
>> > > > > > specified of: src/com/google/gwt/user/server/rpc in your project
>> > > > > > directory.  Any project that you create now that uses the
>> adapter4gwt
>> > > > > > library should include those two files as source files as well.
>>  Your
>> > > > > > application should compile with those source files in it, as
>> long as
>> > > > > > you have the adapter4gwt library files included (which you would
>> have
>> > > > > > to have to usegileadanyway).
>> >
>> > > > > > I, too, thought he meant to put them in the originalgilead
>> > > > > > directories and recreate the entire adapter4gwt library, but
&

Re: Using Gilead with GWT 2.0 ms1

2010-01-19 Thread John Ivens
Anyone seen this error message?

[WARN] Exception while dispatching incoming RPC call

java.lang.NoSuchMethodError:
net.sf.beanlib.hibernate.UnEnhancer.unenhanceClass(Ljava/lang/Class;)Ljava/lang/Class;
I am getting this using gilead with hibernate with GWT 2.0, and I suspect
that I am having some library conflict... I cannot understand which
library.  Could someone tell me what they have working under GWT 2.0, what
all of the jars they include in the war file are...

This is my list:

On Tue, Jan 19, 2010 at 7:27 AM, Dan Billings  wrote:

> FYI
>
> A guy on sourceforge apparently made some more changes because it
> wasn't working for him.
>
> http://sourceforge.net/projects/gilead/forums/forum/957377/topic/3493335
>
> On Dec 28 2009, 9:57 am, Trevor Skaife  wrote:
> > RB,
> >
> > That's odd you had an error at that line, though it probably is a
> > difference in the versions ofGileadwe are using. The classes were
> > created usingGilead1.2.3.823. But it's true if you are using GWT
> > 2.0.0 that line of code would never see the light of day.
> >
> > Trevor
> >
> > On Dec 25, 7:39 pm, Richard Berger  wrote:
> >
> >
> >
> > > Trevor:
> >
> > > Thank you for the post - it was a life saver.  When I copied the java
> > > files to my system, I had a compiler error at line 161 of
> > > RPCCopy.java:
> > > return RPCCopy_GWT16.invoke(target, serviceMethod, args,
> > > serializationPolicy);
> > > The error was:
> > > The method invoke(Object, Method, Object[], SerializationPolicy) is
> > > undefined for the type RPCCopy_GWT16.
> >
> > > Since I am on GWT2, I figured I could replace that line with
> > > return null;
> >
> > > Seemed to work for me.
> >
> > > Thanks again for your work here!
> > > RB
> >
> > > On Dec 23, 6:02 am, Trevor Skaife  wrote:
> >
> > > > I'm just glad to see people are able to use my fix for usinggilead
> > > > with GWT 2.0.0
> >
> > > > On Dec 22, 11:08 am, lucamen  wrote:
> >
> > > > > Thanks Josh!! That really help me a lot and now everything is
> working
> > > > > properly!
> >
> > > > > BTW Bruno (theGileadmain developer) wrote herehttp://
> sourceforge.net/projects/gilead/forums/forum/868076/topic/3484314
> > > > > that a new release is coming "very" soon... so just wait and hope
> in a
> > > > > stable version that works with gwt2.0
> >
> > > > > Thanks again and merry christmas! :-P
> >
> > > > > On 18 Dic, 22:53, Josh Martin  wrote:
> >
> > > > > > What worked for me was to add the files Trevor specified to 'my'
> > > > > > project, and not into the originalgileadsource directories.  You
> > > > > > just have to make sure to match the original package directory he
> > > > > > specified of: src/com/google/gwt/user/server/rpc in your project
> > > > > > directory.  Any project that you create now that uses the
> adapter4gwt
> > > > > > library should include those two files as source files as well.
>  Your
> > > > > > application should compile with those source files in it, as long
> as
> > > > > > you have the adapter4gwt library files included (which you would
> have
> > > > > > to have to usegileadanyway).
> >
> > > > > > I, too, thought he meant to put them in the originalgilead
> > > > > > directories and recreate the entire adapter4gwt library, but
> after re-
> > > > > > reading what he suggested, I realized his real suggestion was far
> > > > > > easier. (Thanks Trevor!)
> >
> > > > > > Hope this helps,
> > > > > > Josh
> >
> > > > > > On Dec 18, 4:04 am, lucamen  wrote:
> >
> > > > > > > Hello, I'm working on a GWT 2.0 project with hibernate
> integration viaGilead. When I try to load data from database (on GWT 1.7
> everything
> > > > > > > was working properly) I get this error "Parameter 0 of is of an
> > > > > > > unknown type 'java.lang.String/2004016611'" and googling I've
> found
> > > > > > > this thread.
> > > > > > > I downloaded these two files and put in
> src/com/google/gwt/user/server/
> > > > > > > rpc under mygileadroot directory but nothing changes!
> >
> > > > > > > To be sure I've updated all my buildpath with the jars I need
> but the
> > > > > > > error still remain.
> >
> > > > > > > Do I have to ant build the adapter4gwt with these two new files
> and
> > > > > > > then add the new jars I get?
> >
> > > > > > > I've already tried but ant failed with this error:
> >
> > > > > > > build:
> > > > > > >  [echo] adapter4gwt:
> /Users/lucame/Documents/workspace/Libs/gilead-1.2.3.823/adapter4gwt/build.x
> ml
> > > > > > > [javac] Compiling 6 source files to
> /Users/lucame/Documents/
> > > > > > > workspace/Libs/gilead-1.2.3.823/adapter4gwt/classes
> > > > > > > [javac]
> /Users/lucame/Documents/workspace/Libs/gilead-1.2.3.823/
> > > > > > >
> adapter4gwt/src/com/google/gwt/user/server/rpc/RPCCopy_GWT20.java:287:
> > > > > > > cannot find symbol
> > > > > > > [javac] symbol  : constructor RPCRequest
> > > > > > > (java.lang.reflect.Method,java.lang.Object
> > > > > > > [],com.google.gwt.user.server.rpc.SerializationPolicy,int)
> > > > > > >  

Adding lines to Trees in GWT 2.0

2009-12-18 Thread John Ivens
So, TreeImages is deprecated and I should use Tree.Resources...

Suppose that I have graphics to represent the tree bits.  Could someone tell
me how to tell the tree to draw itself, and where to put the graphics in the
directory structure?

Thank you.

--

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




Re: UI Binder, really a good approach?

2009-12-11 Thread John Ivens
How about a Matisse-like interface that allows you to create the XML by
dragging graphics around, and linking them to code in the .java file?
That's what I want.

On Fri, Dec 11, 2009 at 8:22 AM, Arthur Kalmenson wrote:

> I think you just have to try it and see. We're doing that here to
> determine if UiBinder is a better way of building user interfaces, or
> if we prefer building UI in a Swing like fashion. There are arguments
> both ways, but it comes down to taste and preference. UiBinder allows
> for web designers to be more involved in the creation of GWT
> applications and in many organizations that's a huge benefit. Another
> benefit of UiBinder, is that you can use standard HTML elements inside
> an HTMLPanel to get higher performance as per Kelly Norton's Google
> I/O talk. Now you can do it in a syntax highlighted, code completion
> way instead of a Java strings.
>
> --
> Arthur Kalmenson
>
>
>
> On Fri, Dec 11, 2009 at 7:23 AM, Stefan Bachert 
> wrote:
> > Classical web development urges me to have a multiple personalities.
> > That is an disease
> > I have to deals with
> > - HTML
> > - CSS
> > - JavaScript
> > - Server-Side calls via AjAx
> > - Server side implementation in Java or other language
> > - and references from one to the other
> >
> > Thatfor GWT was good to reduce the number of languages.
> > Everything is Java, CSS could be considered as a designer job making
> > an other scheme.
> > No application (=behaviour,functionality) developer should need to
> > create a CSS
> >
> > Now UiBinder comes up with a further XML, and mixing up CSS, HTML and
> > GWT code.
> > Somehow I feel be back at the beginning of webdevelopment, and I feel
> > ill ;-).
> >
> > The advantage of declarative programming could be reached in Java in a
> > much better way.
> > Look at the following code, it is pure Java and much more declarative
> > then UiBinder.
> > It has very less code and is in the end much more flexible since code
> > could add any rule you like.
> >
> > new DialogCreator()
> >.add(localization.account(), account, 100, DialogCreator.lines
> > (1)).newLine()
> >.add(localization.password(), password, 100, DialogCreator.lines
> > (1)).newLine()
> >.add(localization.session(), session, 100, DialogCreator.lines
> > (1)).newLine()
> >.button(ok)
> >.button(cancel)
> >
> > If you don't like parameters per position, ok, change it to:
> >
> > new DialogCreator()
> >.add(new DialogItem()
> >.label(localization.account())
> >.item(account)
> >.width(100)
> >.height(DialogCreator.lines(1))
> >)
> > .newLine().
> >
> > What could be done in UiBuilder better/more readable than in java?
> > What are your thoughts?
> >
> > Stefan Bachert
> >
> > PS: It is like Spring. IoC could be done in Java itself. Why to deal
> > with this human unreadable XMLs?
> >  a java compiler is much more flexible and exact as a validation of a
> > xml (try the check a mispelling of an java class!)
> >
> >
> > PS2: Just to avoid the impression I am just negative. GWT is a great
> > thing, but surely improvable
> >
> > --
> >
> > You received 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.
> >
> >
> >
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

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




Re: Netbeans plugin

2009-12-10 Thread John Ivens
I agree.  I am always forced to use Eclipse because everyone else uses it,
and features such as the Google Eclipse Plugin come out well in advance of
anything for NetBeans.

On Thu, Dec 10, 2009 at 8:28 AM, nicanor.babula wrote:

> Hi all,
>
> I don't want to start a flaming war on whether NetBeans is better than
> Eclipse or not, because that is strictly a matter of taste. Said that,
> I want to mention that for me (and surely for many other developers
> like me) Eclipse kinda sucks, so it would be nice for the guys at
> Google to set up an equivalent of the Google Eclipse Plugin for
> NetBeans too. There is some sort of "beta" plugin for Netbeans
> supporting GAE too, but as it doesn't have google behind the scenes,
> it's not too reliable.
> What do other Netbeans Developers think about this?
>
> Cristian Babula.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

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




Re: Announcing GWT 2.0 and much, much more...

2009-12-09 Thread John Ivens
Thank you... this is worth it for the UIBinder alone.  Looks really good.
I'll have to experiment with it.

On Wed, Dec 9, 2009 at 9:38 AM, Ittai  wrote:

> Congrats and thank you to the whole GWT team!
> Hope the move from 1.7 to 2.0 won't be painfull :)
>
> On Dec 9, 5:13 am, Miguel Méndez  wrote:
> > Hi Folks!
> >
> > We have some very exciting announcements today.  Please check out the
> > following blog post that covers the GWT 2.0 SDK, Google Plugin for
> Eclipse,
> > and -- brand new in GWT 2.0 -- a performance analysis tool called Speed
> > Tracer.  I think that you will find it pretty interesting...
> >
> > http://googlewebtoolkit.blogspot.com/2009/12/introducing-google-web-t...
> >
> > --
> > Miguel on behalf of the GWT team
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>

--

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




Re: How can GWT handle real time data?

2009-09-25 Thread John Ivens
What would rock the world is to be able to do something like declare a
variable on the server side "volatile", and link it to the client side via
some machinery built into a library.  Then, you don't have to write all of
the RPC stuff yourself.  Something like a publish-subscribe mechanism, with
a router in between.  This would be great for events also.

On Fri, Sep 25, 2009 at 11:47 AM, Sean  wrote:

>
> You would poll from a GWT page via some call, RPC or an HTTP request
> (I personally use RPC's) to get the information from the server. There
> is no sever push available though. You do have to ask for information
> before you get it in a web page.
>
> On Sep 25, 11:32 am, looklook  wrote:
> > I want to know how GWT handles real time data? For example, a text
> > field of a web page needs to display real time data got from the
> > server, this means once the server receives real time data, it will
> > send to the web page and the text field of the web page gets updated.
> > Can GWT handle this and how? 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: rpc vs RequestBuilder

2009-09-15 Thread John Ivens
Thanks for clarifying... that makes sense. I guess I didn't quite understand
what he was doing.

On Tue, Sep 15, 2009 at 6:54 AM, brett.wooldridge <
brett.wooldri...@gmail.com> wrote:

>
> Not high data rates, but large arrays.  He said he sends different
> length arrays containing a pojo that itself contains 10 strings of 10
> chars average.  In the error case, that is an array with 100,000
> elements, which are themselves objects with 10 strings of 10 chars
> each.  That's a 10meg "object" being serialized over GWT-RPC -- I'm
> not surprised that various JavaScript engines fell over.
>
> Again, it's not about data rate, but object size.  The only
> implication for data rate was that a 10 element array containing 10
> pojos with 10 strings of 10 characters took between 10-30ms to send.
> Interesting but not very informative.  Sending that same array in a
> loop 1000 times would be more interesting.  Likely there are runtime
> optimizations -- especially on the Java side, but also on browsers
> like Safari -- that will start to kick-in once the engine has profiled
> what is going on.
>
> Brett
>
>
> On Sep 15, 3:25 am, John Ivens  wrote:
> > Hey, this is scary... Firefox, Netscape and Safari all error out at high
> > data rates?
> >
> >
> >
> > On Mon, Sep 14, 2009 at 5:03 AM, lord.luki  wrote:
> >
> > > Hi, maybe it wont be helpfull, but there si some response time testing
> > > whitch i did. I was testing gwt-rpc from client to gwt embedet server
> > > (Jetty). I was sending pojo object which contained 10 strings each
> > > with average length 10 chars. In table below is time in miliseconds
> > > for difrent lengths of arraylist containing this pojo objects. (From
> > > 10 to 100 000 objects).
> > > I also had to add -Xmx512M parameter for last column.
> >
> > > lenght:   |   10100 10001   10
> > > --
> > > Fire Fox  |   1830  120 1200error
> > > Chrome   |1014  68  900 24000
> > > IE|   1340  230 330015
> > > Opera |   3247  130 130027700
> > > "hosted" |   340250025000   249000  3270898
> > > Netscape|20 47  220 2800error
> > > Safari  |  10   19  70  1300error
> >
> > > ps: yes it is 54 minutes for hosted mode :-D.
> >
> > > On Sep 13, 10:37 pm, ben fenster  wrote:
> > > >  i know that but i just wanted to know if the  performence margin
> > > > considering having efficient serialization algoritem could be big
> > > > enough too be worth the invesment in developing such php server side
> > > > request handler
> >
> > > > i also wanted to know about shear power of request handling per
> > > > second ? , i belive that php combined with apache would prove too be
> > > > much stronger but i would like too hear from someone that checked it
> > > > out
> > > > On Sep 13, 4:16 am, Thomas Broyer  wrote:
> >
> > > > > On 13 sep, 07:50, ben fenster  wrote:
> >
> > > > > > have anyone checked what is the better way to comunicate with
> server
> > > > > > performence wize rpc or RequestBuilder(using php)
> >
> > > > > It would all depend on your serialization algorithm when not using
> GWT-
> > > > > RPC; so there's no real answer to your question.
> >
>

--~--~-~--~~~---~--~~
You received 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 vs RequestBuilder

2009-09-14 Thread John Ivens
Could you show the code that you used to test this with?

On Mon, Sep 14, 2009 at 11:25 AM, John Ivens wrote:

> Hey, this is scary... Firefox, Netscape and Safari all error out at high
> data rates?
>
>
> On Mon, Sep 14, 2009 at 5:03 AM, lord.luki  wrote:
>
>>
>> Hi, maybe it wont be helpfull, but there si some response time testing
>> whitch i did. I was testing gwt-rpc from client to gwt embedet server
>> (Jetty). I was sending pojo object which contained 10 strings each
>> with average length 10 chars. In table below is time in miliseconds
>> for difrent lengths of arraylist containing this pojo objects. (From
>> 10 to 100 000 objects).
>> I also had to add -Xmx512M parameter for last column.
>>
>> lenght:   |   10100 10001   10
>> --
>> Fire Fox  |   1830  120 1200error
>> Chrome   |1014  68  900 24000
>> IE|   1340  230 330015
>> Opera |   3247  130 130027700
>> "hosted" |   340250025000   249000  3270898
>> Netscape|20 47  220 2800error
>> Safari  |  10   19  70  1300error
>>
>> ps: yes it is 54 minutes for hosted mode :-D.
>>
>> On Sep 13, 10:37 pm, ben fenster  wrote:
>> >  i know that but i just wanted to know if the  performence margin
>> > considering having efficient serialization algoritem could be big
>> > enough too be worth the invesment in developing such php server side
>> > request handler
>> >
>> > i also wanted to know about shear power of request handling per
>> > second ? , i belive that php combined with apache would prove too be
>> > much stronger but i would like too hear from someone that checked it
>> > out
>> > On Sep 13, 4:16 am, Thomas Broyer  wrote:
>> >
>> >
>> >
>> > > On 13 sep, 07:50, ben fenster  wrote:
>> >
>> > > > have anyone checked what is the better way to comunicate with server
>> > > > performence wize rpc or RequestBuilder(using php)
>> >
>> > > It would all depend on your serialization algorithm when not using
>> GWT-
>> > > RPC; so there's no real answer to your question.
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
You received 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 vs RequestBuilder

2009-09-14 Thread John Ivens
Hey, this is scary... Firefox, Netscape and Safari all error out at high
data rates?

On Mon, Sep 14, 2009 at 5:03 AM, lord.luki  wrote:

>
> Hi, maybe it wont be helpfull, but there si some response time testing
> whitch i did. I was testing gwt-rpc from client to gwt embedet server
> (Jetty). I was sending pojo object which contained 10 strings each
> with average length 10 chars. In table below is time in miliseconds
> for difrent lengths of arraylist containing this pojo objects. (From
> 10 to 100 000 objects).
> I also had to add -Xmx512M parameter for last column.
>
> lenght:   |   10100 10001   10
> --
> Fire Fox  |   1830  120 1200error
> Chrome   |1014  68  900 24000
> IE|   1340  230 330015
> Opera |   3247  130 130027700
> "hosted" |   340250025000   249000  3270898
> Netscape|20 47  220 2800error
> Safari  |  10   19  70  1300error
>
> ps: yes it is 54 minutes for hosted mode :-D.
>
> On Sep 13, 10:37 pm, ben fenster  wrote:
> >  i know that but i just wanted to know if the  performence margin
> > considering having efficient serialization algoritem could be big
> > enough too be worth the invesment in developing such php server side
> > request handler
> >
> > i also wanted to know about shear power of request handling per
> > second ? , i belive that php combined with apache would prove too be
> > much stronger but i would like too hear from someone that checked it
> > out
> > On Sep 13, 4:16 am, Thomas Broyer  wrote:
> >
> >
> >
> > > On 13 sep, 07:50, ben fenster  wrote:
> >
> > > > have anyone checked what is the better way to comunicate with server
> > > > performence wize rpc or RequestBuilder(using php)
> >
> > > It would all depend on your serialization algorithm when not using GWT-
> > > RPC; so there's no real answer to your question.
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Modelling framework

2009-08-04 Thread John Ivens
Sweet!!!

I noticed that you have Oracle support.  Do you have a way to support the
Oracle XMLType, at least a way that is more direct than the way that I have
done this before, where I kludged Hibernate to be able to store XML in the
database?

On Tue, Aug 4, 2009 at 4:38 PM, ckendrick wrote:

>
> Hi John,
>
> For live connections to SQL, Hibernate and other data providers see
> the SmartGWT Pro/EE showcase:
>
> http://www.smartclient.com/smartgwtee/showcase/
>
> As well as Sanjiv's blog on SmartGWT Pro/EE, which is the link I meant
> to post before:
>
>
> http://www.jroller.com/sjivan/entry/introduction_to_smartgwt_enterprise_edition
>
> Note that the SmartGWT non-Pro/EE showcase shows clientOnly
> DataSources, but as I mentioned, DataSources are pluggable/swappable.
> Every interaction you see in the SmartGWT showcase with a clientOnly
> DataSource also works with SQL, Hibernate or custom DataSource in
> SmartGWT EE.
>
>
> On Aug 4, 4:16 pm, John Ivens  wrote:
> > There are no examples that I know of actually showing a connection, for
> > example with a sample mysql database or really anything else.  Please
> > correct me if I'm wrong.
> >
> > On Tue, Aug 4, 2009 at 3:42 PM, ckendrick  >wrote:
> >
> >
> >
> > > With SmartGWT you can represent a data structure as a DataSource.  A
> > > DataSource can be tied to any kind of data provider - not just
> > > different JPA implementers but also WSDL web services, REST services,
> > > non-JPA persistence systems like Ibatis, etc.  The persistence engine
> > > is pluggable, so you can swap strategies, even swap platforms (eg Java
> > > to PHP backend) without changing the UI.
> >
> > > With SmartGWT Pro you can generate SQL tables or Hibernate entities
> > > from a DataSource, or vice versa, that is, generate a DataSource from
> > > existing SQL tables or Hibernate entities.  Then you can just drag the
> > > DataSource onto a grid component and you've got the ability to do CRUD
> > > operations without writing any code, and you can add business logic
> > > from there.
> >
> > > Probably the best single overview is here:
> >
> > >http://www.jroller.com/sjivan/entry/smartgwt_out_of_beta_v1
> >
> > > On Aug 4, 7:40 am, Kaspar Fischer  wrote:
> > > > > The thing is, there IS a framework for what you are trying to do
> (i.e.
> > > > > represent a data structure without being tied to implementation).
> It's
> > > > > called Java. If you're looking for the ability to quickly add
> fields
> > > > > to customer's data structures, that's dependent on low coupling and
> > > > > other good programming /techniques/ not a given framework
> >
>

--~--~-~--~~~---~--~~
You received 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: Modelling framework

2009-08-04 Thread John Ivens
It apparently can be tied to a backend datasource, although all of these
examples have
setClientOnly(true)

There are no examples that I know of actually showing a connection, for
example with a sample mysql database or really anything else.  Please
correct me if I'm wrong.

On Tue, Aug 4, 2009 at 3:42 PM, ckendrick wrote:

>
> With SmartGWT you can represent a data structure as a DataSource.  A
> DataSource can be tied to any kind of data provider - not just
> different JPA implementers but also WSDL web services, REST services,
> non-JPA persistence systems like Ibatis, etc.  The persistence engine
> is pluggable, so you can swap strategies, even swap platforms (eg Java
> to PHP backend) without changing the UI.
>
> With SmartGWT Pro you can generate SQL tables or Hibernate entities
> from a DataSource, or vice versa, that is, generate a DataSource from
> existing SQL tables or Hibernate entities.  Then you can just drag the
> DataSource onto a grid component and you've got the ability to do CRUD
> operations without writing any code, and you can add business logic
> from there.
>
> Probably the best single overview is here:
>
>http://www.jroller.com/sjivan/entry/smartgwt_out_of_beta_v1
>
> On Aug 4, 7:40 am, Kaspar Fischer  wrote:
> > > The thing is, there IS a framework for what you are trying to do (i.e.
> > > represent a data structure without being tied to implementation). It's
> > > called Java. If you're looking for the ability to quickly add fields
> > > to customer's data structures, that's dependent on low coupling and
> > > other good programming /techniques/ not a given framework
> >
>

--~--~-~--~~~---~--~~
You received 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: java.lang.UnsupportedClassVersionError: Bad version number in .class file in eclipse-3.4 + mac osx

2009-07-23 Thread John Ivens
I got this when I mixed classes compiled in one version with another.
Beware of server side implementations compiled under one version and hosted
in your application server mixed with classes compiled in the other version,
possible other libraries someone else made?

On Thu, Jul 23, 2009 at 9:47 AM, Norman Maurer  wrote:

>
> Hi all,
>
> after starting eclipse today on my mac and trying to start my
> application in hosted mode I get the following stacktrace. I already
> checked that the java version is set to 1.5. I'm using gwt-1.7.0. The
> same project work without any problem on my windows xp box. Any idea ?
>
> Here is the stacktrace:
>
> [WARN] failed
> com.google.gwt.dev.shell.jetty.jettylauncher$webappcontextwithrel...@b60063
> {/,/Users/norman/Documents/workspace/Hupa/war}
> java.lang.UnsupportedClassVersionError: Bad version number in .class file
>at java.lang.ClassLoader.defineClass1(Native Method)
>at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>at
> com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:356)
>at
> org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
>at
> org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
>at java.lang.ClassLoader.defineClass1(Native Method)
>at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
>at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>at
> com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload$WebAppClassLoaderExtension.findClass(JettyLauncher.java:334)
>at
> org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:366)
>at
> org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
>at
> org.apache.hupa.server.guice.ServerModul.configureHandlers(ServerModul.java:62)
>at
> net.customware.gwt.dispatch.server.guice.ActionHandlerModule.configure(ActionHandlerModule.java:38)
>at
> com.google.inject.AbstractModule.configure(AbstractModule.java:59)
>at
> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
>at com.google.inject.spi.Elements.getElements(Elements.java:101)
>at
> com.google.inject.InjectorShell$Builder.build(InjectorShell.java:135)
>at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:102)
>at com.google.inject.Guice.createInjector(Guice.java:92)
>at com.google.inject.Guice.createInjector(Guice.java:69)
>at com.google.inject.Guice.createInjector(Guice.java:59)
>at
> org.apache.hupa.server.guice.MyGuiceServletConfig.getInjector(MyGuiceServletConfig.java:37)
>at
> com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:43)
>at
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
>at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
>at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
>at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
>at
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
>at
> com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:427)
>at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
>at
> org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
>at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
>at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
>at org.mortbay.jetty.Server.doStart(Server.java:222)
>at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java

History -- invalidating a page

2009-07-22 Thread John Ivens
I hope that this is an easy question for all of you.  I apologize if this
has been answered before.

I have set up security with LDAP and ACEGI, using jsp pages that are called
when requests are intercepted via ACEGI.  It works great.  Upon successful
login and determining that the user has the appropriate role, the gwt
application is entered.

There are two problems I have, and I think that they are related.

1.) When you press the back button, you are left with the original state of
the page you first came to.  So, tab pages have default values and all of
that.  How do you keep that information when you go back in the browser?

2.) Once I logout the user, it is still possible to visit the old page and
do work on it, even though in reality the session has been invalidated.  If
I were to branch to another page from the original one, I would be
redirected to the login page, but not upon orginally hitting the back
button. How do I tell the browser that the old page is now invalidated?

--~--~-~--~~~---~--~~
You received 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: XML parsing using GWT

2009-06-25 Thread John Ivens
I seem to remember that there are two different XML libraries..
I used these imports:

import com.google.gwt.xml.client.CDATASection;

import com.google.gwt.xml.client.Document;

import com.google.gwt.xml.client.Element;

import com.google.gwt.xml.client.NodeList;

import com.google.gwt.xml.client.Text;

import com.google.gwt.xml.client.XMLParser;


This inherits tag:





On Thu, Jun 25, 2009 at 3:50 PM, G  wrote:

>
> Hello -
>
> I am little frustrated with GWT, firstly importing external jar in GWT
> isn't trivial and secondly simple XML parsing doesnt work.
>
> At this point, I dont care much about importing external jars and will
> leave that for later.
>
> What I dont understand is why simple XML parsing is not working ... I
> am getting no compile time errors.. using GWT gwt-windows-1.5.3.
>
> In my project .gwt.xml I added name="com.google.gwt.xml.XML" />
>
> I am running in the hosted mode and it bombs with the exception:
> java.lang.ClassCastException:
> com.google.gwt.xml.client.impl.DocumentImpl cannot cast to
> com.google.gwt.dom.client.Document
>
> Even this doesn't work:
> Document messageDom = (Document) XMLParser.parse(" >");
>
> 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: Left Menu on this group!

2009-06-10 Thread John Ivens
I thought I was the only one who thought this guy was a couple cans short of
a six-pack.

On Tue, Jun 9, 2009 at 3:45 PM, Ian Bambury  wrote:

> What *are* you on about?
> Still, it's one way to introduce yourself to the group :-)
>
> Plonk!
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/6/9 iainmackay85 
>
>>
>> Could someone please fix the left menu on this group that currently
>> obscures the left side.
>>
>> Poor!!
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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 load images dynamically?

2009-04-20 Thread John Ivens
There is a really good solution listed earlier using Image(url) where url
looks like "data:
// Example client code which uses an encoded base64 string passed from the
server to the client:

private void refreshImage() {

// lazy initialization of service proxy

if (ditherSvc == null) {

ditherSvc = GWT.create(DitherService.class);

}


 AsyncCallback callback = new AsyncCallback() {

public void onFailure(Throwable caught) {

// do something with errors

}


 public void onSuccess(String result) {

img.setUrl("data:image/png;base64," + result);

}

};


 // make the call to the dither service


 ditherSvc.getDither(steps, spiralDistance, magnitude, callback);

}


On the server side, you need to get a library which is available free for
java on the web which encodes a string as base64... an example server side
is:


package edu.wiyn.odi.server;


import java.io.File;

import java.io.IOException;

import java.util.Calendar;

import java.util.Date;

import java.util.Vector;


import org.wiyn.odi.op2.application.DitherPatternCoverage;

import org.wiyn.odi.op2.application.op2;

import org.wiyn.odi.op2.otalib.otaMosaic;


import com.google.gwt.core.client.GWT;

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


import edu.wiyn.odi.client.DitherService;


public class DitherServiceImpl extends RemoteServiceServlet implements

DitherService {


 /**

 *

 */

private static final long serialVersionUID = 1L;


 public String getDither(int steps, double spiralDistance, double magnitude)
{

// Read in a png file and make it into a byte array

// Encode this file as a string and pass it to the client

//System.out.println(System.getProperty("user.dir"));

System.out.println("Steps: " + steps + ", spiralDistance: " + spiralDistance
+ ", magnitude: " + magnitude);

String encoded = null;

try {


 // BasicConfigurator.configure ();

DitherPatternCoverage cover = new DitherPatternCoverage(800);


 op2.updateCatalog(120., 60.);

Vector myDither = cover.generateDitherSequence(120., 60.,

cover.getSpiralDither(steps, spiralDistance));


 long start = System.currentTimeMillis();


 cover.calculateCoverage(myDither);


 long end = System.currentTimeMillis();


 System.out.println("rendering took: " + (end - start) + "ms");


 cover.writeToDisk("./coveragetest.png");

encoded = Base64.encodeFromFile("./coveragetest.png");

 } catch (IOException e) {

e.printStackTrace();

}

return(encoded);

}


}


The main lines are:

cover.writeToDisk("./coveragetest.png");

encoded = Base64.encodeFromFile("./coveragetest.png");

return(encoded);

I write to disk, but don't need to.  If I kept this in a byte array it would
be faster.  There is also an encoding method which works with byte arrays.


On Mon, Apr 20, 2009 at 5:43 PM, Chii  wrote:

>
> The purpose of image bundles is to crunch the static images you have
> into one big image - if you have multiple images that could be
> submitted by a user and changes dynamically, then image bundles is not
> the right solution. new Image(url) is quite a simple and easy
> solution, why not use that?
>
> On Apr 19, 9:16 am, POLS  wrote:
> > Hi,
> >
> > I am using ImageBundle feature.
> > I am using  @Resource annotation, specifying image file location and
> > image name.
> > Its kind of a static behavior.
> >
> > I have details of images name and locations in the  database.
> > Can you please tell me, How to load the images?
> >
> > Thanks,
> > POLS
> >
>

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



Re: Loading Images into GWT via MySQL

2009-04-02 Thread John Ivens
I'd like to thank the contributors for this discussion, particularly Darren,
who provided a nice solution to a problem I had making transient images on
the server side and displaying them on the client side.

On Mon, Mar 16, 2009 at 12:40 AM, alex.d wrote:

>
> Does the img.setUrl("data:image/jpg;base64,"...-trick work reliable in
> all major browsers?
>
> On 13 Mrz., 15:07, Darren  wrote:
> > The one case that hasn't been mentioned is when one dynamically
> > creates transient images on the server.
> >
> > We transform various XML data sources into SVG and then transcode into
> > JPG (using Batik) on the fly, then base 64 encode the JPG into a
> > string and send it across via GWT-RPC.
> >
> > Then on the client, once you have the image data from the RPC callback
> > (as a String):
> > String base64EncodedImage = ... ;
> > Image img = new Image();
> > img.setUrl("data:image/jpg;base64," + base64EncodedImage);
> >
> > On Mar 13, 5:08 am, stone  wrote:
> >
> > > use a servlet url for downloading img.
> > > for example: myapp/dbimage/123456
> > > and the servlet mapping is /dbimage/*
> >
> > > On Mar 13, 9:52 am, Itamar Ravid  wrote:
> >
> > > > Don't forget however to set the content type on the response to an
> image of
> > > > some type, otherwise the client's browser will try to download the
> picture
> > > > rather than display it.
> >
> > > > On Fri, Mar 13, 2009 at 2:28 AM, gregor <
> greg.power...@googlemail.com>wrote:
> >
> > > > > I think Itamar is right, Jack, you should use a standard
> HttpServlet
> > > > > for this, not GWT-RPC, because this sends the image over to the
> > > > > browser as byte steam, and I don't think RPC can do that.
> >
> > > > > First, I take it these are not images used in your UI (like icons
> > > > > etc), 'cos those should go in an ImageBundle. I assume you know
> that &
> > > > > these images are downloaded as user selections etc.
> >
> > > > > 1) Consult your MySQL docs/forum to find out how to obtain an
> > > > > InputStream for the image via JDBC. You want to pass an InputStream
> > > > > back to your image download HttpServlet. You don't want to read out
> > > > > the image bytes yet.
> >
> > > > > 2) You write the HttpServlet something like this example (there are
> > > > > lots of others around):
> >
> > > > >http://snippets.dzone.com/posts/show/4629
> >
> > > > > Notice that the key is a looping read of the InputStream (which you
> > > > > got from MySQL) that writes straight into the HttpServlet's
> response
> > > > > OutputStream. Notice also it uses a buffer byte[] array. This is so
> > > > > that your web server does not get it's memory clogged up with big
> > > > > image byte arrays - the image bytes just get shunted from the DB
> > > > > straight out to the browser via this buffer. Therefore set this
> buffer
> > > > > small. Apache tend to use 2048 bytes. I think Oracle prefer 4096.
> That
> > > > > sort of size for the buffer. Take care to set the response content
> > > > > type so the browser knows what it's dealing with.
> >
> > > > > 3) In your client you can set the Image widget's URL to your image
> > > > > download HttpServlet adding a parameter for the image id.
> >
> > > > > regards
> > > > > gregor
> >
> > > > > On Mar 12, 8:54 pm, "fatjack1...@googlemail.com"
> > > > >  wrote:
> > > > > > Hi,
> >
> > > > > > I'm not too sure how to implement a HTTPServlet. Does anyone know
> how
> > > > > > to use images using RPC?
> >
> > > > > > Im really stuck on this.
> >
> > > > > > On Mar 12, 8:43 pm, Itamar Ravid 
> wrote:
> >
> > > > > > > The best way, IMO, is to not use GWT-RPC, but rather implement
> an
> > > > > > > HttpServlet, that retrieves the data from the database and
> returns it
> > > > > with
> > > > > > > the appropriate Content-Type in response to a GET http request.
> Then,
> > > > > you
> > > > > > > simply place an image in your GWT code, with its source being
> the path
> > > > > to
> > > > > > > the servlet (defined in your web.xml), passing along any
> parameters
> > > > > required
> > > > > > > - such as the ID of the image in the database.
> >
> > > > > > > On Thu, Mar 12, 2009 at 12:59 PM, fatjack1...@googlemail.com <
> >
> > > > > > > fatjack1...@googlemail.com> wrote:
> >
> > > > > > > > Hi,
> >
> > > > > > > > I am new to loading images into GWT from MySQL and am abit
> lost on
> > > > > the
> > > > > > > > best way to do it.
> >
> > > > > > > > I already have my image in the database. How do I retrieve
> it? I read
> > > > > > > > somewhere that it can just be stored as a String. Is this
> correct? So
> > > > > > > > my code on the server side would look like:
> >
> > > > > > > > //Open database connection
> > > > > > > > dc.openConnection();
> > > > > > > > resultSet = dc.statement.executeQuery(SELECT CategoryImage
> FROM
> > > > > > > > itemcategory_table WHERE ItemType = 'Test');
> >
> > > > > > > >   while(resultSet.next()) {
> > > > > > > >String test = resultSet.getString(1);
> > > > > > > > }
> >
> > > > > > > 

Re: file upload from popup

2009-03-23 Thread John Ivens
What does the server side code look like?  I have implemented something like
this, and I would like to see how you did it..

On Sun, Mar 22, 2009 at 3:54 AM, Riyaz Mansoor wrote:

>
>
> I found my mistake. It a single character misspelled in the form panel
> action url !!!
>
> Regardless, it would help if the onSubmitComplete or elsewhere an
> exception is thrown.
>
>
> On Mar 22, 2:16 pm, Riyaz Mansoor  wrote:
> > I have added onSubmit and onSubmitComplete handlers and both fire
> > successfully. Have checked the url as well.
> >
> > But nothing is being submitted to the servlet. I checked this with a
> > log() statement in my servlet service method.
> >
> > what should i do?
> >
> > On Mar 22, 12:59 am, Riyaz Mansoor  wrote:
> >
> > > The form panel below is in a vertical panel which has submit link. The
> > > vertical panel is in a popup panel. Clicking submit has no effect!
> >
> > > The examples seem to show formpanel being added to rootpanel. can't
> > > use popup?
> >
> > > Grid grid = new Grid(3, 2);
> > > grid.setCellSpacing(8);
> > > grid.setWidget(0, 0, hiddenStmtId);
> > > grid.setWidget(0, 1, hiddenEntityId);
> > > grid.setText(1, 0, "Comment");
> > > grid.setText(2, 0, "Attachment");
> > > grid.setWidget(1, 1, txtComment);
> > > grid.setWidget(2, 1, fileUpload);
> >
> > > formPanel = new FormPanel();
> > > formPanel.setAction("/uploadservlet");
> > > formPanel.setMethod(FormPanel.METHOD_POST);
> > > formPanel.setEncoding(FormPanel.ENCODING_MULTIPART);
> > > formPanel.add(grid);
> >
>

--~--~-~--~~~---~--~~
You received 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: Validation Framework

2009-03-05 Thread John Ivens
WOW  This looks great!!!
How did I not know about this?

On Thu, Mar 5, 2009 at 8:39 AM, Davide Cerbo  wrote:

>
> Hi, try to see that:
> http://www.smartclient.com/smartgwt/showcase/#form_validation_type
>
>
> 2009/3/5 John Ivens :
> > I have tried this... it is definitely good but it needs to have many more
> > validations in it before it can solve all of your problems.  They are
> > definitely taking the right approach I think.
> >
> > On Thu, Mar 5, 2009 at 3:38 AM, Hasan Turksoy 
> wrote:
> >>
> >> i didn't try it but you can take a look at the gwt-validation project...
> >>
> >> Hasan...
> >> - Show quoted text -
> >>
> >>
> >> On Thu, Mar 5, 2009 at 7:37 AM, Pete  wrote:
> >>>
> >>> Has anyone found a simple and still supported validation framework for
> >>> gwt yet?
> >>>
> >>> Cheers
> >>>
> >>> Pete
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> > >
> >
>
>
>
> --
> Davide Cerbo
> ---
> http://www.pronetics.it
> http://www.sourcesense.com
> http://www.jesty.it
> http://jugsalerno.wordpress.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: Validation Framework

2009-03-05 Thread John Ivens
I have tried this... it is definitely good but it needs to have many more
validations in it before it can solve all of your problems.  They are
definitely taking the right approach I think.

On Thu, Mar 5, 2009 at 3:38 AM, Hasan Turksoy  wrote:

>
> i didn't try it but you can take a look at the 
> gwt-validationproject...
>
> Hasan...- Show quoted text -
>
>
>
> On Thu, Mar 5, 2009 at 7:37 AM, Pete  wrote:
>
>>
>> Has anyone found a simple and still supported validation framework for
>> gwt yet?
>>
>> Cheers
>>
>> Pete
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Deploying to a Shared TOMCAT

2009-03-03 Thread John Ivens
This is my web.xml file... this might help you out.   See if you can map
your call to like parameters in my call...


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">

ObservationService

 
edu.noao.tuc.odigui.server.ObservationServiceImpl


ObservationService

 /edu.noao.tuc.odigui.OdiGui/observation




On Mon, Mar 2, 2009 at 4:40 PM, Sean  wrote:

>
> I do have that code, I even added in the null check just to be doubley
> sure and still no go. It works in hosted mode, just with this web.xml
> (and I tried removing the com.ll.server from teh Servlet-class) and I
> get the same error message.
>
> From my gwt.xml :
>
>   class="com.ll.server.RPCTestImpl"/>
>
> That works fine, but:
>
> 
>
> http://java.sun.com/xml/ns/javaee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>
>  
>  
>   Foo
>RPCTestImpl
>  
>
>  
>  
>   Foo
>   /Foo
>  
>
> 
>
> doesn't. I've tried restarting my Tomcat to no avail. This is mind
> boggling!
>
> On Mar 2, 10:36 am, John Ivens  wrote:
> > I'll bet dollars to donuts that you are having the same problem that I
> had.
> > The sample code works in embedded tomcat but not in external tomcat.
> >
> > You need to add code something like this:
> >
> > if (observationSvc == null) {
> >
> > observationSvc = (ObservationServiceAsync) GWT.create(ObservationService.
> > class);
> >
> > }
> >
> > String observationServiceURL = GWT.getModuleBaseURL() + "/observation";
> >
> > ((ServiceDefTarget) observationSvc
> > ).setServiceEntryPoint(observationServiceURL);
> >
> > Where ObservationService is your service class.  ObservationServiceAsync
> is
> > your asynchronous call.
> >
> > /observation is probably /Foo in your case.
> >
> > This is in your GUI before you actually call the function you have
> defined
> > on the server side.  If you don't do this, the application WILL NOT FIND
> > YOUR URL.
> >
> > On Mon, Mar 2, 2009 at 5:26 AM, Sean  wrote:
> >
> > > I did restart Tomcat still no go.
> >
> > > #1
> > > The latest I tried putting all the google files and Web-INF directory
> > > in my base http directory. So I am just calling:
> > >http://www.celticlock.com/Foo.html
> >
> > > I'm on a shared Tomcat server and the documentation says I can only
> > > have one Web-INF directory there with one web.xml. So I'm trying to
> > > get everything on an even footing.
> >
> > > #2
> > > I added the com.ll.server to the servlet class after I saw it in an
> > > example. I've tried a dozen different configurations at this point.
> > > This is the state it's left in after I threw my hands up in the air
> > > and decided to see if hte groups can point me in the right direction.
> >
> > > I think I might possibly be confused by, the Url-pattern and what
> > > exactly is the url-pattern supposed to represent. This is where I
> > > dislike Google's example and naming everything Foo.
> >
> > > and I called my Mom and she said I am spelling Sean correctly! ;-P
> >
> > > On Mar 1, 7:13 pm, Shawn Brown  wrote:
> > > > Hi,
> >
> > > > It looks to me like you have 2 problems.
> >
> > > > #1
> >
> > > > > The requested URL /Foo was not found on this server
> >
> > > > Did you restart the tomcat or restart your app?
> >
> > > > What url are you using to access it.  What is your app called?
> >
> > > > Are you using something like serverurl/app_name/foo?
> >
> > > > > And this is the web.xml I am using:
> >
> > > > > 
> >
> > > > > http://java.sun.com/xml/ns/javaee";
> > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > > > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> > > > >http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
> >
> > > > >  
> > > > >  
> > > > >   Foo
> > > >

Re: Deploying to a Shared TOMCAT

2009-03-02 Thread John Ivens
I'll bet dollars to donuts that you are having the same problem that I had.
The sample code works in embedded tomcat but not in external tomcat.

You need to add code something like this:

if (observationSvc == null) {

observationSvc = (ObservationServiceAsync) GWT.create(ObservationService.
class);

}

String observationServiceURL = GWT.getModuleBaseURL() + "/observation";

((ServiceDefTarget) observationSvc
).setServiceEntryPoint(observationServiceURL);


Where ObservationService is your service class.  ObservationServiceAsync is
your asynchronous call.

/observation is probably /Foo in your case.


This is in your GUI before you actually call the function you have defined
on the server side.  If you don't do this, the application WILL NOT FIND
YOUR URL.

On Mon, Mar 2, 2009 at 5:26 AM, Sean  wrote:

>
> I did restart Tomcat still no go.
>
> #1
> The latest I tried putting all the google files and Web-INF directory
> in my base http directory. So I am just calling:
> http://www.celticlock.com/Foo.html
>
> I'm on a shared Tomcat server and the documentation says I can only
> have one Web-INF directory there with one web.xml. So I'm trying to
> get everything on an even footing.
>
> #2
> I added the com.ll.server to the servlet class after I saw it in an
> example. I've tried a dozen different configurations at this point.
> This is the state it's left in after I threw my hands up in the air
> and decided to see if hte groups can point me in the right direction.
>
> I think I might possibly be confused by, the Url-pattern and what
> exactly is the url-pattern supposed to represent. This is where I
> dislike Google's example and naming everything Foo.
>
> and I called my Mom and she said I am spelling Sean correctly! ;-P
>
>
>
>
>
> On Mar 1, 7:13 pm, Shawn Brown  wrote:
> > Hi,
> >
> > It looks to me like you have 2 problems.
> >
> > #1
> >
> > > The requested URL /Foo was not found on this server
> >
> > Did you restart the tomcat or restart your app?
> >
> > What url are you using to access it.  What is your app called?
> >
> > Are you using something like serverurl/app_name/foo?
> >
> >
> >
> >
> >
> > > And this is the web.xml I am using:
> >
> > > 
> >
> > > http://java.sun.com/xml/ns/javaee";
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> > >http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
> >
> > >  
> > >  
> > >   Foo
> > >   com.ll.server.fooImpl
> > >  
> >
> > >  
> > >  
> > >   Foo
> > >   /Foo
> > >  
> >
> > > 
> >
> > > It looks like it's trying to do the url-pattern (/Foo), but I'm not
> > > really sure what to put there. Right now, all the files created from
> > > GWT are at the same level as WEB-INF and in WEB-INF I have the Web.xml
> > > as well as the classes and lib. And under classes I have:
> > > WEB-INF\classes\com\ll\server\RPCTestImpl.class
> > > WEB-INF\classes\com\ll\server\RPCTestImpl.java
> >
> > #2
> > Um, don't you need to have com.ll.server.fooImpl in your
>  WEB-INF\classes?
> > If RPCTestImpl _is_ your foolImpl then say so
> >
> >   
> >Foo
> >   com.ll.server.RPCTestImpl
> >   
> >
> > Oh, and you are spelling your name wrong.
> >
> > Shawn
> >
>

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