diff --git a/Doc/Sda1/jdbc.xml b/Doc/Sda1/jdbc.xml index 62268ab5606dcfac8172c83503e0e2dc40556dc3..6acdfa08c8e147080c8d42ee1daea59f6f7f919d 100644 --- a/Doc/Sda1/jdbc.xml +++ b/Doc/Sda1/jdbc.xml @@ -1120,7 +1120,7 @@ public class SimpleInsert { </qandaset> </section> - <section xml:id="sectSimpleInsertGui"> + <section xml:id="sda1SectSimpleInsertGui"> <title>A first GUI sketch</title> <para>So far all data records being written to the database server by @@ -1150,16 +1150,35 @@ public class SimpleInsert { <para>Based on your existing JavaFX GUI experience the subsequent GUI employs the <link xlink:href="https://vaadin.com/book/-/page">Vaadin - application framework</link>.</para> + application framework</link>. Suggested reading:</para> - <qandaset defaultlabel="qanda" xml:id="quandaentry_GuiDb"> + <itemizedlist> + <listitem> + <para><link + xlink:href="https://vaadin.com/book/vaadin7/-/page/application.html">Writing + a Server-Side Web Application</link></para> + </listitem> + + <listitem> + <para><link xlink:href="https://vaadin.com/maven">Creating a maven + based Vaadin project.</link></para> + </listitem> + + <listitem> + <para><link + xlink:href="https://vaadin.com/book/-/page/application.notifications.html">Notifications</link></para> + </listitem> + </itemizedlist> + + <qandaset defaultlabel="qanda" xml:id="sda1QandaSimpleInsertGui"> <title>GUI for inserting Person data to a database server</title> <qandadiv> <qandaentry> <question> - <para>Write a WEB GUI application as being outlined in <xref - linkend="simpleInsertGui"/>. You may proceed as follows:</para> + <para>Write a WEB GUI based application as being outlined in + <xref linkend="simpleInsertGui"/>. You may proceed as + follows:</para> <orderedlist> <listitem> @@ -1175,17 +1194,19 @@ public class SimpleInsert { button. Return this string to the user as being shown in the message window of <xref linkend="simpleInsertGui"/>.</para> - <para>At this point you still do not need a database - connection. The message shown to the user is just a fake, so - the GUI <emphasis role="bold">appears</emphasis> to be + <para>You do not (yet) need a database connection. The + message shown to the user is just a mock up making the GUI + <emphasis role="bold">appear</emphasis> to be working.</para> </listitem> <listitem> <para>Establish a <classname>java.sql.Connection</classname> - and create a <classname>java.sql.Statement</classname> - instance when launching your application. Use the latter in - your <classname>java.awt.event.ActionListener</classname> to + to your favourite database server (providing a suitable + table) and create a + <classname>java.sql.Statement</classname> instance when + launching your application. Use the latter in your + <classname>java.awt.event.ActionListener</classname> to actually insert datasets into your database.</para> </listitem> @@ -1198,10 +1219,12 @@ public class SimpleInsert { </question> <answer> - <para>The complete implementation resides in - <classname>P/Sda1/InsertGui/V2</classname>. The included - README.md contains hints with respect to starting this - application.</para> + <annotation role="make"> + <para role="eclipse">P/Sda1/InsertGui/V2</para> + </annotation> + + <para>The included README.md contains hints with respect to + starting this application.</para> <para>Notice the separation of problem related messages:</para> @@ -1222,7 +1245,9 @@ public class SimpleInsert { <callout arearefs="sda1JdbcMsgEnduserProgrammer-2-co" xml:id="sda1JdbcMsgEnduserProgrammer-2"> - <para>Detailed message to the application developer.</para> + <para>Detailed message to the application developer being + directed to the log file <filename>A1.log</filename> as + being configured in <filename>log4j2.xml</filename>. </para> </callout> </calloutlist> </answer> @@ -1231,6 +1256,74 @@ public class SimpleInsert { </qandaset> </section> + <section xml:id="sda1SectSimpleInsertGuiErrorHandling"> + <title>Input validation and error handling</title> + + <qandaset defaultlabel="qanda" + xml:id="sda1QandaSimpleInsertGuiErrorHandling"> + <qandadiv> + <qandaentry> + <question> + <para>The solution of <xref linkend="sda1QandaSimpleInsertGui"/> + does have deficiencies:</para> + + <orderedlist> + <listitem> + <para>There is no input data validation. Even if both fields + remain blank hitting Insert will still trigger a database + <code>INSERT INTO Person VALUES('', '')</code> + attempt.</para> + + <tip> + <para>Read about <link + xlink:href="https://vaadin.com/book/vaadin7/-/page/components.fields.html#components.fields.validation">input + field valuators</link>. Then use <methodname + xlink:href="https://vaadin.com/api/com/vaadin/ui/Component.html#setEnabled(boolean)">setEnabled(...)</methodname> + to activate and de-activate the <code>Insert</code> button + accordingly.</para> + </tip> + </listitem> + + <listitem> + <para>Trying to insert a second record having identical + email address will fail due to a primary key violation. This + exception type should be explained to the end user in a + meaningful fashion.</para> + + <tip> + <para>There are various ways to deal with this problem. + Analyzing the precise type of SQLException allows for + distinguishing primary key constraint violations from + other problem types like e.g. database (link layer) + communication failures. Examine the instance's precise + exception class. Then modify your <code>try {} catch + {}</code> code.</para> + </tip> + </listitem> + </orderedlist> + </question> + + <answer> + <annotation role="make"> + <para role="eclipse">P/Sda1/InsertGui/V4</para> + </annotation> + + <para>Creating appropriate primary key violation messages will + only work for databases of type + <productname>Mysql</productname>. Other database type require + different classes.</para> + + <para>A more general way to deal with this problem is trying to + <code>SELECT</code> a dataset having the email address in + question. If the result is non-empty the INSERT will not happen + thus avoiding the attempt in the first place rather than giving + rise to an exception.</para> + </answer> + </qandaentry> + </qandadiv> + </qandaset> + </section> + <section xml:id="jdbcExceptions"> <title>Handling possible exceptions</title> diff --git a/P/Sda1/InsertGui/V4/.gitignore b/P/Sda1/InsertGui/V4/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..c761c2a942224cfaf1bb828ca7fe53c6def3f153 --- /dev/null +++ b/P/Sda1/InsertGui/V4/.gitignore @@ -0,0 +1,6 @@ +/target/ +/.settings/ +src/main/webapp/VAADIN/themes/mytheme/styles.scss.cache +A1.log +.classpath +.project diff --git a/P/Sda1/InsertGui/V4/README.md b/P/Sda1/InsertGui/V4/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9c49b3ff962cf92d5198bb8f8eb0394ac2e8454d --- /dev/null +++ b/P/Sda1/InsertGui/V4/README.md @@ -0,0 +1,37 @@ +addressinsert +============== + +Inserting address records into a relational database. + +Workflow +======== + +To compile the entire project, run "mvn install". +To run the application, run "mvn jetty:run" and open http://localhost:8080/ . + +To develop the theme, simply update the relevant theme files and reload the application. +Pre-compiling a theme eliminates automatic theme updates at runtime - see below for more information. + +Debugging client side code + - run "mvn vaadin:run-codeserver" on a separate console while the application is running + - activate Super Dev Mode in the debug window of the application + +To produce a deployable production mode WAR: +- change productionMode to true in the servlet class configuration (nested in the UI class) +- run "mvn clean vaadin:compile-theme package" + - See below for more information. Running "mvn clean" removes the pre-compiled theme. +- test with "mvn jetty:run-war + +Using a precompiled theme +------------------------- + +When developing the application, Vaadin can compile the theme on the fly when needed, +or the theme can be precompiled to speed up page loads. + +To precompile the theme run "mvn vaadin:compile-theme". Note, though, that once +the theme has been precompiled, any theme changes will not be visible until the +next theme compilation or running the "mvn clean" target. + +When developing the theme, running the application in the "run" mode (rather than +in "debug") in the IDE can speed up consecutive on-the-fly theme compilations +significantly. diff --git a/P/Sda1/InsertGui/V4/Schema/schema.sql b/P/Sda1/InsertGui/V4/Schema/schema.sql new file mode 100644 index 0000000000000000000000000000000000000000..327a0f5ea7e0ed01a24e5ceb86bf2aa646a2f5da --- /dev/null +++ b/P/Sda1/InsertGui/V4/Schema/schema.sql @@ -0,0 +1,7 @@ +CREATE TABLE Person ( + name CHAR(20) NOT NULL, + email CHAR(20) PRIMARY KEY + +); + +SELECT * FROM Person; \ No newline at end of file diff --git a/P/Sda1/InsertGui/V4/pom.xml b/P/Sda1/InsertGui/V4/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..4f730bcd8af87ee5c697a2412f7f07c49f3306c6 --- /dev/null +++ b/P/Sda1/InsertGui/V4/pom.xml @@ -0,0 +1,215 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>de.hdm-stuttgart.mi</groupId> + <artifactId>lecturenotes-pom</artifactId> + <version>1.0</version> + <relativePath>../../../pom.xml</relativePath> + </parent> + + <groupId>de.hdm_stuttgart.mi</groupId> + <artifactId>addressinsert</artifactId> + <packaging>war</packaging> + <version>4.0</version> + <name>addressinsert</name> + + <properties> + <vaadin.version>7.5.7</vaadin.version> + <vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version> + <jetty.plugin.version>9.2.3.v20140905</jetty.plugin.version> + <project.source.version>1.8</project.source.version> + <project.target.version>1.8</project.target.version> + <project.encoding>UTF-8</project.encoding> + </properties> + + <repositories> + <repository> + <id>vaadin-addons</id> + <url>http://maven.vaadin.com/vaadin-addons</url> + </repository> + <repository> + <id>vaadin-snapshots</id> + <url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-bom</artifactId> + <version>${vaadin.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + <version>3.0.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-server</artifactId> + </dependency> + <dependency> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-push</artifactId> + </dependency> + <dependency> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-client</artifactId> + <scope>provided</scope> + </dependency> + <!-- Needed when using the widgetset optimizer (custom ConnectorBundleLoaderFactory). + For widgetset compilation, vaadin-client-compiler is automatically added + on the compilation classpath by vaadin-maven-plugin so normally there is + no need for an explicit dependency. --> + <!-- <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiler</artifactId> + <scope>provided</scope> </dependency> --> + <dependency> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-themes</artifactId> + </dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>5.1.35</version> + </dependency> + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + <configuration> + <encoding>${project.encoding}</encoding> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>2.3</version> + <configuration> + <failOnMissingWebXml>false</failOnMissingWebXml> + <!-- Exclude some unnecessary files generated by the GWT compiler. --> + <packagingExcludes>WEB-INF/classes/VAADIN/gwt-unitCache/**, + WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes> + </configuration> + </plugin> + <plugin> + <groupId>com.vaadin</groupId> + <artifactId>vaadin-maven-plugin</artifactId> + <version>${vaadin.plugin.version}</version> + <configuration> + <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs> + <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory> + <draftCompile>false</draftCompile> + <compileReport>false</compileReport> + <style>OBF</style> + <strict>true</strict> + </configuration> + <executions> + <execution> + <goals> + <goal>update-theme</goal> + <goal>update-widgetset</goal> + <goal>compile</goal> + <!-- disabled by default to use on-the-fly theme compilation --> + <!-- <goal>compile-theme</goal> --> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.4</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>2.6.1</version> + <!-- Clean up also any pre-compiled themes --> + <configuration> + <filesets> + <fileset> + <directory>src/main/webapp/VAADIN/themes</directory> + <includes> + <include>**/styles.css</include> + <include>**/styles.scss.cache</include> + </includes> + </fileset> + </filesets> + </configuration> + </plugin> + + <!-- The Jetty plugin allows us to easily test the development build by + running jetty:run on the command line. --> + <plugin> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-maven-plugin</artifactId> + <version>${jetty.plugin.version}</version> + <configuration> + <scanIntervalSeconds>2</scanIntervalSeconds> + </configuration> + </plugin> + </plugins> + + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings + only. It has no influence on the Maven build itself. --> + <!-- TODO Remove when http://dev.vaadin.com/ticket/14924 is resolved --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>com.vaadin</groupId> + <artifactId> + vaadin-maven-plugin + </artifactId> + <versionRange>[7.1.11,)</versionRange> + <goals> + <goal>resources</goal> + <goal>update-widgetset</goal> + <goal>compile</goal> + <goal>compile-theme</goal> + <goal>update-theme</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore></ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + + </build> + +</project> diff --git a/P/Sda1/InsertGui/V4/src/main/java/de/hdm_stuttgart/mi/LoginUI.java b/P/Sda1/InsertGui/V4/src/main/java/de/hdm_stuttgart/mi/LoginUI.java new file mode 100644 index 0000000000000000000000000000000000000000..a81e57eab3a29c2a70fba1cd230876c45444be1b --- /dev/null +++ b/P/Sda1/InsertGui/V4/src/main/java/de/hdm_stuttgart/mi/LoginUI.java @@ -0,0 +1,134 @@ +package de.hdm_stuttgart.mi; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.sql.Statement; + +import javax.servlet.annotation.WebServlet; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException; +import com.vaadin.annotations.Theme; +import com.vaadin.annotations.VaadinServletConfiguration; +import com.vaadin.annotations.Widgetset; +import com.vaadin.data.validator.EmailValidator; +import com.vaadin.server.VaadinRequest; +import com.vaadin.server.VaadinServlet; +import com.vaadin.server.ClientConnector.DetachListener; +import com.vaadin.ui.Button; +import com.vaadin.ui.GridLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.Notification; +import com.vaadin.ui.TextField; +import com.vaadin.ui.UI; + +@Theme("mytheme") +@Widgetset("de.hdm_stuttgart.mi.MyAppWidgetset") +public class LoginUI extends UI implements DetachListener { + + private static final long serialVersionUID = 9013400739498375365L; + + private static Logger log = LogManager.getLogger(LoginUI.class); + + Statement stmt; + + private final TextField + nameField = new TextField(), + emailField = new TextField(); + + private Button + insertButton = new Button("Insert"); + + public LoginUI () { + final String jdbcUrl = "jdbc:mysql://localhost:3306/hdm"; + try { + final Connection conn = DriverManager.getConnection( + jdbcUrl, "hdmuser", "XYZ"); + stmt = conn.createStatement(); + } catch (SQLException ex) { + log.error("Unable to connect to database using '" + jdbcUrl + "':", ex); + stmt = null; + } + } + + @Override + public void detach(DetachEvent event) { + if (null != stmt) { + try { + stmt.getConnection().close(); + } catch (final SQLException ex) { + log.error("Unable to disconnect from database:", ex); + } + stmt = null; + } + } + + void conditionallyActivateInsertButton() { + final boolean isValid = + 0 < nameField.getValue().trim().length() && + 0 < emailField.getValue().trim().length() && + emailField.isValid(); + + insertButton.setEnabled(isValid); + } + + @Override + protected void init(final VaadinRequest vaadinRequest) { + + final GridLayout layout = new GridLayout(2, 3); + layout.setMargin(true); + setContent(layout); + + + if (null == stmt) { // Database access failed? No hope ... + layout.addComponent(new Label("Unable to connect to database server, see log for details"), 0, 0); + return; + } + // Assembling GUI components + layout.addComponent(new Label("Name:"), 0, 0); + layout.addComponent(nameField, 1, 0); + + layout.addComponent(new Label("Email:"), 0, 1); + layout.addComponent(emailField, 1, 1); + + layout.addComponent(insertButton, 1, 2); + + // Inserting requires valid user input. + insertButton.setEnabled(false); + + // Caveat: Vaadin's validator will refuse e.g. "domainregistry@de" + // and may generally be non-RFC compliant. + emailField.addValidator(new EmailValidator("Not a valid email")); + + // Check for global user input validity + nameField.addValueChangeListener(event -> conditionallyActivateInsertButton()); + emailField.addValueChangeListener(event -> conditionallyActivateInsertButton()); + + insertButton.addClickListener(event -> { + final String sql = "INSERT INTO Person VALUES('" + nameField.getValue() + "', '" + + emailField.getValue() + "')"; + try { + final int updateCount = stmt.executeUpdate(sql); + emailField.clear(); + nameField.clear(); + Notification.show("Successfully executed \n'" + sql + "'\ninserting " + + updateCount + " dataset"); + + } catch (final MySQLIntegrityConstraintViolationException ex) {// Duplicate email? + Notification.show("E-Mail already in database", Notification.Type.ERROR_MESSAGE); + } catch(final SQLException ex) {// Other SQL problems + Notification.show("Failed to insert record, see log for details", Notification.Type.ERROR_MESSAGE); + log.error("JDBC exception on data insert:", ex); + } + }); + } + + @WebServlet(urlPatterns = "/*", name = "LoginUIServlet", asyncSupported = true) + @VaadinServletConfiguration(ui = LoginUI.class, productionMode = false) + public static class LoginUIServlet extends VaadinServlet { + private static final long serialVersionUID = -8657597788907698974L; + } +} diff --git a/P/Sda1/InsertGui/V4/src/main/resources/de/hdm_stuttgart/mi/MyAppWidgetset.gwt.xml b/P/Sda1/InsertGui/V4/src/main/resources/de/hdm_stuttgart/mi/MyAppWidgetset.gwt.xml new file mode 100644 index 0000000000000000000000000000000000000000..763aa41e875c8cb9f06805d0de49ee09e2c72cdf --- /dev/null +++ b/P/Sda1/InsertGui/V4/src/main/resources/de/hdm_stuttgart/mi/MyAppWidgetset.gwt.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" + "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd"> +<module> + <inherits name="com.vaadin.DefaultWidgetSet"/> +</module> diff --git a/P/Sda1/InsertGui/V4/src/main/resources/log4j2.xml b/P/Sda1/InsertGui/V4/src/main/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..436cd31a91ff33f1d6088b9cb32e478558a969f7 --- /dev/null +++ b/P/Sda1/InsertGui/V4/src/main/resources/log4j2.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration> + + <Appenders> + + <File name="A1" fileName="A1.log" append="false"> + <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> + </File> + <Console name="STDOUT" target="SYSTEM_OUT"> + <PatternLayout pattern="%C{2} (%F:%L) - %m%n"/> + </Console> + </Appenders> + <Loggers> + + <!-- You my want to define class or package level per-logger rules --> + <Logger name="de.hdm_stuttgart.mi.sda1.xmlstatistics.App" level="info"> + <AppenderRef ref="STDOUT"/> + </Logger> + <Root level="info"> + <AppenderRef ref="STDOUT"/> + <AppenderRef ref="A1"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/addons.scss b/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/addons.scss new file mode 100644 index 0000000000000000000000000000000000000000..a5670b70c7eabbe8cf233f10dc9bfeb2fac29f41 --- /dev/null +++ b/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/addons.scss @@ -0,0 +1,7 @@ +/* This file is automatically managed and will be overwritten from time to time. */ +/* Do not manually edit this file. */ + +/* Import and include this mixin into your project theme to include the addon themes */ +@mixin addons { +} + diff --git a/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/favicon.ico b/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..ffb34a65c73eb1b3d59dcbb8f18ec78a8b0fc767 Binary files /dev/null and b/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/favicon.ico differ diff --git a/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/mytheme.scss b/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/mytheme.scss new file mode 100644 index 0000000000000000000000000000000000000000..c6aa865f29e4eefba17a1b5e5735c665d4ba87c2 --- /dev/null +++ b/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/mytheme.scss @@ -0,0 +1,36 @@ +// Global variable overrides. Must be declared before importing Valo. + +// Defines the plaintext font size, weight and family. Font size affects general component sizing. +//$v-font-size: 16px; +//$v-font-weight: 300; +//$v-font-family: "Open Sans", sans-serif; + +// Defines the border used by all components. +//$v-border: 1px solid (v-shade 0.7); +//$v-border-radius: 4px; + +// Affects the color of some component elements, e.g Button, Panel title, etc +//$v-background-color: hsl(210, 0%, 98%); +// Affects the color of content areas, e.g Panel and Window content, TextField input etc +//$v-app-background-color: $v-background-color; + +// Affects the visual appearance of all components +//$v-gradient: v-linear 8%; +//$v-bevel-depth: 30%; +//$v-shadow-opacity: 5%; + +// Defines colors for indicating status (focus, success, failure) +//$v-focus-color: valo-focus-color(); // Calculates a suitable color automatically +//$v-friendly-color: #2c9720; +//$v-error-indicator-color: #ed473b; + +// For more information, see: https://vaadin.com/book/-/page/themes.valo.html +// Example variants can be copy/pasted from https://vaadin.com/wiki/-/wiki/Main/Valo+Examples + +@import "../valo/valo.scss"; + +@mixin mytheme { + @include valo; + + // Insert your own theme rules here +} diff --git a/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/styles.scss b/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/styles.scss new file mode 100644 index 0000000000000000000000000000000000000000..bba1d493c0c0dad0be8dae040a2007535c8720ad --- /dev/null +++ b/P/Sda1/InsertGui/V4/src/main/webapp/VAADIN/themes/mytheme/styles.scss @@ -0,0 +1,11 @@ +@import "mytheme.scss"; +@import "addons.scss"; + +// This file prefixes all rules with the theme name to avoid causing conflicts with other themes. +// The actual styles should be defined in mytheme.scss + +.mytheme { + @include addons; + @include mytheme; + +} diff --git a/P/pom.xml b/P/pom.xml index 5c2bdc6527621eba13a1cd7762ee39994cf66c95..2f8402e93651ec5597ef0fed7ff038017178eba0 100644 --- a/P/pom.xml +++ b/P/pom.xml @@ -115,6 +115,9 @@ <module>Sda1/catalog2rdbms</module> <module>Sda1/catalog2rdbmsPrepare</module> + <module>Sda1/InsertGui/V2</module> + <module>Sda1/InsertGui/V4</module> + <module>Sda1/Jpa/HibernateStandalone</module> <module>Sda1/NoCast</module>