PDA

View Full Version : Integrating GXT with Adobe AIR



Ekambos
13 Sep 2010, 12:43 AM
Hello Commnity,
A couple of months ago i started a personal project to enable GXT developers to be able to deploy their application inside adobe AIR.

the library is almost done and here are some of the features :

1) A FilesystemExplorer component that enable to browse local filesystem (see sreenshot)
2) An Adapter for GXT so there is no Securty Error from Adobe AIR (eval )
3) An Adapater to make GWT RPC possible inside AIR (You still can use normal AJAX though)
4) Export : GXT Chart to PDF, HTML, PNG
5) Export GXT Grid to EXcel
6) Drag and Drop from the OS to the App
7) and more to come....

and off cource the application still can run as a normal web app (Without the AIR functions)


The library is nt finische yet, but i m planing to relaseae it end of the month (Open Source and Free of course)

as a POC i build a lil application (See sreenshots)

I would like to have some feedback, to know if there are peoples out there, who need something line that(Hopefully i did nt word for nothing :) )

Greets

E

Ekambos
13 Sep 2010, 1:10 AM
Sorry for my poor english :)

GXTUser1
13 Sep 2010, 8:12 AM
Hello E,

I m pretty new to GXT and to this forum.

I m doing some research for my company and and i saw your post.
What exactly is the purpose of your library ?
We have a customer, who would like to export the GXT Chart to PDF. Can you confirm that your library can do that ? How is that hapening ? on the server using a pdf library ? when exactly are you going to release ?

Sorry if i ask a lot of question.

It s because we really need this :)

Regards

Sam

Ekambos
13 Sep 2010, 10:30 AM
Hi Sam,

The idea of the library is not really new.
I wanted to created a web application that can run on both: browser and desktop using the java language
I ve searched the internet and the forum on how to integrate gxt and adobe air. but i couldnt find a good solution, so i decided to start my own project.

the generated pdf was generated on the client using adobe AIR API. no Server involved. But this only work on the AIR client. If u wanted to generate pdf in the web app then u should use a server side technology.

Like i said in the post before the library will include some adapters to make GXT work inside AIR and some other utiliy tools(Notification for example..) It also include a Dev Mode for AIR so u cant debug your app inside AIR.

I hope i will release it by the end of the month, but i cant tell for sure , end of september is the target.

But i also dont want to release something people do not need or allready hav, that why i was asking for feedback.

Glad somebody has the need :)

Greets

E

chalu
14 Sep 2010, 7:46 AM
Please go ahead with your development, I think the community will love it especially if it has good features and is open source. I am looking forward to its release.

harun
15 Sep 2010, 11:32 PM
Hi Ekambos,

as I see your project is wonderful. It will be great if the open source is available.
features will be very useful in all projects.

I'm waiting you impatiently....

Ekambos
16 Sep 2010, 12:57 AM
Hello Guys,

Thanks for your words.

I m working hard to get the project out by end of september. So stay tune

Here is an Example of how programming with the library will look like



public class Demo implements EntryPoint {


public void onModuleLoad() {


Button b = new Button("Click Me");

b.addSelectionListener(new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {

if( ! Runtime.isAIRRuntime()){

MessageBox.alert("Hello From the Browser", "I m running inside a web Browser", null);

}else{

final File f = File.getDesktopDirectory();

f.browseForOpen("Choose a File");

f.addEventListener(Event.SELECT, new AIREventListener<Event>() {

@Override
protected void onAIREvent(Event event) {


String fileName = f.getName();

MessageBox.alert("Hello From Adobe AIR", "I m running inside air and : <b>" + fileName + "</b> was selected", null);

}
});
}

}
});


RootPanel.get().add(b);


}

}


and you can see the result on the attached scrennshots

Greets

E






224302243122432

GXTUser1
16 Sep 2010, 3:07 AM
That looks pretty promising and impressive
I m also looking forward for your release.
Keep up the good work.

Sam

Ekambos
30 Sep 2010, 1:14 AM
Hello people,
i m still working to release the toolkit. But because of some personal issue i really have not worked on it the last two weeks.
The other thing is i m really new on releasing softwares, actually i never did. can anyone tell me wich license will make more sence. i want the thing to stay free but any contribution will hav to benefit to the others too.

here is another entry i ve posted on the adobe site:

http://kb2.adobe.com/community/publishing/870/cpsid_87074.html


like allways feedback are very welcome

Greets

Alain

oxyrox
13 Oct 2010, 6:34 AM
Hi there

This looks very interesting! I'm looking forward for your first release.
Is there any update on your schedule?

Can't wait. ;)

Hang in there!

Greets
oxy

Ekambos
13 Oct 2010, 1:05 PM
Hello hello,
I m working on the documentation right now.
Trying to write some tutorials on how to use the library.
I thought i will done by end of september but my job is really keeping me busy at the moment.

The first release will definitly come by end of this month(probably on google code)

Greets

Alain

remark
15 Oct 2010, 5:05 AM
I am also very interested to see this.

Cheers

Ekambos
18 Oct 2010, 3:50 AM
http://code.google.com/p/gwt4air/

Work in progress, end of the month will definelty be the the release data
Greets

Alain

bartolomiew
29 Oct 2010, 11:28 PM
This sounds very promising. This may be a solution for customers who do not want to install a new version of Internet Explorer but are willing to install an application.

Ekambos
31 Oct 2010, 3:27 PM
Hello community,
It s been a long way but i m proud to annouce the release of Gwt4Air 1.0
Gwt4Air will give you the the ability to turn your gxt apps in to desktop apps using adobe air.

You can download the jar here http://code.google.com/p/gwt4air/.
The first release is compatible with gxt 2.2, gwt 2.0 and adobe air 2. It includes the following features:

1) Access to the core AIR APi from GWT, you basically can do anything you would do in actionscript or javascript.
2) An adapter to make GXT works inside the air application sandbox
3) A pdf module to read and write pdf files.
4) A google maps module, so you can produce maps even when your web client is offline
5) An adapter to male RPC and RequestBuilder calls possible with AIR.
6) A sample app with source code that shows some examples. One of the example will show how you can export an GXT chart to pdf using gwt4air.

The next releases will add more and more features(check out the roadmap)
To get started please look in the wiki pages.

I hope you guys are going to like this and provide some good feedbacks.
For any question please feel free to contact me.

best regards,

Alain

GXTUser1
2 Nov 2010, 12:59 AM
Hi Alain,
I just wanted to say thank you !
This is really some good peace of work. Exactly what i ve been looking for.
And looking at the roadmap is getting really interesting.

but....

i saw that the license is GPL , what m i supposed to go if i do not want do distribuate the my source code ?

cheers

GXTUser1
3 Nov 2010, 6:23 AM
Any update on the license issue please? We really need this (specially the PDF Export part), but can not opensource our project.
Regards

GXTUser1
3 Nov 2010, 6:26 AM
Oh yeah,
we are also willing to pay some money if necessary.

Ekambos
4 Nov 2010, 1:53 AM
Hello,
Sorry i havent answered sooner. I m a bit busy trying to make gwt4air works with gwt2.1(which will be done soon). Also a licensing issue on the air core api i needed to fix. Version 1.1 will be out soon with all the fixes.

To your question:
First thanks that you appriciate the tool. Thanks to the other people who wrote me too.

I said here before that i m not an expert in software licensing. A friend a mine told me i should gpl it and i did it :)
Fact is, i also got a lot of post from people complaining about the GPL since they will hav to open source. So maybe i ll come up with another license with version 1.2

I m glad you guyz are willing to pay some money. But Commercial license is not in plan for now. But i think we can find a way to make this work for you. Just send me a PM.

Regards,

Alain

Ekambos
23 Nov 2010, 4:29 PM
Hello People,
Gwt4Air 1.1 is out.

this version now supports GWT 2.1, GXT 2.2.1 and adobe AIR 2.5 and provides
the following features among others:

Bug fix in the NativeProcess API

Bug Fix in the DisplayObject API

Bug Fix in the 3D Map API

a new example showing how to communicate with a native process

a SoundUtil class to easely handle sound. So you can do something like this


File f = File.getDesktopDirectory().resolvePath("myMp3.mp3");
SoundUtil.play(f);


Like always feedback are verry welcome.

Regards,

Alain

Ekambos
2 Dec 2010, 2:47 PM
Hello people,
few times ago i had the humble pleasure to announce the release of gwt4air 1.0
since then i v received a lot of inputs about the library and i want to thank all the people that are helping me improve this library.
I hope this tool will help you port your GXT skills to the desktop just like it does help us at my company. Even if everything is going mobile today i believe the desktop wont die soon. And despite the upcoming of HTML5 , AIR will still be the best platform to deliver desktop applications using web technologies.

Well if i m writing today it s because Gwt4Air 2.0 is coming out soon with a lot of new features.

1) a big extension of the core api specially flash.net(dns, socket,..) , flash.sensors(geolocation), flash.media(video) , flash.printing(improved print job)


2) support for the Aswing UI library (http://www.aswing.org/)
Aswing is a rich UI library natively written in ActionScript that you can now use in your AIR project with GXT.(I m also thinking about adding support for non AIR projects in the next releases)


23634 23635


3) Excel genertion on the client.
Through the export of the as3xls library(http://code.google.com/p/as3xls/) you can read and write excel file on the AIR client.A good use case would be to export GXT grids to excel

4) a more powerfull PDF library with Pure PDF (http://code.google.com/p/purepdf/). This library is the export of the iText(http://itextpdf.com/) library to ActionScript.
you will now be able use the library in your GXT projects for AIR to read and write pdf documents

5) a GXT Theme for AIR Native Windows. Using the GXT Adapter module you will be able to generate native windows with the GXT look and feel

23636


6) A fully customizable Notification API. Inspired from the GXT Info class , you will be able to generate native Notifications on your AIR Client. (Note those are native windows from the operanting system not from the web page like the GXT ones).

23637


7) a lot of bug fixing and overall performance improvment

I hope you guys will like this and looking forward for your inputs

Regards,

Alain

fakhrikharrat
3 Dec 2010, 11:23 AM
hi, first am using Netbeans IDE i follow up all instruction : integrate a jar copying gwt4air to web folder of my project adding <inherits name="com.ekambi.gwt.air.core.Gwt4Air" />

when i compiling errors appears :

GWT Compiling client-side code. Loading inherited module 'com.ekambi.gwt.air.core.Gwt4Air?'

Loading inherited module 'com.ekambi.gwt.jscollections.JsCollections?'
ERROR? Unable to find 'com/ekambi/gwt/jscollections/JsCollections?.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
ERROR? Line 20: Unexpected exception while processing element 'inherits'
com.google.gwt.core.ext.UnableToCompleteException?: (see previous log entries)
at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:239) at com.google.gwt.dev.cfg.ModuleDefSchema?$BodySchema?.inherits_begin(ModuleDefSchema?.java:354) at sun.reflect.GeneratedMethodAccessor1?.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.util.xml.HandlerMethod?.invokeBegin(HandlerMethod?.java:223) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.startElement(ReflectiveParser?.java:270) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver?.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:327) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefSchema?$BodySchema?.inherits_begin(ModuleDefSchema?.java:354) at sun.reflect.GeneratedMethodAccessor1?.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.util.xml.HandlerMethod?.invokeBegin(HandlerMethod?.java:223) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.startElement(ReflectiveParser?.java:270) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:788) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver?.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:327) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefLoader?$1.load(ModuleDefLoader?.java:169) at com.google.gwt.dev.cfg.ModuleDefLoader?.doLoadModule(ModuleDefLoader?.java:283) at com.google.gwt.dev.cfg.ModuleDefLoader?.loadFromClassPath(ModuleDefLoader?.java:141) at com.google.gwt.dev.Compiler.run(Compiler.java:184) at com.google.gwt.dev.Compiler$1.run(Compiler.java:152) at com.google.gwt.dev.CompileTaskRunner?.doRun(CompileTaskRunner?.java:87) at com.google.gwt.dev.CompileTaskRunner?.runWithAppropriateLogger(CompileTaskRunner?.java:81) at com.google.gwt.dev.Compiler.main(Compiler.java:159)
ERROR? Failure while parsing XML
com.google.gwt.core.ext.UnableToCompleteException?: (see previous log entries)
at com.google.gwt.dev.util.xml.DefaultSchema?.onHandlerException(DefaultSchema?.java:56) at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66) at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66) at com.google.gwt.dev.util.xml.HandlerMethod?.invokeBegin(HandlerMethod?.java:233) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.startElement(ReflectiveParser?.java:270) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver?.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:327) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefSchema?$BodySchema?.inherits_begin(ModuleDefSchema?.java:354) at sun.reflect.GeneratedMethodAccessor1?.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.util.xml.HandlerMethod?.invokeBegin(HandlerMethod?.java:223) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.startElement(ReflectiveParser?.java:270) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:788) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver?.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:327) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefLoader?$1.load(ModuleDefLoader?.java:169) at com.google.gwt.dev.cfg.ModuleDefLoader?.doLoadModule(ModuleDefLoader?.java:283) at com.google.gwt.dev.cfg.ModuleDefLoader?.loadFromClassPath(ModuleDefLoader?.java:141) at com.google.gwt.dev.Compiler.run(Compiler.java:184) at com.google.gwt.dev.Compiler$1.run(Compiler.java:152) at com.google.gwt.dev.CompileTaskRunner?.doRun(CompileTaskRunner?.java:87) at com.google.gwt.dev.CompileTaskRunner?.runWithAppropriateLogger(CompileTaskRunner?.java:81) at com.google.gwt.dev.Compiler.main(Compiler.java:159)
ERROR? Unexpected error while processing XML
com.google.gwt.core.ext.UnableToCompleteException?: (see previous log entries)
at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:351) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefSchema?$BodySchema?.inherits_begin(ModuleDefSchema?.java:354) at sun.reflect.GeneratedMethodAccessor1?.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.util.xml.HandlerMethod?.invokeBegin(HandlerMethod?.java:223) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.startElement(ReflectiveParser?.java:270) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:788) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver?.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:327) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefLoader?$1.load(ModuleDefLoader?.java:169) at com.google.gwt.dev.cfg.ModuleDefLoader?.doLoadModule(ModuleDefLoader?.java:283) at com.google.gwt.dev.cfg.ModuleDefLoader?.loadFromClassPath(ModuleDefLoader?.java:141) at com.google.gwt.dev.Compiler.run(Compiler.java:184) at com.google.gwt.dev.Compiler$1.run(Compiler.java:152) at com.google.gwt.dev.CompileTaskRunner?.doRun(CompileTaskRunner?.java:87) at com.google.gwt.dev.CompileTaskRunner?.runWithAppropriateLogger(CompileTaskRunner?.java:81) at com.google.gwt.dev.Compiler.main(Compiler.java:159)
ERROR? Line 10: Unexpected exception while processing element 'inherits' com.google.gwt.core.ext.UnableToCompleteException?: (see previous log entries)
at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:260) at com.google.gwt.dev.cfg.ModuleDefSchema?$BodySchema?.inherits_begin(ModuleDefSchema?.java:354) at sun.reflect.GeneratedMethodAccessor1?.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.util.xml.HandlerMethod?.invokeBegin(HandlerMethod?.java:223) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.startElement(ReflectiveParser?.java:270) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:788) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver?.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:327) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefLoader?$1.load(ModuleDefLoader?.java:169) at com.google.gwt.dev.cfg.ModuleDefLoader?.doLoadModule(ModuleDefLoader?.java:283) at com.google.gwt.dev.cfg.ModuleDefLoader?.loadFromClassPath(ModuleDefLoader?.java:141) at com.google.gwt.dev.Compiler.run(Compiler.java:184) at com.google.gwt.dev.Compiler$1.run(Compiler.java:152) at com.google.gwt.dev.CompileTaskRunner?.doRun(CompileTaskRunner?.java:87) at com.google.gwt.dev.CompileTaskRunner?.runWithAppropriateLogger(CompileTaskRunner?.java:81) at com.google.gwt.dev.Compiler.main(Compiler.java:159)
ERROR? Failure while parsing XML com.google.gwt.core.ext.UnableToCompleteException?: (see previous log entries)
at com.google.gwt.dev.util.xml.DefaultSchema?.onHandlerException(DefaultSchema?.java:56) at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66) at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66) at com.google.gwt.dev.util.xml.HandlerMethod?.invokeBegin(HandlerMethod?.java:233) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.startElement(ReflectiveParser?.java:270) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:788) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver?.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:327) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefLoader?$1.load(ModuleDefLoader?.java:169) at com.google.gwt.dev.cfg.ModuleDefLoader?.doLoadModule(ModuleDefLoader?.java:283) at com.google.gwt.dev.cfg.ModuleDefLoader?.loadFromClassPath(ModuleDefLoader?.java:141) at com.google.gwt.dev.Compiler.run(Compiler.java:184) at com.google.gwt.dev.Compiler$1.run(Compiler.java:152) at com.google.gwt.dev.CompileTaskRunner?.doRun(CompileTaskRunner?.java:87) at com.google.gwt.dev.CompileTaskRunner?.runWithAppropriateLogger(CompileTaskRunner?.java:81) at com.google.gwt.dev.Compiler.main(Compiler.java:159)
ERROR? Unexpected error while processing XML com.google.gwt.core.ext.UnableToCompleteException?: (see previous log entries)
at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.parse(ReflectiveParser?.java:351) at com.google.gwt.dev.util.xml.ReflectiveParser?$Impl.access$100(ReflectiveParser?.java:48) at com.google.gwt.dev.util.xml.ReflectiveParser?.parse(ReflectiveParser?.java:398) at com.google.gwt.dev.cfg.ModuleDefLoader?.nestedLoad(ModuleDefLoader?.java:257) at com.google.gwt.dev.cfg.ModuleDefLoader?$1.load(ModuleDefLoader?.java:169) at com.google.gwt.dev.cfg.ModuleDefLoader?.doLoadModule(ModuleDefLoader?.java:283) at com.google.gwt.dev.cfg.ModuleDefLoader?.loadFromClassPath(ModuleDefLoader?.java:141) at com.google.gwt.dev.Compiler.run(Compiler.java:184) at com.google.gwt.dev.Compiler$1.run(Compiler.java:152) at com.google.gwt.dev.CompileTaskRunner?.doRun(CompileTaskRunner?.java:87) at com.google.gwt.dev.CompileTaskRunner?.runWithAppropriateLogger(CompileTaskRunner?.java:81) at com.google.gwt.dev.Compiler.main(Compiler.java:159)
F:\work\java\TunisieLait?\nbproject\build-gwt.xml:141: The following error occurred while executing this line: F:\work\java\TunisieLait?\nbproject\build-gwt.xml:290: Java returned: 1 BUILD FAILED (total time: 2 seconds)

where's the pb ?
rem: same error when i use Eclipse.

thanks

Ekambos
3 Dec 2010, 2:57 PM
It loos like i ve forgot to add the jsCollection module on the release 1.1 :)
sorry i ll correct that right away. If you can wait you can extract it from the release 1.0 add it to 1.1
Regards,
Alain

Ekambos
3 Dec 2010, 3:08 PM
The new file is up .
sorry for the inconvenient
greats,
Alain

fakhrikharrat
3 Dec 2010, 10:03 PM
thanks alain for your quick response :)
but there's an other error :

GWT Compiling client-side code.
Loading inherited module 'com.ekambi.gwt.air.pdf.PDF'
Loading inherited module 'com.ekambi.gwt.air.core.Gwt4Air-modular'
[ERROR] Unable to find 'com/ekambi/gwt/air/core/Gwt4Air-modular.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] Line 19: Unexpected exception while processing element 'inherits'
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)

Merci
Alain

Ekambos
4 Dec 2010, 1:27 AM
Oh boy :)
Not good when you working till late in the night :)
Must be fixed now
Thank you for yon inputs
regards,
Alain

Ekambos
6 Dec 2010, 9:11 AM
Please can you confirm that everthing is working now ?
cheers,
Alain

fakhrikharrat
7 Dec 2010, 3:49 AM
hi Alain,
Now there is no compiling error,
first i would like to inform you that am using Netbeans and the air SDK is not configured on it, the setup.doc explain how to configure aire SDK with Eclipse can you show me how to configure it on Netbeans.
when i debugging my project the program crash :

PDF pdfFile = PDF.newInstance(Orientation.PORTRAIT, Unit.MM, Size.A4);

and go to :
public InvocationTargetException(Throwable target) {
super((Throwable)null); // Disallow initCause
this.target = target;
}

is this due to air SDK is not configured or other pbs

i create a methode createPdffile:

public String createPdffile() {
//create the pdf file
PDF pdfFile = PDF.newInstance(Orientation.PORTRAIT, Unit.MM, Size.A4);
pdfFile.addPage();
pdfFile.setTextStyle(RGBColor.newInstance(0x006400));
pdfFile.writeText(15, "Hello World from Air4Gwt");
ByteArray data = pdfFile.save(Method.LOCAL);

//now save the file the file to the desktop

File f = File.getDesktopDirectory().resolvePath("helloWorld.pdf");
FileStream stream = FileStream.newInstance();
stream.open(f, FileMode.WRITE);
stream.getWriter().writeBytes(data);
stream.close();

// open the file
if (HTMLLoader.getPDFCapability().equals(HTMLPDFCapability.STATUS_OK)) {

final NativeWindowInitOptions options = NativeWindowInitOptions.newInstance();
options.setSystemChrome(NativeWindowSystemChrome.STANDARD);
options.setTransparent(false);

URLRequest url = URLRequest.newInstance(f.getURL());

Rectangle rectangle = Rectangle.newInstance(20,
20,
Capabilities.screenResolutionX() / 1.6,
Capabilities.screenResolutionY() / 1.6);
HTMLLoader loader = HTMLLoader.createRootWindow(true, options, true, rectangle);
loader.getStage().getNativeWindow().setTitle(f.getNativePath());
loader.load(url);

}
return "TRUE";
}

this methode must be in the server side or in client side

Thanks Alain

Ekambos
7 Dec 2010, 4:02 AM
Hello,
To keep it honest with you
i dont use NetBeans , so i dont know how to setup an AIR project on NetBeans. But it must be similar to eclipse i guess.
I ll hav a look at it and put a tutorial on the google code site.

You can not debug any code using the AIR API like you would debug your GWT code since there s no(atleast for now) dev mode for AIR. You will need to compile your gwt project and run it inside AIR.
I m working on the dev mode but it s not finisched yet. At my company we are using Runtime.trace("....") and the airIntrospector.js file for now.

The method you created must be on the client side. the PDF generation does not require any server.

Hope this could help
if not feel free to contact me ,
Regards,
Alain.
P.S: maybe you could put your inputs on the google code site so others who have the same issues and does not know this forum can also use this informations.

GXTUser1
7 Dec 2010, 5:00 AM
Hello Alain,
This is imho a really nice contribution to GXT.
The PDF module has really saved us a lot of work on exporting GXTcharts.
And you next releases look promising.
Keep up the good work !

Ekambos
2 Jan 2011, 6:54 PM
Hello there,
I m really glad Gwt4Air could help you :).
Hopefully you guys are also going to like the next features

With the version 2 coming out in few days, i receive a lot of emails asking me what "support for the flex framework" means. Well it simply means that i ll export the flex api to java(GWT), just like i did with the other apis.

The idea of this project started with a discussion with a customer who had a team of java developers and wanted to write flex based AIR applications without going the AS3 way. They asked me if it s possible the export flex to java. The first time i said i dont think so :)
The problem with flex is that the mxml compiler generates a lot of code under the hood. And even if you take a look at the generated code you can not learn much from it because it es really cripted
So i had to find a way to manually load flex. I wont explain how i did it here since the project will be open source anyway :), but after the release one will be able to do something like this(I m stiill working on the API though) :



ExampleButton testButton = new ExampleButton("Adobe Flex Test");
testButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
FlexFrameworkWrapper.get().initFlex(FlexSkin.HALO, true, new FlexInitiaLizationHandler() {
@Override
protected void onInitialization() {
Button b2 = Button.newInstance();
b2.setLabel("I m an sparkButton");
b2.setX(10);
b2.setY(10);
b2.setHeight(40);
Runtime.trace(b2);
Panel panel = Panel.newInstance();
panel.setTitle("Gwt4Air 4 Air Rocks");
com.ekambi.gwt.air.flex.client.mx.controls.Button b = com.ekambi.gwt.air.flex.client.mx.controls.Button.newInstance();
b.setLabel("I m a mxButton");
b.setX(10);
b.setY(60);
b.setHeight(40);

DateChooser dc = DateChooser.newInstance();
dc.setX(148);
dc.setY(10);
panel.addElement(b2.asIVisualElement());
panel.addElement(b.asIVisualElement());
panel.addElement(dc.asIVisualElement());

FlexFrameworkWrapper.get().addChild(panel);
FileSystemDataGrid grid = FileSystemDataGrid.newInstance();

grid.setX(500);
grid.setY(10);
FlexFrameworkWrapper.get().addChild(grid);

com.ekambi.gwt.air.flex.client.mx.containers.Panel mxPanel = com.ekambi.gwt.air.flex.client.mx.containers.Panel.newInstance();
mxPanel.setTitle("FileSystemTree");
mxPanel.setX(10);
mxPanel.setY(350);
mxPanel.setWidth(455);
mxPanel.setHeight(200);

FileSystemTree fileSystemTree = FileSystemTree.newInstance();
mxPanel.addElement(fileSystemTree.asIVisualElement());

FlexFrameworkWrapper.get().addChild(mxPanel);

});

}
});
}
});



you can see the result here :
24057


Like always feedbacks are very welcome.
stay tuned :)

Regards,

Alain

GXTUser1
9 Jan 2011, 10:41 PM
I ve said it already but you are really killing man !
But i do have some questions.
Will the Flex support or the other libraries also be available for browser based applications or is this only for AIR ?
Can we then combine GXT and the other Libraries ?
Is the source code of the app on the last screenshots available ?
Cheers

Ekambos
15 Jan 2011, 10:30 AM
Like the name might suggest, the primary goal of Gwt4Air was to bring the Java(GWT) api to AIR. I was not planing to support web based applications. But since a lot of people are interested in browser support, Gwt4Air will support webapplication in version 3. This means that one will be able to use the Java Language to write flash based webapplications.

Sure you can combine GXT with the other libraries. But i dont think this make sence, specially fror browser based apps. I would suggest to choose one depending on your needs.

Sorry i can not provide the source code of the app, but if you need something special feel free to ask.

Ekambos
9 Feb 2011, 2:40 PM
Hello community,
I m glad to announce the release of gwt4air 2.0
With this relase I added support for the Appcelerator Titanium Desktop Runtime. This runtime enable you to turn you GXT apps into Desktop without rewriting any code. Gwt4Air provides a Java API to access the titanium fonctinality. Unlike Adobe AIR there s no sandbox restriction, so that the use of the Adapter is no needed. In the picture below you can see my GXT running inside titanium as a desktop app.


What s next ?

in the next release the project will introduce a gwt widget that will let you generate PDF and Excel files from the client by adding eventlisterners to it(no server required).
‘The widget will be compatible will the GXT and GWT ones.
Stay tuned

Cheers,

Alain

Ekambos
8 May 2011, 4:10 PM
Here is a small tutorial about using GXT and Adobe AIR together.
Cheers,

Alain

http://code.google.com/p/gwt4air/wiki/GXT