This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 563fcd766efe appbundler/src/com/oracle/appbundler/AppBundlerTask.java | |
--- a/appbundler/src/com/oracle/appbundler/AppBundlerTask.java Wed Sep 19 17:54:08 2012 +0100 | |
+++ b/appbundler/src/com/oracle/appbundler/AppBundlerTask.java Tue Jan 22 13:31:11 2013 -0800 | |
@@ -577,7 +577,16 @@ | |
xout.writeEndElement(); | |
xout.writeCharacters("\n"); | |
- | |
+ | |
+ // Write Environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Camera Example</title> | |
</head> | |
<body> | |
<div> | |
<button id="capture">Capture</button> | |
</div> | |
<div id="results"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Form hi = new Form("Hi World"); | |
final WebBrowser b = new WebBrowser(){ | |
@Override | |
public void onLoad(String url) { | |
final BrowserComponent c = (BrowserComponent)this.getInternal(); | |
// Create a Javascript context for this BrowserComponent | |
final JavascriptContext ctx = new JavascriptContext(c);] | |
// Create a new Javascript object "camera" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testLoadJSONViaWebBrowserWJSONParse(){ | |
final WebBrowser b = new WebBrowser(){ | |
@Override | |
public void onLoad(String url) { | |
BrowserComponent c = (BrowserComponent)this.getInternal(); | |
JavascriptContext ctx = new JavascriptContext(c); | |
JSObject response = (JSObject)ctx.get("JSON.parse(document.body.textContent)"); | |
String version = response.getString("version"); | |
String title = response.getString("feed.title.$t"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testLoadJSONUsingJSONParser(){ | |
ConnectionRequest req = new ConnectionRequest(){ | |
@Override | |
protected void readResponse(InputStream input) throws IOException { | |
//super.readResponse(input); | |
InputStreamReader reader = new InputStreamReader(input); | |
JSONParser parser = new JSONParser(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testLoadJSONUsingConnectionRequestAndJS(){ | |
ConnectionRequest req = new ConnectionRequest(){ | |
@Override | |
protected void readResponse(InputStream input) throws IOException { | |
//super.readResponse(input); | |
ByteArrayOutputStream bos = new ByteArrayOutputStream(); | |
Util.copy(input, bos); | |
final String jsonContentStr = new String(bos.toByteArray()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testLoadJSONViaWebBrowserWJSONParser(){ | |
final WebBrowser b = new WebBrowser(){ | |
@Override | |
public void onLoad(String url) { | |
BrowserComponent c = (BrowserComponent)this.getInternal(); | |
JavascriptContext ctx = new JavascriptContext(c); | |
String responseString = (String)ctx.get("document.body.textContent"); | |
byte[] responseBytes = responseString.getBytes(); | |
ByteArrayInputStream bais = new ByteArrayInputStream(responseBytes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void start(){ | |
Form hi = new Form("Google Direction Service"); | |
final GoogleMap map = new GoogleMap(); | |
hi.setLayout(new BorderLayout()); | |
final TextField start = new TextField(); | |
start.setHint("Start location"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function beforeHandleRequest(){ | |
Dataface_Application::getInstance() | |
->addHeadContent( | |
sprintf('<link rel="stylesheet" type="text/css" href="%s"/>', | |
htmlspecialchars(DATAFACE_SITE_URL.'/style.css') | |
) | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#xf-logo { | |
background-image: url(images/custom-logo.png); | |
height: 75px; | |
} |