GWTMobile working steps:
step:1. create the GWT normal Web application using eclipse.
step:2. add the following tags in the .gwt.xml file
and then add the jar files in the classpath
gwtmobile-1.1.jar , org.restlet.jar (download gwtmobile-kitchensink.1.1.zip
from https://github.com/dennisjzh/GwtMobile/downloads ),
gwt-html5-database.jar(download from
http://code.google.com/p/gwt-mobile- webkit/downloads/detail?name=gwt-html5-database-1.5.1.tar.gz)
//for gwtmobile widgets designer
<inherits name='com.gwtmobile.ui.gwtmobile_ui' />
//for gwtmobile phonegap events and features
<inherits name='com.gwtmobile.phonegap.gwtmobile_phonegap' />
//for database connection using html5
<inherits name="com.google.code.gwt.database.Html5Database" />
<inherits name='org.restlet.Restlet' />
step.3. Add the Page extended class on entrypoint class
ex: MainPage is class extends Page(com.gwtmobile.ui.client.page.Page)
public void onModuleLoad() {
MainPage page;
new Timer()
{
@Override
public void run() {
if(page==null)
{
page=new MainPage();
Page.load(page);
}else
this.cancel();
}
}.scheduleRepeating(50);
}
step:4. If you are using uiBinder (xml) designing
then right click on client package select new -->UiBinder
take classname.
then change the extended class of Composite to Page in .java file
step:5. Open the .ui.xml file in designing mode and design the page
step:6. In war folder
paste the bluetooth.js,childbrowser.js,phonegap-1.0.0.js (from gwtmobile-kitchensink.1.1.zip)
and add the following code in the .html file
<script type="text/javascript" language="javascript" src="phonegap-1.0.0.js"></script>
<script type="text/javascript" language="javascript" src="bluetooth.js"></script>
<script type="text/javascript" language="javascript" src="childbrowser.js"></script>
step:7. For compile the project
right click on project and select Google-->GWT Compile
step:8. Then take the following files from the war
all files and folder other than the WEB-INT folder
step:9. Use that code as html files in phonegap applications.
prabhu gade,
kumarprabhug@gmail.com
step:1. create the GWT normal Web application using eclipse.
step:2. add the following tags in the .gwt.xml file
and then add the jar files in the classpath
gwtmobile-1.1.jar , org.restlet.jar (download gwtmobile-kitchensink.1.1.zip
from https://github.com/dennisjzh/GwtMobile/downloads ),
gwt-html5-database.jar(download from
http://code.google.com/p/gwt-mobile- webkit/downloads/detail?name=gwt-html5-database-1.5.1.tar.gz)
//for gwtmobile widgets designer
<inherits name='com.gwtmobile.ui.gwtmobile_ui' />
//for gwtmobile phonegap events and features
<inherits name='com.gwtmobile.phonegap.gwtmobile_phonegap' />
//for database connection using html5
<inherits name="com.google.code.gwt.database.Html5Database" />
<inherits name='org.restlet.Restlet' />
step.3. Add the Page extended class on entrypoint class
ex: MainPage is class extends Page(com.gwtmobile.ui.client.page.Page)
public void onModuleLoad() {
MainPage page;
new Timer()
{
@Override
public void run() {
if(page==null)
{
page=new MainPage();
Page.load(page);
}else
this.cancel();
}
}.scheduleRepeating(50);
}
step:4. If you are using uiBinder (xml) designing
then right click on client package select new -->UiBinder
take classname.
then change the extended class of Composite to Page in .java file
step:5. Open the .ui.xml file in designing mode and design the page
step:6. In war folder
paste the bluetooth.js,childbrowser.js,phonegap-1.0.0.js (from gwtmobile-kitchensink.1.1.zip)
and add the following code in the .html file
<script type="text/javascript" language="javascript" src="phonegap-1.0.0.js"></script>
<script type="text/javascript" language="javascript" src="bluetooth.js"></script>
<script type="text/javascript" language="javascript" src="childbrowser.js"></script>
step:7. For compile the project
right click on project and select Google-->GWT Compile
step:8. Then take the following files from the war
all files and folder other than the WEB-INT folder
step:9. Use that code as html files in phonegap applications.
prabhu gade,
kumarprabhug@gmail.com
0 comments:
Post a Comment