[jbosstools-issues] [JBoss JIRA] (JBIDE-17012) CordovaSim: Storage API doesn't work with javaFx web engine
Ilya Buziuk (JIRA)
issues at jboss.org
Mon May 26 09:55:57 EDT 2014
[ https://issues.jboss.org/browse/JBIDE-17012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970472#comment-12970472 ]
Ilya Buziuk commented on JBIDE-17012:
-------------------------------------
*NOTE:* Storage API will work with javaFx only for JDK 8. It's based on *local storage* which is not supported in JDK 7 - https://javafx-jira.kenai.com/browse/RT-29584
Steps to verify:
1. Create new Hybrid project
2. Change index.html
{code:title=index.html|borderStyle=solid}
<!DOCTYPE html>
<html>
<head>
<title>Contact Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for PhoneGap to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// PhoneGap is ready
//
function onDeviceReady() {
var db = window.openDatabase("Database", "1.0", "PhoneGap Demo", 200000);
db.transaction(populateDB, errorCB, successCB);
}
// Populate the database
//
function populateDB(tx) {
tx.executeSql('DROP TABLE IF EXISTS DEMO');
tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
}
// Transaction error callback
//
function errorCB(tx, err) {
alert("Error processing SQL: "+err);
}
// Transaction success callback
//
function successCB() {
alert("success!");
}
</script>
</head>
<body>
<h1>Example</h1>
<p>Database</p>
</body>
</html>
{code}
3. Run project via CordovaSim against JDK 8
4. Switch web-engine to javaFx if needed
5. *Success* alert should appear
> CordovaSim: Storage API doesn't work with javaFx web engine
> -----------------------------------------------------------
>
> Key: JBIDE-17012
> URL: https://issues.jboss.org/browse/JBIDE-17012
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim
> Affects Versions: 4.2.0.Beta1
> Reporter: Ilya Buziuk
> Assignee: Ilya Buziuk
> Fix For: 4.2.0.Beta2
>
> Attachments: Storage.png
>
>
> [Storage API |http://docs.phonegap.com/en/3.4.0/cordova_storage_storage.md.html#Storage] doesn't work with javafx web engine !Storage.png|thumbnail!
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
More information about the jbosstools-issues
mailing list