Re: ANTLR GWT

2015-09-18 Thread Néstor Boscán
Hi Lukasz

I've never used ANTLR with GWT but I understand that the code that is
generated from a language is bound to a java library (antlr.jar). So you
won't be able to use it on the GWT side. Unless something has changed in
the last years with ANTLR.

With JavaCC you get code that is not dependant on any JAR and I think that
I've seen that JavaCC can generate javascript code.

Regards,

Néstor

On Fri, Sep 18, 2015 at 6:33 AM, Łukasz Bączek  wrote:

> Hello,
>
> Has anyone of you tried to use http://www.antlr.org/ side GWT?
>
> Regards
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Experience with GWT on Mobile

2015-08-11 Thread Néstor Boscán
Great info

Thanks

On Tue, Aug 11, 2015 at 4:49 AM, STB Land  wrote:

> I have been using GWT for many years to create hybrid applications,
> targeting iOS phones and Android phones and tablet, using third party
> frameworks like :
>
>- GWT-Phonegap  ( Cordova
> wrapper of Daniel KURKA )
>- mgwt (mobile UI of Daniel KURKA )
>- PWT  (Bootstrap 
> wrapper
>and much more of Putnami team)
>
> Best regards,
>
> Stéphane.
>
> Le jeudi 6 août 2015 15:34:08 UTC+2, nestorjb a écrit :
>>
>> Hi
>>
>> I wanted to know if anyone had experience running GWT on mobile devices.
>> How compatible is the javascript generated with the iOS and Android
>> browsers?
>>
>> Regards,
>>
>> Nestor
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Experience with GWT on Mobile

2015-08-06 Thread Néstor Boscán
Hi Vassillis

Thanks for all that great information. I use UIBinder and design all the
HTML instead of using widgets.

Regards,

Néstor

On Thu, Aug 6, 2015 at 3:16 PM, Vassilis Virvilis  wrote:

> Hi,
>
> In one project of mine we are continuously testing against mobile tablets
> and phones. We lack the resources for a proper mobile port so we are trying
> to be decent enough.
>
> In my experience the problem is not the GWT generated code. The compiler
> brings sanity to any medium project by simply allowing refactoring due to
> java tooling and static typing. This is very nice and not a source of
> problems.
>
> The problems lies to the widget set. It is old and was designed in the
> desktop era and it shows in the mobile. It works but it feels clunky...
> and that makes the experience non optimal.
>
> Some walls I hit my head against in no specific order.
>
> 1) Touch interface works through mouse emulation. This should be enough
> for the most common cases. My application didn't fit that bill and I had to
> hunt down the order of various events in various browsers and emulators to
> get it right.
>
> 2) Popups are implying body as parent. This doesn't fly with fullscreen
> divs and a gwt application as a widget in general.
>
>- https://code.google.com/p/google-web-toolkit/issues/detail?id=3855
>- https://code.google.com/p/google-web-toolkit/issues/detail?id=8538
>
> 3) MenuItems are based on popups - No menus in div fullscreen mode
>
> 4) MenuItems and most other widgets (DisclosurePanel, TablLayoutPanel) are
> not "nice" from an aesthetic point of view. You can customize it a lot
> through css but I believe a new responsive widget set is required to
> modernize them
>
> 5) Popups and DialogBoxes are based on tables and they taking their size
> inside-out which is what you want half the times. Furthermore tables are
> completely non-responsive and obsolete design that css cannot change its
> basic layout characteristics.
>
> In my experience every GWT widget I have used led to a huge backlash that
> forced me change it so in the end I try to not depend on GWT widgets. As
> you may understand I am still depending in MenuItems and Popups :-) and
> LayoutPanels
>
> I don't want to be overly negative. The GWT widget systems had its
> moments. The LayoutPanels and the ProvidesResize/RequiresResize chain was a
> moment of genius. Sometimes it is hard as hell to find where the chain is
> breaking (especially if you are inexperienced in GWT) but the idea is
> solid. With some machinery it maybe possible to provide some hints...
>
> UIBinder is another of these cool ideas that makes GWT a success in my
> eyes.
>
> All in all I think the GWT team is doing the right thing that deprecating
> the widget set for GWT 3. Maybe with @jsinterop it would be easier to
> employ modern javascript eye candy libraries for UI.
>
> And yes it may be the right thing but it will be pretty painful for me
> although my exposure to GWT widgets has been kept minimal.
>
> Just my 2cents.
>
> Vassilis
>
> On Thu, Aug 6, 2015 at 8:18 PM, Ed  wrote:
>
>> Hi Nestor;
>>
>> We have been using GWT for about 3 years now.  Without integrating third
>> party libs, we have not encountered any issues.
>>
>> Ed
>>
>> On Thu, Aug 6, 2015 at 9:32 AM, Néstor Boscán  wrote:
>>
>>> Hi
>>>
>>> I wanted to know if anyone had experience running GWT on mobile devices.
>>> How compatible is the javascript generated with the iOS and Android
>>> browsers?
>>>
>>> Regards,
>>>
>>> Nestor
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Web Toolkit" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to google-web-toolkit+unsubscr...@googlegroups.com.
>>> To post to this group, send email to google-web-toolkit@googlegroups.com
>>> .
>>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-web-toolkit+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/

Experience with GWT on Mobile

2015-08-06 Thread Néstor Boscán
Hi

I wanted to know if anyone had experience running GWT on mobile devices.
How compatible is the javascript generated with the iOS and Android
browsers?

Regards,

Nestor

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Main Advantages of using GWT against other technology like [jsp,spring,javascript...]

2014-09-09 Thread Néstor Boscán
For me the advantages are:

1.- If your application needs to feel like a desktop application this
framework is as close as it gets.
2.- Because almost everything runs on the browser side you use less server
processing and you can scale to more users. You can even create apps that
download on the first access and then work without accessing the server.
3.- Because almost everything runs on the browser you need less server-side
session information vs a framework like jsf. This means less complication
when replicating sessions in a cluster.
4.- No javascript programming which is hard to test, and check that it
works on multiple browsers.

Disadvantages

1.- The widgets in GWT are not pretty or offer lots of functionalities like
data tables, context menus, etc. For that you need something like Smart GWT.
2.- Because it behaves like a desktop app, when you test, you have to test
from the first page which leads to long testing cycles.
3.- Speaking of testing, you can't use tools like JMeter to test the app
because it doesn't behave like a web app. You need to use it's own testing
classes. Haven't use selenium.
4.- If you need your app to work like a web app it will not feel like a web
app.

Personally I would use GWT in all my projects. I've seen it scale very well
in production enviroments.

Regards,

Nestor

On Tuesday, September 9, 2014, Vasu  wrote:
> I have created details list advantages that one can get using GWT have
look at it http://www.pandurangpatil.com/2012/09/benefits-of-using-gwt.html
>
> On Monday, 8 September 2014 13:49:13 UTC+5:30, Ronan Quillevere wrote:
>>
>> My opinion
>> -> No javascript developer
>> -> Statically typed
>> -> Use JavaScript
>> -> Multi-browser / mobile support
>> -> Open source / free
>> More details here :
http://ronanquillevere.github.io/2014/02/08/why-choosing-gwt.html
>>
>> On Saturday, September 6, 2014 4:53:24 AM UTC+2, abdullah wrote:
>>>
>>> Hi,
>>>  I am newbie to GWT and started developing my application using GWT.I
would like to know what is the main advantages for going to GWT since we
have lot of technology like JSP,Struts,..Can anyone give me suggestion on
this?
>
> --
> You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Is there native support for Reverse AJAX in GWT?

2014-07-18 Thread Néstor Boscán
Hi

Is there native support for Reverse AJAX in GWT? Or do I have to find a
library like gwt-comet?

Regards,

Néstor

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is there a way to share the service layer between GWT and Android

2013-07-31 Thread Néstor Boscán
All the examples I've read say:

"This is experimental, unsupported code"



On Wed, Jul 31, 2013 at 4:19 AM, Thomas Broyer  wrote:
>
> On Wednesday, July 31, 2013 2:38:34 AM UTC+2, nestorjb wrote:
>>
>> Hi
>>
>> Is there a way to create the service layer so I can share it with an
>> GWT and Android Application?
>
>
> Use RequestFactory? GWT.create() in GWT, RequestFactorySource on Android.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Is there a way to share the service layer between GWT and Android

2013-07-30 Thread Néstor Boscán
Hi

Is there a way to create the service layer so I can share it with an
GWT and Android Application?

Regatds,

Néstor

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Fwd: Adding DOM script throws JavaScriptException in IE

2013-04-12 Thread Néstor Boscán
Hi

I'm using GWT and adding some dynamic javascript using the following code:

script = DOM.createElement("script");
script.setId("validation");
builder.append("function validate(validationId) {\n");
...
builder.append("}\n");
DOM.setElementAttribute(script, "type", "text/javascript");
DOM.setInnerText(script, builder.toString());
DOM.appendChild(RootPanel.getBodyElement(), script);

In firefox works OK but in IE it throws JavaScript: Unknown Error.

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




Very Big JS

2012-09-18 Thread Néstor Boscán
Hi

I have a big application that is generating a 3 MB JS. Is there a way to
divide this JS in multiple modules so they can be loaded if needed?

Regards,

Néstor Boscán

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



Re: GWT and Hibernate

2011-12-16 Thread Néstor Boscán
I have not checked Gilead. I'm checking it.

On Fri, Dec 16, 2011 at 1:19 PM, Alfredo Quiroga-Villamil
 wrote:
> Nestor is right on!
>
> I have heavily used Gilead
> (http://noon.gilead.free.fr/gilead/index.php?page=gwt) which solves exactly
> this:
>
> "The problem with Hibernate and
> any framework that serializes POJOs (GWT, WebServices, JSON, etc) is
> that Hibernate does not return POJOs, but Proxies of your POJOs. So
> basically the solution to this problem is to clean your objects
> returned by Hibernate to convert them to POJOs"
>
> In fact, I prefer using gilead any day over RF. This probably sounds
> controversial I know and I is not intended to spark further comparison
> between the two approaches. Using gilead I have POJO's under /shared that
> are really entities and this is all handled transparently by gilead.
>
> Regards,
>
> Alfredo
>
> 2011/12/16 Néstor Boscán 
>>
>> Hi Alex
>>
>> I have donde this with many projects. The problem with Hibernate and
>> any framework that serializes POJOs (GWT, WebServices, JSON, etc) is
>> that Hibernate does not return POJOs, but Proxies of your POJOs. So
>> basically the solution to this problem is to clean your objects
>> returned by Hibernate to convert them to POJOs. I've seen examples
>> from Google that they just basically write code to create the POJO's
>> again and set the attributes but we prefer to use a Cleaner class that
>> automatically does this job.
>>
>> The other problem is that you have to be careful when you save because
>> you are passing to hibernate an object that is not a proxy. This
>> causes problems when you're saving an object with collections. The
>> objects in the new collection will be inserted but the old objects
>> will not be deleted from the database. So one workaround is to load
>> the object from the database and set the attributes, clean the
>> collections (this will erase the objects from the database), and add
>> the new objects.
>>
>> import java.beans.PropertyDescriptor;
>>
>> import java.io.InputStream;
>>
>> import java.util.ArrayList;
>> import java.util.Date;
>> import java.util.HashMap;
>> import java.util.HashSet;
>> import java.util.Map;
>> import java.util.Set;
>> import java.util.List;
>>
>> import org.apache.commons.beanutils.PropertyUtils;
>>
>> import org.hibernate.EntityMode;
>> import org.hibernate.Hibernate;
>> import org.hibernate.Session;
>> import org.hibernate.metadata.ClassMetadata;
>> import org.hibernate.proxy.HibernateProxyHelper;
>>
>> import java.io.Serializable;
>>
>> import java.sql.Blob;
>>
>> import java.util.*;
>>
>> import org.apache.log4j.Logger;
>>
>> import org.hibernate.proxy.HibernateProxy;
>>
>> public class HibernateCleaner {
>>    private static final Logger logger =
>> Logger.getLogger(HibernateCleaner.class);
>>
>>    public static Object clean(Session session, Object obj) throws
>> Exception {
>>        return (clean(session, obj, new HashMap> Object>>()));
>>    }
>>
>>    private static Object clean(Session session,
>>                                Object obj,
>>                                Map>
>> visitedObjects) throws Exception {
>>        Object newObj, value = null, cleanValue = null;
>>        Map.Entry m;
>>        Class clazz;
>>        Object[] array;
>>        Collection collection;
>>        Map map;
>>        PropertyDescriptor[] descriptors;
>>        String property;
>>        ClassMetadata clazzMetaData;
>>        Map visitedObjectsInClass;
>>        int index, length, hashCode;
>>
>>        if (obj == null)
>>            return (null);
>>
>>        if ((obj instanceof Boolean) || (obj instanceof Number) ||
>>            (obj instanceof Character) || (obj instanceof String) ||
>>            (obj instanceof Blob) || (obj instanceof InputStream))
>>            return (obj);
>>
>>        if (obj instanceof Date)
>>            return (new Date (((Date) obj).getTime()));
>>
>>        if (obj instanceof Calendar)
>>            return (((Calendar) obj).clone());
>>
>>        if (obj instanceof Object[]) {
>>            array = (Object[]) ((Object[]) obj).clone();
>>            length = array.length;
>>            for (index = 0; index < length; index++)
>>                array[index] = clean(session, array[index],
>> visitedObjects);
>>
>>         

GWT and Hibernate

2011-12-16 Thread Néstor Boscán
assMetadata(newObj.getClass());
               Serializable id = clazzMetaData.getIdentifier(obj,
EntityMode.POJO);
               clazzMetaData.setIdentifier(newObj, id, EntityMode.POJO);
           }
       } else {
           descriptors = PropertyUtils.getPropertyDescriptors(newObj);
           length = descriptors.length;
           for (index = 0; index < length; index++) {
               property = descriptors[index].getName();
               if (!property.equals("class")) {
                   try {
                       value = PropertyUtils.getProperty(obj, property);
                       cleanValue = clean(session, value, visitedObjects);
                       PropertyUtils.setProperty(newObj, property, cleanValue);
                   } catch (NoSuchMethodException e) {
                   } catch (Exception e) {
                       if (logger.isInfoEnabled()) logger.info("Error
Clean: " + obj.getClass() + " - " + property + " - " +
value.getClass() + " - " + cleanValue.getClass());
                       throw(e);
                   }
               }
           }
       }

       return (newObj);
   }

   private static Collection createCollection(Collection obj) throws
Exception {
       Collection newObj = null;

       if (obj instanceof SortedSet)
           newObj = new TreeSet ();
       else if (obj instanceof Set)
           newObj = new HashSet ();
       else
           newObj = new ArrayList ();

       return (newObj);
   }

   private static Map createMap(Map obj) throws Exception {
       Map newObj = null;

       if (obj instanceof SortedMap)
           newObj = new TreeMap ();
       else
           newObj = new HashMap ();

       return (newObj);
   }
}

Hope this helps.

Regards,

Néstor Boscán

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



How to deploy using modules

2011-10-14 Thread Néstor Boscán
Hi

I have a client that wishes to create a big GWT project that is modularized
where in one page you can see the panels of different modules. They want to
deploy by module not deploying the entire war everytime there is a change.
In GWT I could create 1 jar per module and create a war that integrates
everything and deploy it the first time. If I change something in one module
I would have to replace the jar, the entire .js and restart the server. Any
ideas on this?

Regards,

Néstor Boscán

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



Calling GWT RPC Services in another server

2011-09-16 Thread Néstor Boscán
Hi to all the group

Is there a way to call GWT RPC Services in another server by passing the
same-server AJAX policy?

Regards,

Néstor Boscán

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



Strange Request: How do I open a new browser window, run part of the GWT application there, and communicate with it

2011-09-14 Thread Néstor Boscán
Hi

I have a strange request. I have an application that needs to run on an
iframe as part of another application. This application needs to open  popup
browser windows to show additional information, for example a celltable with
a list. How do I use GWT to run on the new popup browser window and send it
data?

Regards,

Néstor Boscán

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



Is there something like a Windows Panel?

2011-09-11 Thread Néstor Boscán
Hi

I need a Panel that I can move around the web browser. Is there something
like that in GWT?

Regards,

Néstor Boscán

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



Is there a way to reuse GWT generated JS in another Application using the same RPC Services?

2011-09-11 Thread Néstor Boscán
Hi

I have a GWT Application and I want to access the same functionality from an
existing JSP page with minimum effort. I wish to load the GWT JavaScript and
make the RPC to the original GWT Application. Is this possible considering
the same-server policy limitation on AJAX calls?

Regards,

Néstor Boscán

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



Re: gwt hibernate

2011-07-20 Thread Néstor Boscán
  descriptors = PropertyUtils.getPropertyDescriptors(newObj);
length = descriptors.length;
for (index = 0; index < length; index++) {
property = descriptors[index].getName();
if (!property.equals("class")) {
try {
value = PropertyUtils.getProperty(obj, property);
cleanValue = clean(session, value, visitedObjects);
PropertyUtils.setProperty(newObj, property,
cleanValue);
} catch (NoSuchMethodException e) {
} catch (Exception e) {
if (logger.isInfoEnabled()) logger.info("Error
Clean: " + obj.getClass() + " - " + property + " - " + value.getClass() + "
- " + cleanValue.getClass());
throw(e);
}
}
}
}

return (newObj);
}

private static Collection createCollection(Collection obj) throws
Exception {
Collection newObj = null;

if (obj instanceof SortedSet)
newObj = new TreeSet ();
else if (obj instanceof Set)
newObj = new HashSet ();
else
newObj = new ArrayList ();

return (newObj);
}

private static Map createMap(Map obj) throws Exception {
Map newObj = null;

if (obj instanceof SortedMap)
newObj = new TreeMap ();
else
newObj = new HashMap ();

return (newObj);
}
}

I've used this class in many production applications and it works.

Regards,

Néstor Boscán

On Wed, Jul 20, 2011 at 6:19 AM, asi  wrote:

> hi everyone ,i need help ton figure out how to use hibernate and gwt
> or gxt together
> nothing that i found seemed to work
> thx
>
> --
> You received 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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt hibernate

2011-07-20 Thread Néstor Boscán
itedObjectsInClass = new HashMap();
> visitedObjects.put(clazz, visitedObjectsInClass);
> } else if (visitedObjectsInClass.containsKey(obj)) {
> return visitedObjectsInClass.get(obj);
> }
>
> newObj = clazz.newInstance();
> visitedObjectsInClass.put(obj, newObj);
>
> if (!Hibernate.isInitialized(obj)) {
> if (session != null) {
> clazzMetaData =
> session.getSessionFactory().getClassMetadata(newObj.getClass());
> Serializable id = clazzMetaData.getIdentifier(obj,
> EntityMode.POJO);
> clazzMetaData.setIdentifier(newObj, id, EntityMode.POJO);
> }
> } else {
> descriptors = PropertyUtils.getPropertyDescriptors(newObj);
> length = descriptors.length;
> for (index = 0; index < length; index++) {
> property = descriptors[index].getName();
> if (!property.equals("class")) {
> try {
> value = PropertyUtils.getProperty(obj, property);
> cleanValue = clean(session, value, visitedObjects);
> PropertyUtils.setProperty(newObj, property,
> cleanValue);
> } catch (NoSuchMethodException e) {
> } catch (Exception e) {
> if (logger.isInfoEnabled()) logger.info("Error
> Clean: " + obj.getClass() + " - " + property + " - " + value.getClass() + "
> - " + cleanValue.getClass());
> throw(e);
> }
> }
> }
> }
>
> return (newObj);
> }
>
> private static Collection createCollection(Collection obj) throws
> Exception {
> Collection newObj = null;
>
> if (obj instanceof SortedSet)
> newObj = new TreeSet ();
> else if (obj instanceof Set)
> newObj = new HashSet ();
> else
> newObj = new ArrayList ();
>
> return (newObj);
> }
>
> private static Map createMap(Map obj) throws Exception {
> Map newObj = null;
>
> if (obj instanceof SortedMap)
> newObj = new TreeMap ();
> else
> newObj = new HashMap ();
>
> return (newObj);
> }
> }
>
> I've used this class in many production applications and it works.
>
> Regards,
>
> Néstor Boscán
>

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



Duplicate GWT-RPC requests?

2011-07-15 Thread Néstor Boscán
Hi

I have an application that looks like is duplicating the GWT-RPC request
code. Of course it could be a number of other reasons but I wanted to ask if
anyone has seen a case where duplicate GWT-RPC requests occurs?.

Regards,

Néstor Boscán

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



AsyncCallback timeout

2011-06-23 Thread Néstor Boscán
Hi

Is there a way to set the Async Callback timeout. When there is no internet
connection on the client side the application is left waiting for a long
time.

Regards,

Néstor Boscán

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



How can I run a GWT application in full screen mode

2011-06-17 Thread Néstor Boscán
How can I run a GWT application in full screen mode so the user doesn't have
control to minimize or change to another application.

Regards,

Néstor Boscán

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



Re: Can't refresh CellTable

2011-04-06 Thread Néstor Boscán
My bad. I was calling setRowData(0, list) instead of setRowData(list). I
changed it and it worked.

Regards,

Néstor Boscán

2011/4/5 Néstor Boscán 

> Interesting behaviour. Now I can add rows, remove rows, but when I try to
> add rows again the table won't refresh.
>
> Regards,
>
> Néstor Boscán
>
>
> 2011/4/5 Néstor Boscán 
>
>> Thanks a lot for that answer, and yes it does look ugly!!! But it will
>> have to do.
>>
>> Regards,
>>
>> Néstor Boscán
>>
>>
>> On Tue, Apr 5, 2011 at 4:31 PM, mike b  wrote:
>>
>>> We're having the same problem getting a CheckBoxCell to go from
>>> un-checked to checked to un-checked...
>>>
>>> I can see in Firebug where the HTML input does NOT have "checked" in it,
>>> but it still shows a checked box.
>>>
>>> This is what we had to do...  Its ugly but it works consistently.
>>>
>>> actualList.remove(5);
>>> Scheduler.get().scheduleDeferred(new ScheduledCommand() {
>>>
>>> @Override
>>> public void execute() {
>>> cellTable.setRowData(new ArrayList());//set a
>>> blank list here
>>> }
>>> });
>>>
>>> // let the browser catch up
>>> Scheduler.get().scheduleDeferred(new ScheduledCommand() {
>>>
>>> @Override
>>> public void execute() {
>>> cellTable.setRowData(actualList);  // not put the actual
>>> list back into it
>>> }
>>> });
>>>
>>>
>>> Good luck!
>>>
>>>
>>>  --
>>> You received 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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Can't refresh CellTable

2011-04-05 Thread Néstor Boscán
Interesting behaviour. Now I can add rows, remove rows, but when I try to
add rows again the table won't refresh.

Regards,

Néstor Boscán

2011/4/5 Néstor Boscán 

> Thanks a lot for that answer, and yes it does look ugly!!! But it will have
> to do.
>
> Regards,
>
> Néstor Boscán
>
>
> On Tue, Apr 5, 2011 at 4:31 PM, mike b  wrote:
>
>> We're having the same problem getting a CheckBoxCell to go from un-checked
>> to checked to un-checked...
>>
>> I can see in Firebug where the HTML input does NOT have "checked" in it,
>> but it still shows a checked box.
>>
>> This is what we had to do...  Its ugly but it works consistently.
>>
>> actualList.remove(5);
>> Scheduler.get().scheduleDeferred(new ScheduledCommand() {
>>
>> @Override
>> public void execute() {
>> cellTable.setRowData(new ArrayList());//set a
>> blank list here
>> }
>> });
>>
>> // let the browser catch up
>> Scheduler.get().scheduleDeferred(new ScheduledCommand() {
>>
>> @Override
>> public void execute() {
>> cellTable.setRowData(actualList);  // not put the actual
>> list back into it
>> }
>> });
>>
>>
>> Good luck!
>>
>>
>>  --
>> You received 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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Can't refresh CellTable

2011-04-05 Thread Néstor Boscán
Thanks a lot for that answer, and yes it does look ugly!!! But it will have
to do.

Regards,

Néstor Boscán

On Tue, Apr 5, 2011 at 4:31 PM, mike b  wrote:

> We're having the same problem getting a CheckBoxCell to go from un-checked
> to checked to un-checked...
>
> I can see in Firebug where the HTML input does NOT have "checked" in it,
> but it still shows a checked box.
>
> This is what we had to do...  Its ugly but it works consistently.
>
> actualList.remove(5);
> Scheduler.get().scheduleDeferred(new ScheduledCommand() {
>
> @Override
> public void execute() {
> cellTable.setRowData(new ArrayList());//set a
> blank list here
> }
> });
>
> // let the browser catch up
> Scheduler.get().scheduleDeferred(new ScheduledCommand() {
>
> @Override
> public void execute() {
> cellTable.setRowData(actualList);  // not put the actual
> list back into it
> }
> });
>
>
> Good luck!
>
>
>  --
> You received 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-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.



Can't refresh CellTable

2011-04-01 Thread Néstor Boscán
Hi

I have a CellTable that has a cell that when I click on it I need to remove
the current row. I've tried deleting the object from the ArrayList and
redrawing the CellTable but it doesn't work. Also I've tried to call
setRowData again and redraw the CellTable and the table doesn't redraw. If I
use an external button to add a new object to the array and call setRowData
it does work. I don't know if it has to do that I'm deleting the row from
withing an event of the CellTable.

Regards,

Néstor Boscán

-- 
You received 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 change style of a button inside a ButtonCell

2011-04-01 Thread Néstor Boscán
I created this class and it worked:

package ve.com.rapipago.pagueaqui.vista.client.componente;

import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.cell.client.ValueUpdater;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.user.client.ui.AbstractImagePrototype;

public class ClickableImageResourceCell extends AbstractCell
{
public ClickableImageResourceCell() {
super("click");
}

@Override
public void render(Context context, ImageResource value,
   SafeHtmlBuilder sb) {
if (value != null) {
SafeHtml html =

 
SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(value).getHTML());
sb.append(html);
}
}

@Override
public void onBrowserEvent(Context context, Element parent,
ImageResource resource,
   NativeEvent event,
   ValueUpdater valueUpdater) {
super.onBrowserEvent(context, parent, resource, event,
valueUpdater);
if ("click".equals(event.getType())) {
onClick(resource, event);
}
}

public void onClick(ImageResource resource,
NativeEvent event) {
}
}

Hope its useful.

Regards,

Néstor Boscán

2011/4/1 Néstor Boscán 

> Hi
>
> I'm trying to change the CSS style of a button inside a ButtonCell so I can
> set an image but the getStyleName method on ButtonCell won't do anything in
> the HTML. Also the styleName that you set on the column is not applied to
> the TD cell but the column in the column group. So I haven't found a way to
> set a CSS style for the button.
>
> Regards,
>
> Néstor Boscán
>

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



Handling click on a CellTable Row

2011-04-01 Thread Néstor Boscán
Hi

Is there a way to handle a click on a CellTable Row?

Regards,

Néstor Boscán

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



How to change style of a button inside a ButtonCell

2011-04-01 Thread Néstor Boscán
Hi

I'm trying to change the CSS style of a button inside a ButtonCell so I can
set an image but the getStyleName method on ButtonCell won't do anything in
the HTML. Also the styleName that you set on the column is not applied to
the TD cell but the column in the column group. So I haven't found a way to
set a CSS style for the button.

Regards,

Néstor Boscán

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



How to implement Enter Key Submit Form in GWT

2011-02-24 Thread Néstor Boscán
Hi

I need to simulate the "Enter Key" submit form in GWT where hay hit the
enter key and the form is submitted. Any ideas on how to acomplish this?

Regards,

Néstor Boscán

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



Re: GWT with Hibernate and Oracle

2011-02-08 Thread Néstor Boscán
Oh Sorry Debashish

I see that you're working with Google App Engine. I've worked with Google
Web Toolkit and Hibernate for standalone applications, not applications that
are deployed on Google App Engine. The link that you sent me is for Google
Web Toolkit + Hibernate. I imagine that Google App Engine has restrictions
on the classes that you can use, in this case java.net.Socket. I think, and
again I'm no expert on GAE, that you can't use any database you want, you
have to use the database that the GAE documentation describes. If it's
something like BigTable, I don't know if you can use Hibernate on top of
that. I think that I read an article on using Java Persistant Architecture,
which is an abstraction of what Hibernate does, with GAE.

Regards,

Néstor Boscán

On Tue, Feb 8, 2011 at 9:31 AM, Debashish  wrote:

> Hi Néstor,
>
> I have followed all the steps which required a Hibernate application
> to work.
> And this sample hibernate module is working fine without GWT as UI.
>
> However while connecting to any Database we need to put Driver class
> in the classpath and
> hibernate also requires the Classes12.jar or ojdbc14.jar at it's
> classpath.
> This is required so that it can understand the driver property placed
> in hibernate.cfg.xml file
>  name="connection.driver_class">oracle.jdbc.driver.OracleDriver property>
>
> And probaly this class is not allowed in Google APP and I am getting
> an error as
> ---
> Caused by: java.lang.NoClassDefFoundError: java.net.Socket is a
> restricted class. Please see the Google  App Engine
> developer's guide for more details.
> ---
>
> *** This is the local database in my case and I am absolutely getting
> no way to resolve it.
>
> Please sugggest me if any other approach / websites to follow for
> this.
>
> Thanks
> Debashish
>
> On Feb 6, 1:55 am, Néstor Boscán  wrote:
> > Hi
> >
> > I checked the link that you sent and this is will work of course but you
> > will have to create a lot of DTO objects for your application and map the
> > POJO objects from Hibernate to the DTO which will require a lot of
> coding.
> > The example should work, your DTOs should be serialized, Now what I don't
> > understand is that if you're using Hibernate why use JDBC directly?. You
> can
> > get a Connection to your database from the Session object or create an a
> > SQLQuery. From what I'm reading it looks like you're using
> java.net.Socket
> > on the GWT Client side and this is not a valid class.
> >
> > Regards,
> >
> > Néstor Boscán
> >
> >
> >
> > On Sat, Feb 5, 2011 at 2:52 PM, Debashish 
> wrote:
> > > Hi Néstor,
> >
> > > Thank you for the response regarding the Hibernate with GWT.
> >
> > > However I have followed the similar approach given in the below link
> >
> > >
> http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
> > > which suggets to use DTO approach to map the hibernate domain object
> > > to DTO
> > > and passed to the data to GWT layer.
> >
> > > I have a query on the Local Database connectivity from GWT. Is it
> > > possible to make a
> > > JDBC call(using Oracle Thin Driver). I have tried a normal jdbc
> > > connection from GWT
> > > using classes12.jar file in classpath and using
> > > Class.forName("Oracle.jdbc.driver.OracleDriver").
> > > I have deployed on Google Apps server.
> >
> > > I am getting the below error message while while running the
> > > application.
> >
> > >
> ---­---
> > > java.net.Socket is a restricted class. Please see the Google  App
> > > Engine developer's guide for more details.
> > > [ERROR] javax.servlet.ServletContext log: Exception while dispatching
> > > incoming RPC call
> > > com.google.gwt.user.server.rpc.UnexpectedException: Service method
> > > 'public abstract java.lang.Long
> >
> > >
> com.google.musicstore.client.MusicStoreService.saveAccount(com.google.music­­
> > > store.client.dto.AccountDTO)'
> > > threw an unexpected exception: java.lang.ExceptionInInitializerError
> > >at
> > > com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
> > > 378)
> >
> > >
> ---­--
> >
> > > 

Re: GWT with Hibernate and Oracle

2011-02-05 Thread Néstor Boscán
Hi

I checked the link that you sent and this is will work of course but you
will have to create a lot of DTO objects for your application and map the
POJO objects from Hibernate to the DTO which will require a lot of coding.
The example should work, your DTOs should be serialized, Now what I don't
understand is that if you're using Hibernate why use JDBC directly?. You can
get a Connection to your database from the Session object or create an a
SQLQuery. From what I'm reading it looks like you're using java.net.Socket
on the GWT Client side and this is not a valid class.

Regards,

Néstor Boscán

On Sat, Feb 5, 2011 at 2:52 PM, Debashish  wrote:

> Hi Néstor,
>
> Thank you for the response regarding the Hibernate with GWT.
>
> However I have followed the similar approach given in the below link
>
> http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
> which suggets to use DTO approach to map the hibernate domain object
> to DTO
> and passed to the data to GWT layer.
>
> I have a query on the Local Database connectivity from GWT. Is it
> possible to make a
> JDBC call(using Oracle Thin Driver). I have tried a normal jdbc
> connection from GWT
> using classes12.jar file in classpath and using
> Class.forName("Oracle.jdbc.driver.OracleDriver").
> I have deployed on Google Apps server.
>
> I am getting the below error message while while running the
> application.
>
> --
> java.net.Socket is a restricted class. Please see the Google  App
> Engine developer's guide for more details.
> [ERROR] javax.servlet.ServletContext log: Exception while dispatching
> incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method
> 'public abstract java.lang.Long
>
> com.google.musicstore.client.MusicStoreService.saveAccount(com.google.music­
> store.client.dto.AccountDTO)'
> threw an unexpected exception: java.lang.ExceptionInInitializerError
>at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
> 378)
>
> -
>
> Could you please suggest me of any good links or site which provides
> an approach to develope GWT aplications
> using local database.
>
> Thanks
> Dev
>
>
>
>
>
> On Jan 26, 5:20 pm, Néstor Boscán  wrote:
> > This is very tipical in Hibernate applications that have to serialize
> > objects through the network be it GWT, Web Services, JSON, etc. Hibernate
> > will leave his own POJO in your objects for lazy initialization purposes.
> > When GWT or a Web Service tries to serialize the objects and opens the
> > hibernate POJO it will throw LazyInitializationException because the
> > connection is already closed. What I've done in my applications is to
> clean
> > the POJO of any Hibernate references. This is done with a Hibernate
> Cleaner
> > class. On the web there are a couple of examples of this.
> >
> > Regards,
> >
> > Néstor Boscán
> >
> >
> >
> > On Tue, Jan 25, 2011 at 2:33 PM, Debashish 
> wrote:
> > > Hi
> >
> > > I am trying for a sample using GWT and database layer as Hibernate
> > > with Oracle on Google Aps server.
> >
> > > I have done a sample for Hibernate with JSP as presentation layer,
> > > which is working fine.
> > > But the same approach is not working with GWT.
> >
> > > Here is a verygood link on this topic
> >
> > >
> http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
> > > and my approach is almost similar.
> >
> > > I have followed the below approach,
> > > The RemoteServiceServlet makes a call to Hibernate layer and tries the
> > > initializes the SessionFactory as below,
> > >  sessionFactory = new
> > > Configuration().configure().buildSessionFactory();
> >
> > > I have added the jars necessary for the Hibernate layer (and
> > > classes12.jar for oracle driver).
> >
> > > However while running , it is giving me an error as below,
> >
> > >
> ---­-
> > > Initial SessionFactory creation failed.java.lang.NoClassDefFoundError:
> > > java.net.Socket is a restricted class. Please see the Google  App
> > &g

Re: GWT with Hibernate and Oracle

2011-01-27 Thread Néstor Boscán
I found this one on the web:

http://maherkilani.blogspot.com/2008/12/hibernate-proxy-cleaner.html

Regards,

Néstor Boscán

On Thu, Jan 27, 2011 at 2:15 AM, Nagin Kothari wrote:

>
> Hi,
> Can you point to some link that provide sample code or utility to clean the
> Hibernate POJO (Hibernate Cleaner class) as you have mentioned in this mail.
> It would greately help me too.
>
> Thanks in advance,
>
> Nagin
> 2011/1/26 Néstor Boscán 
>
>> This is very tipical in Hibernate applications that have to serialize
>> objects through the network be it GWT, Web Services, JSON, etc. Hibernate
>> will leave his own POJO in your objects for lazy initialization purposes.
>> When GWT or a Web Service tries to serialize the objects and opens the
>> hibernate POJO it will throw LazyInitializationException because the
>> connection is already closed. What I've done in my applications is to clean
>> the POJO of any Hibernate references. This is done with a Hibernate Cleaner
>> class. On the web there are a couple of examples of this.
>>
>> Regards,
>>
>> Néstor Boscán
>>
>> On Tue, Jan 25, 2011 at 2:33 PM, Debashish wrote:
>>
>>> Hi
>>>
>>> I am trying for a sample using GWT and database layer as Hibernate
>>> with Oracle on Google Aps server.
>>>
>>> I have done a sample for Hibernate with JSP as presentation layer,
>>> which is working fine.
>>> But the same approach is not working with GWT.
>>>
>>> Here is a verygood link on this topic
>>>
>>> http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
>>> and my approach is almost similar.
>>>
>>> I have followed the below approach,
>>> The RemoteServiceServlet makes a call to Hibernate layer and tries the
>>> initializes the SessionFactory as below,
>>>  sessionFactory = new
>>> Configuration().configure().buildSessionFactory();
>>>
>>> I have added the jars necessary for the Hibernate layer (and
>>> classes12.jar for oracle driver).
>>>
>>> However while running , it is giving me an error as below,
>>>
>>> 
>>> Initial SessionFactory creation failed.java.lang.NoClassDefFoundError:
>>> java.net.Socket is a restricted class. Please see the Google  App
>>> Engine developer's guide for more details.
>>> [ERROR] javax.servlet.ServletContext log: Exception while dispatching
>>> incoming RPC call
>>> com.google.gwt.user.server.rpc.UnexpectedException: Service method
>>> 'public abstract java.lang.Long
>>>
>>> com.google.musicstore.client.MusicStoreService.saveAccount(com.google.musicstore.client.dto.AccountDTO)'
>>> threw an unexpected exception: java.lang.ExceptionInInitializerError
>>>at
>>> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
>>> 378)
>>>
>>> 
>>> I have one through some of the threads which suggested me to download
>>> the google apps jar files and try it. I have downladed it. but there
>>> is no proper direction on how to make use of which jar file.
>>>
>>> Have anybody tried the same. Please let me know if anything I am doing
>>> wrong.
>>> *** Note that I am using Oracle 9.2 as local database.
>>>
>>> Thanks
>>> Dev
>>>
>>> --
>>> You received 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-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-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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT with Hibernate and Oracle

2011-01-27 Thread Néstor Boscán
HashSet ();
else
newObj = new ArrayList ();

return (newObj);
}

private static Map createMap(Map obj) throws Exception {
Map newObj = null;

if (obj instanceof SortedMap)
newObj = new TreeMap ();
else
newObj = new HashMap ();

return (newObj);
    }
}

Regards,

Néstor Boscán

On Thu, Jan 27, 2011 at 2:15 AM, Nagin Kothari wrote:

>
> Hi,
> Can you point to some link that provide sample code or utility to clean the
> Hibernate POJO (Hibernate Cleaner class) as you have mentioned in this mail.
> It would greately help me too.
>
> Thanks in advance,
>
> Nagin
> 2011/1/26 Néstor Boscán 
>
>> This is very tipical in Hibernate applications that have to serialize
>> objects through the network be it GWT, Web Services, JSON, etc. Hibernate
>> will leave his own POJO in your objects for lazy initialization purposes.
>> When GWT or a Web Service tries to serialize the objects and opens the
>> hibernate POJO it will throw LazyInitializationException because the
>> connection is already closed. What I've done in my applications is to clean
>> the POJO of any Hibernate references. This is done with a Hibernate Cleaner
>> class. On the web there are a couple of examples of this.
>>
>> Regards,
>>
>> Néstor Boscán
>>
>> On Tue, Jan 25, 2011 at 2:33 PM, Debashish wrote:
>>
>>> Hi
>>>
>>> I am trying for a sample using GWT and database layer as Hibernate
>>> with Oracle on Google Aps server.
>>>
>>> I have done a sample for Hibernate with JSP as presentation layer,
>>> which is working fine.
>>> But the same approach is not working with GWT.
>>>
>>> Here is a verygood link on this topic
>>>
>>> http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
>>> and my approach is almost similar.
>>>
>>> I have followed the below approach,
>>> The RemoteServiceServlet makes a call to Hibernate layer and tries the
>>> initializes the SessionFactory as below,
>>>  sessionFactory = new
>>> Configuration().configure().buildSessionFactory();
>>>
>>> I have added the jars necessary for the Hibernate layer (and
>>> classes12.jar for oracle driver).
>>>
>>> However while running , it is giving me an error as below,
>>>
>>> 
>>> Initial SessionFactory creation failed.java.lang.NoClassDefFoundError:
>>> java.net.Socket is a restricted class. Please see the Google  App
>>> Engine developer's guide for more details.
>>> [ERROR] javax.servlet.ServletContext log: Exception while dispatching
>>> incoming RPC call
>>> com.google.gwt.user.server.rpc.UnexpectedException: Service method
>>> 'public abstract java.lang.Long
>>>
>>> com.google.musicstore.client.MusicStoreService.saveAccount(com.google.musicstore.client.dto.AccountDTO)'
>>> threw an unexpected exception: java.lang.ExceptionInInitializerError
>>>at
>>> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
>>> 378)
>>>
>>> 
>>> I have one through some of the threads which suggested me to download
>>> the google apps jar files and try it. I have downladed it. but there
>>> is no proper direction on how to make use of which jar file.
>>>
>>> Have anybody tried the same. Please let me know if anything I am doing
>>> wrong.
>>> *** Note that I am using Oracle 9.2 as local database.
>>>
>>> Thanks
>>> Dev
>>>
>>> --
>>> You received 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-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@google

Re: GWT with Hibernate and Oracle

2011-01-26 Thread Néstor Boscán
This is very tipical in Hibernate applications that have to serialize
objects through the network be it GWT, Web Services, JSON, etc. Hibernate
will leave his own POJO in your objects for lazy initialization purposes.
When GWT or a Web Service tries to serialize the objects and opens the
hibernate POJO it will throw LazyInitializationException because the
connection is already closed. What I've done in my applications is to clean
the POJO of any Hibernate references. This is done with a Hibernate Cleaner
class. On the web there are a couple of examples of this.

Regards,

Néstor Boscán

On Tue, Jan 25, 2011 at 2:33 PM, Debashish  wrote:

> Hi
>
> I am trying for a sample using GWT and database layer as Hibernate
> with Oracle on Google Aps server.
>
> I have done a sample for Hibernate with JSP as presentation layer,
> which is working fine.
> But the same approach is not working with GWT.
>
> Here is a verygood link on this topic
>
> http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
> and my approach is almost similar.
>
> I have followed the below approach,
> The RemoteServiceServlet makes a call to Hibernate layer and tries the
> initializes the SessionFactory as below,
>  sessionFactory = new
> Configuration().configure().buildSessionFactory();
>
> I have added the jars necessary for the Hibernate layer (and
> classes12.jar for oracle driver).
>
> However while running , it is giving me an error as below,
>
> 
> Initial SessionFactory creation failed.java.lang.NoClassDefFoundError:
> java.net.Socket is a restricted class. Please see the Google  App
> Engine developer's guide for more details.
> [ERROR] javax.servlet.ServletContext log: Exception while dispatching
> incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method
> 'public abstract java.lang.Long
>
> com.google.musicstore.client.MusicStoreService.saveAccount(com.google.musicstore.client.dto.AccountDTO)'
> threw an unexpected exception: java.lang.ExceptionInInitializerError
>at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
> 378)
>
> 
> I have one through some of the threads which suggested me to download
> the google apps jar files and try it. I have downladed it. but there
> is no proper direction on how to make use of which jar file.
>
> Have anybody tried the same. Please let me know if anything I am doing
> wrong.
> *** Note that I am using Oracle 9.2 as local database.
>
> Thanks
> Dev
>
> --
> You received 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-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: CellView and vertical scroll bar

2011-01-07 Thread Néstor Boscán
I checked the site and I can't find CellView on the API Documentation.

Regards,

Néstor Boscán

2011/1/6 Néstor Boscán 

> Thanks Owen.
>
>
> On Wed, Jan 5, 2011 at 4:34 PM, Owen Powell  wrote:
>
>> The incubator is here:
>>
>> http://code.google.com/p/google-web-toolkit-incubator/
>>
>> ~Owen
>>
>> --
>> You received 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.



Example Code on how to add a check box column to CellView

2011-01-06 Thread Néstor Boscán
Hi

Anyone has some example code on how to add a check box column to CellView.

Regards,

Néstor Boscán

-- 
You received 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 to delete the time spinner on CellView

2011-01-05 Thread Néstor Boscán
Yes that worked. Thanks a lot.

On Wed, Jan 5, 2011 at 12:32 PM, Ben Imp  wrote:

> I believe if you additionally set the row count to 0, it will stop the
> spinner.
>
> -Ben
>
> On Jan 5, 10:56 am, Néstor Boscán  wrote:
> > Hi
> >
> > When I add a new CellView Widget without any rows I get a time spinner
> > inside the CellView. Is there a way to eliminate the time spinner.
> >
> > Regards,
> >
> > Néstor Boscán
>
> --
> You received 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: CellView and vertical scroll bar

2011-01-05 Thread Néstor Boscán
Thanks Owen.

On Wed, Jan 5, 2011 at 4:34 PM, Owen Powell  wrote:

> The incubator is here:
>
> http://code.google.com/p/google-web-toolkit-incubator/
>
> ~Owen
>
> --
> You received 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: PopupPanel space on parent Panel

2011-01-05 Thread Néstor Boscán
Thanks Thomas.

On Wed, Jan 5, 2011 at 1:23 PM, Thomas Broyer  wrote:

> PopupPanel-s are not meant to be add()ed to other widgets.
>
> When you call center() or show() on them, they actually add them to the
> RootPanel.get() (which as a side effect removes them from where they
> previously were, which explains why the "blank" disappears)
>
> --
> You received 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.



PopupPanel space on parent Panel

2011-01-05 Thread Néstor Boscán
Hi

When I add a hidden PopupPanel on a parent Panel I can see the space on the
parent panel where the PopupPanel is. When I center and show the panel the
space disappears. I've tried to center the PopupPanel on the constructor but
with no luck. Any ideas?

Regards,

Néstor Boscán

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



CellView and vertical scroll bar

2011-01-05 Thread Néstor Boscán
Hi

I've read that CellView does not support a vertical scroll bar but I also
read that the google incubator may have a version with this feature. Anyone
knows where I can find it?

Regards,

Néstor Boscán

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



How to change CSS on a Vertical MenuBar Window

2011-01-05 Thread Néstor Boscán
Hi

I've changed the CSS on MenuItems but I haven't been able to change the
Window of a Vertical MenuBar. Any examples on how to do this?

Regards,

Néstor Boscán

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



How to delete the time spinner on CellView

2011-01-05 Thread Néstor Boscán
Hi

When I add a new CellView Widget without any rows I get a time spinner
inside the CellView. Is there a way to eliminate the time spinner.

Regards,

Néstor Boscán

-- 
You received 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 to get a widget from another panel

2011-01-03 Thread Néstor Boscán
Greg thanks a lot. Using rootpanel.get won't help?

On 1/3/11, Greg Dougherty  wrote:
> Well, assuming both panels are in the same web application, save the
> widget in a global variable, and access that when you want
> information.
>
> Greg
>
> On Jan 3, 8:49 am, Néstor Boscán  wrote:
>> Hi
>>
>> Thanks for the quick reply.
>>
>> I don't want to add the widget I want to get the value of a widget
>> that is in another panel
>>
>> On 1/3/11, nacho  wrote:
>>
>> > Just add the widget to the panel that you want.
>>
>> > panel.add(widget);
>>
>> > On 3 ene, 00:29, Néstor Boscán  wrote:
>> >> Hi
>>
>> >> I have a GWT application with two panels. How to I get a Widget from
>> >> one
>> >> panel from the other panel?.
>>
>> >> Regards,
>>
>> >> Néstor Boscán
>>
>> > --
>> > You received 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: How to get a widget from another panel

2011-01-03 Thread Néstor Boscán
Hi

Thanks for the quick reply.

I don't want to add the widget I want to get the value of a widget
that is in another panel

On 1/3/11, nacho  wrote:
> Just add the widget to the panel that you want.
>
> panel.add(widget);
>
> On 3 ene, 00:29, Néstor Boscán  wrote:
>> Hi
>>
>> I have a GWT application with two panels. How to I get a Widget from one
>> panel from the other panel?.
>>
>> Regards,
>>
>> Néstor Boscán
>
> --
> You received 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.



How to get a widget from another panel

2011-01-02 Thread Néstor Boscán
Hi

I have a GWT application with two panels. How to I get a Widget from one
panel from the other panel?.

Regards,

Néstor Boscán

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



GWT Data Oriented Grid

2010-12-28 Thread Néstor Boscán
Hi

I need to display lots of information stored in Collections on a HTML table.
The basic GWT library does not provide a grid that I can pass de collection,
define headers and data and paint it automatically like other frameworks do.
I know that there are a lot of extension libraries that provide this kind of
functionality. Is there one that people use the most?

Regards,

Néstor Boscán

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