Re: is there a command line GWT Compiler ? gwtc MyGWTClass.java ?

2011-03-05 Thread Ryan Mehregan
Please have a look at GWT Documentation on GWT Compiler Options http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions java -cp path/to/gwt-dev.jar com.google.gwt.dev.Compiler to simplify this,you can add gwt-dev.jar to your $PATH, and make a

Re: Example to test RequestFactory in JRE

2011-03-01 Thread Ryan Mehregan
I have created the following utility method, which gives me access to RequestFactory for Unit Tests. public class RequestFactoryProvider { public static AppRequestFactory get() { ServiceLayer serviceLayer = ServiceLayer.create(); SimpleRequestProcessor processor = new

Re: GWT 2.2

2011-02-22 Thread Ryan Mehregan
You need to upgrade to GIN 1.5. make sure to also add guice 3.0-rc2 and guice-assistedinject as dependencies. http://groups.google.com/group/google-gin/browse_thread/thread/8a8d13618568da8 Ryan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit

Re: SAXParseException when using SafeHtml Template

2011-02-19 Thread Ryan Mehregan
try wrapping your template markup in a block element, public interface Template extends SafeHtmlTemplates { @SafeHtmlTemplates.Template(spanimg src=\{0}\/imgspan{1}/span/span) SafeHtml img(String url, String text); } Ryan -- You received this message because you are

Re: ActivityManager and TabLayoutPanel

2011-02-04 Thread Ryan Mehregan
You have to ask yourself, what exactly is a TabLayoutPanel ? it has two parts, a header and a body. the header is a list of labels/links that when clicked change state (only one can be active at a time, you change its color, updates the history token) therefore to make TabLayoutPanel work

Re: How to create DOM Element or Node from SafeHtml

2011-02-04 Thread Ryan Mehregan
Please have a look at GWT DOM class: http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/DOM.html DOM class has various static createElement factory methods that help you create any DOM element you want. you can then use Element.setInnerHtml in conjunction with

Re: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
yes, it is totally unnecessary. 1- you can annotate your Foo clas with @Singleton annotation. 2- alternatively you can use bind(Foo.class).in(Singleton.class) in your GIN Module configure() method. now you can use your Provider as you normally would, and it gives you the same Foo instance all

Re: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
using a Provider always result in delayed on-demand instantiation, the object is not create unless you get() it. however, if you don't bind it in Singleton scope, this deferred on-demand instantiation will create a new instance every time you call get() on the Provider. in cases where you only

Re: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
if you do not want your objects to be in Singleton scope, just use Provider in following fashion. no configuration is necessary. MyClass { private final ProviderFoo fooProvider; @Inject public MyClass(ProviderFoo fooProvider){ this.fooProvider = fooProvider; } public void myMethod(){ Foo foo

Re: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
if you do not want your objects to be in Singleton scope, just use Provider in following fashion. no configuration is necessary. public class MyClass { private final ProviderFoo fooProvider; @Inject public MyClass(ProviderFoo fooProvider){ this.fooProvider = fooProvider; } public void

Re: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
if you do not want your objects to be in Singleton scope, just use Provider in following fashion. no configuration is necessary. public class MyClass { private final ProviderFoo fooProvider; @Inject public MyClass(ProviderFoo fooProvider){ this.fooProvider = fooProvider; } public void

Re: Gin, SingleInstanceProvider?

2011-02-03 Thread Ryan Mehregan
if you do not want your objects to be in Singleton scope, just use Provider in following fashion. no configuration is necessary. public class MyClass { private final ProviderFoo fooProvider; @Inject public MyClass(ProviderFoo fooProvider){ this.fooProvider = fooProvider; } public void

Re: How to create DOM Element or Node from SafeHtml

2011-02-03 Thread Ryan Mehregan
One solution is to clone an already existing node and then manipulating it. 1- clone an already existing node eg. Node node = parent.cloneNode(false) 2- cast this Node to Element eg. Element element = Element.as(node) 3- manipulate this element eg. element.setInnerHTML(html.asString) // using

Re: Simple history question

2011-01-27 Thread Ryan Mehregan
PlaceHistoryHandler, has a register method: public HandlerRegistration register(PlaceController placeController, EventBus eventBus, Place defaultPlace) { you probably have already defined some

Re: Simple history question

2011-01-27 Thread Ryan Mehregan
Places use History mechanism behind the scenes. It is an abstraction layer which allows you to deal with History from a higher level point of view, and application oriented. in GWT applications, unlike other traditional web frameworks, we have only one .html page. therefore talking about page1,

Re: App Deployment

2011-01-27 Thread Ryan Mehregan
Amazon offers many Cloud based database related solutions. Amazon RDS (Relational Database Service) is what you need. http://aws.amazon.com/rds/ Amazon RDS gives you access to the full capabilities of a familiar MySQL database. This means the code, applications, and tools you already use today

Re: GWT Special Features compared to other Frameworks

2011-01-18 Thread Ryan Mehregan
I am afraid your first point is not a correct assessment. Programming the Web is a very broad category which encompasses a plethora of Java Web Frameworks that emerged over the past decade many of them now obsolete. Like many of them MVC frameworks(Struts, WebWork, Tapestry, SpringMVC/ WebFlow,

Re: GWT Special Features compared to other Frameworks

2011-01-18 Thread Ryan Mehregan
I do not think Collaborative Working is a feature or benefit of using GWT. There are many tools that facilitate collaborative work, including discussion groups, distributed version control systems, google docs, instant messaging programs, or many project and team management web applications that

Re: GWT Special Features compared to other Frameworks

2011-01-18 Thread Ryan Mehregan
I am afraid your first point is not a correct assessment. Programming the Web is a very broad category which encompasses a plethora of Java Web Frameworks that emerged over the past decade many of them now obsolete. Like many of the MVC frameworks (Struts, WebWork, Tapestry, SpringMVC/WebFlow,

Re: How do i make my FlexTable to implement OnClick event and PopUpPanel?

2011-01-18 Thread Ryan Mehregan
if you are planning to populate your table with Data that comes from a datastore, I think it would be better to look into new Google Data Presentation Widgets. Cell Table for example has the feature you want, and many more, there are code samples available too.

Re: How do i make my FlexTable to implement OnClick event and PopUpPanel?

2011-01-18 Thread Ryan Mehregan
if you are planning to populate your table with Data Objects, I think it would be better to look into new Google Data Presentation Widgets. Cell Table for example has the feature you want, and many more, there are code samples available too.

Re: How do i make my FlexTable to implement OnClick event and PopUpPanel?

2011-01-18 Thread Ryan Mehregan
if you are planning to populate your table with Data Objects, I think it would be better to look into new Google Data Presentation Widgets. Cell Table for example has the feature you want, and many more, there are code samples available too.

Re: JSON vs GWT-RPC - Unit testing and manual testing for a newbie

2011-01-17 Thread Ryan Mehregan
with GWT 2.1, there is another client-server communication mechanism called RequestFactory. RequestFactory uses JSON behind the scene, and aggressively caches data, when your data model changes, RequestFactory only sends the changed bits over the wire, not the entire object graph; Which results in

Re: JSON vs GWT-RPC - Unit testing and manual testing for a newbie

2011-01-17 Thread Ryan Mehregan
If you decided to go with REST-like architecture, exchanging JSON encoded data, there are some resources that can either make the job easier for you, or be source of inspiration. make sure to also checkout AutoBean http://code.google.com/p/google-web-toolkit/wiki/AutoBean GWT-REST

Re: JSON vs GWT-RPC - Unit testing and manual testing for a newbie

2011-01-17 Thread Ryan Mehregan
RequestFactory comes with some helper classes that allow you to run your tests within the JRE environment, which means your tests are executed in miliseconds.

Re: gwt mvp sessions

2011-01-17 Thread Ryan Mehregan
The best practice for developing GWT applications is to keep the server-side of your code as Stateless as possible. In the past, with traditional web frameworks, there was not much you could do on the client, we only had basic html forms, which we asked user for input, and most of the processing

Re: GWTUpload and 2GB files across DIFFERENT browsers

2011-01-17 Thread Ryan Mehregan
You might want to checkout AjaxFileUpload (also known as Valum file upload) http://valums.com/ajax-upload/ it is pure JavaScript, which means you do not need to also add a JavaScript such as JQuery to make it work. You can wrap it with JSNI and use it. I found it to be more powerful than

Re: JSON vs GWT-RPC - Unit testing and manual testing for a newbie

2011-01-17 Thread Ryan Mehregan
some useful resources on RequestFactory: GWT Documentation: http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html excellent source of GWT related articles http://tbroyer.posterous.com/ in-progress sample project http://code.google.com/p/listwidget/ -- You received this

Re: GWTUpload and 2GB files across DIFFERENT browsers

2011-01-17 Thread Ryan Mehregan
You might want to checkout AjaxFileUpload (also known as Valum file upload) http://valums.com/ajax-upload/ it is pure JavaScript, which means you do not need to also add an additional JavaScript library such as JQuery to make the file upload script work. You can wrap it with JSNI and use it. I