Working version of React integration to GWT
42
GWTReactApp/war/GWTReactApp.css
Normal file
@@ -0,0 +1,42 @@
|
||||
/** Add css rules here for your application. */
|
||||
|
||||
|
||||
/** Example rules used by the template application (remove for your app) */
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
color: #777777;
|
||||
margin: 40px 0px 70px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sendButton {
|
||||
display: block;
|
||||
font-size: 16pt;
|
||||
}
|
||||
|
||||
/** Most GWT widgets already have a style name defined */
|
||||
.gwt-DialogBox {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.dialogVPanel {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.tableCenter {
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
|
||||
.serverResponseLabelError {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.tableCenterRow{
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.largeTextField{
|
||||
font-size: large;
|
||||
}
|
||||
84
GWTReactApp/war/GWTReactApp.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!doctype html>
|
||||
<!-- The DOCTYPE declaration above will set the -->
|
||||
<!-- browser's rendering engine into -->
|
||||
<!-- "Standards Mode". Replacing this declaration -->
|
||||
<!-- with a "Quirks Mode" doctype is not supported. -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<!-- -->
|
||||
<!-- Consider inlining CSS to reduce the number of requested files -->
|
||||
<!-- -->
|
||||
<link type="text/css" rel="stylesheet" href="GWTReactApp.css">
|
||||
|
||||
<!-- -->
|
||||
<!-- Any title is fine -->
|
||||
<!-- -->
|
||||
<title>Web Application Starter Project</title>
|
||||
|
||||
<!-- -->
|
||||
<!-- This script loads your compiled module. -->
|
||||
<!-- If you add any GWT meta tags, they must -->
|
||||
<!-- be added before this line. -->
|
||||
<!-- -->
|
||||
|
||||
</head>
|
||||
|
||||
<!-- -->
|
||||
<!-- The body can have arbitrary html, or -->
|
||||
<!-- you can leave the body empty if you want -->
|
||||
<!-- to create a completely dynamic UI. -->
|
||||
<!-- -->
|
||||
<body>
|
||||
|
||||
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
|
||||
<noscript>
|
||||
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
|
||||
Your web browser must have JavaScript enabled
|
||||
in order for this application to display correctly.
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<div id="gwtAppDiv">
|
||||
<h1>Test application - GWT</h1>
|
||||
<div id="loginFormDiv">
|
||||
<table class="tableCenter" >
|
||||
<tr>
|
||||
<td colspan="2" id="userNameFieldLabel" style="font-size: large;">Username:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="userNameFieldContainer"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" id="passwordFieldLabel" style="font-size: large;">Password:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="passwordFieldContainer"></td>
|
||||
</tr>
|
||||
<tr class="tableCenterRow">
|
||||
<td id="loginButtonContainer"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="loggedInDiv">
|
||||
<table class="tableCenter">
|
||||
<tr>
|
||||
<td colspan="2" id="loggedInUserInfoContainer" style="font-size: large;"></td>
|
||||
</tr>
|
||||
<tr class="tableCenterRow">
|
||||
<td id="goToReactApplicationButtonContainer"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="reactAppDiv">
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" language="javascript" src="gwtreactapp/gwtreactapp.nocache.js"></script>
|
||||
<script src="gwtreactapp/gwt-react-bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
GWTReactApp/war/WEB-INF/classes/.DS_Store
vendored
Normal file
BIN
GWTReactApp/war/WEB-INF/classes/com/.DS_Store
vendored
Normal file
BIN
GWTReactApp/war/WEB-INF/classes/com/gwt/.DS_Store
vendored
Normal file
BIN
GWTReactApp/war/WEB-INF/classes/com/gwt/app/.DS_Store
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
When updating your version of GWT, you should also update this DTD reference,
|
||||
so that your app can take advantage of the latest GWT module capabilities.
|
||||
-->
|
||||
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.1//EN"
|
||||
"http://gwtproject.org/doctype/2.8.1/gwt-module.dtd">
|
||||
<module rename-to='gwtreactapp'>
|
||||
<!-- Inherit the core Web Toolkit stuff. -->
|
||||
<inherits name='com.google.gwt.user.User'/>
|
||||
|
||||
<!-- Inherit the default GWT style sheet. You can change -->
|
||||
<!-- the theme of your GWT application by uncommenting -->
|
||||
<!-- any one of the following lines. -->
|
||||
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
|
||||
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||
|
||||
<!-- Other module inherits -->
|
||||
<inherits name="com.google.gwt.resources.Resources" />
|
||||
<inherits name="gwt.interop.utils.InteropUtils" />
|
||||
<inherits name="gwt.react.React" />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='com.gwt.app.client.GWTReactApp'/>
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client'/>
|
||||
<source path='shared'/>
|
||||
|
||||
<!-- allow Super Dev Mode -->
|
||||
<add-linker name="xsiframe"/>
|
||||
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
|
||||
<set-property name="compiler.useSourceMaps" value="true" />
|
||||
</module>
|
||||
BIN
GWTReactApp/war/WEB-INF/classes/com/gwt/app/client/.DS_Store
vendored
Normal file
BIN
GWTReactApp/war/WEB-INF/classes/com/gwt/app/server/.DS_Store
vendored
Normal file
24
GWTReactApp/war/WEB-INF/web.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
version="2.5"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee">
|
||||
|
||||
<!-- Servlets -->
|
||||
<servlet>
|
||||
<servlet-name>LoginServiceImpl</servlet-name>
|
||||
<servlet-class>com.gwt.app.server.LoginServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>LoginServiceImpl</servlet-name>
|
||||
<url-pattern>/gwtreactapp/login</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- Default page to serve -->
|
||||
<welcome-file-list>
|
||||
<welcome-file>GWTReactApp.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
||||
BIN
GWTReactApp/war/favicon.ico
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,11 @@
|
||||
@FinalFields, false
|
||||
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533
|
||||
com.google.gwt.user.client.rpc.RpcTokenException, true, true, false, false, com.google.gwt.user.client.rpc.RpcTokenException/2345075298, 2345075298
|
||||
com.google.gwt.user.client.rpc.XsrfToken, false, false, true, true, com.google.gwt.user.client.rpc.XsrfToken/4254043109, 4254043109
|
||||
com.gwt.app.client.GreetingService, false, false, false, false, _, 1638119995
|
||||
java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873
|
||||
java.lang.IllegalArgumentException, true, true, false, false, java.lang.IllegalArgumentException/1755012560, 1755012560
|
||||
java.lang.NumberFormatException, true, true, false, false, java.lang.NumberFormatException/3305228476, 3305228476
|
||||
java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647
|
||||
java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611
|
||||
java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131
|
||||
@@ -0,0 +1,10 @@
|
||||
@FinalFields, false
|
||||
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException, true, true, true, true, com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533, 3936916533
|
||||
com.google.gwt.user.client.rpc.RpcTokenException, true, true, false, false, com.google.gwt.user.client.rpc.RpcTokenException/2345075298, 2345075298
|
||||
com.google.gwt.user.client.rpc.XsrfToken, false, false, true, true, com.google.gwt.user.client.rpc.XsrfToken/4254043109, 4254043109
|
||||
com.gwt.app.client.LoginService, false, false, false, false, _, 2875975256
|
||||
com.gwt.app.shared.UserDTO, true, true, false, false, com.gwt.app.shared.UserDTO/3966925806, 3966925806
|
||||
java.lang.Exception, true, false, true, false, java.lang.Exception/1920171873, 1920171873
|
||||
java.lang.RuntimeException, true, false, true, false, java.lang.RuntimeException/515124647, 515124647
|
||||
java.lang.String, true, true, true, true, java.lang.String/2004016611, 2004016611
|
||||
java.lang.Throwable, true, false, true, false, java.lang.Throwable/2953622131, 2953622131
|
||||
BIN
GWTReactApp/war/gwtreactapp/clear.cache.gif
Normal file
|
After Width: | Height: | Size: 43 B |
8225
GWTReactApp/war/gwtreactapp/gwt-react-bundle.js
Normal file
29
GWTReactApp/war/gwtreactapp/gwt-react-bundle.min.js
vendored
Normal file
1121
GWTReactApp/war/gwtreactapp/gwt/clean/clean.css
Normal file
1122
GWTReactApp/war/gwtreactapp/gwt/clean/clean_rtl.css
Normal file
BIN
GWTReactApp/war/gwtreactapp/gwt/clean/images/circles.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
GWTReactApp/war/gwtreactapp/gwt/clean/images/corner.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
GWTReactApp/war/gwtreactapp/gwt/clean/images/hborder.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
GWTReactApp/war/gwtreactapp/gwt/clean/images/thumb_horz.png
Normal file
|
After Width: | Height: | Size: 222 B |
BIN
GWTReactApp/war/gwtreactapp/gwt/clean/images/thumb_vertical.png
Normal file
|
After Width: | Height: | Size: 231 B |
BIN
GWTReactApp/war/gwtreactapp/gwt/clean/images/vborder.png
Normal file
|
After Width: | Height: | Size: 298 B |
67
GWTReactApp/war/gwtreactapp/gwtreactapp.nocache.js
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2014 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This startup script is used when we run superdevmode from an app server.
|
||||
*/
|
||||
(function($wnd, $doc){
|
||||
// document.head does not exist in IE8
|
||||
var $head = $doc.head || $doc.getElementsByTagName('head')[0];
|
||||
// Compute some codeserver urls so as the user does not need bookmarklets
|
||||
var hostName = $wnd.location.hostname;
|
||||
var serverUrl = 'http://' + hostName + ':9876';
|
||||
var module = 'gwtreactapp';
|
||||
var nocacheUrl = serverUrl + '/recompile-requester/' + module;
|
||||
|
||||
// Insert the superdevmode nocache script in the first position of the head
|
||||
var devModeScript = $doc.createElement('script');
|
||||
devModeScript.src = nocacheUrl;
|
||||
|
||||
// Everybody except IE8 does fire an error event
|
||||
// This means that we do not detect a non running SDM with IE8.
|
||||
if (devModeScript.addEventListener) {
|
||||
var callback = function() {
|
||||
// Don't show the confirmation dialogue twice (multimodule)
|
||||
if (!$wnd.__gwt__sdm__confirmed &&
|
||||
(!$wnd.__gwt_sdm__recompiler || !$wnd.__gwt_sdm__recompiler.loaded)) {
|
||||
$wnd.__gwt__sdm__confirmed = true;
|
||||
if ($wnd.confirm(
|
||||
"Couldn't load " + module + " from Super Dev Mode\n" +
|
||||
"server at " + serverUrl + ".\n" +
|
||||
"Please make sure this server is ready.\n" +
|
||||
"Do you want to try again?")) {
|
||||
$wnd.location.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
devModeScript.addEventListener("error", callback, true);
|
||||
}
|
||||
|
||||
var injectScriptTag = function(){
|
||||
$head.insertBefore(devModeScript, $head.firstElementChild || $head.children[0]);
|
||||
};
|
||||
|
||||
if (/loaded|complete/.test($doc.readyState)) {
|
||||
injectScriptTag();
|
||||
} else {
|
||||
//defer app script insertion until the body is ready
|
||||
if($wnd.addEventListener){
|
||||
$wnd.addEventListener('load', injectScriptTag, false);
|
||||
} else{
|
||||
$wnd.attachEvent('onload', injectScriptTag);
|
||||
}
|
||||
}
|
||||
})(window, document);
|
||||