QuickTickets Demo Source

Hmm, the source files should be UTF-8, so check that you’re using that also, and that the browser is interpreting the HTML source as UTF-8 as well. That should fix those.

Hi,

This is a very cool demo – I’ve learned alot from it. One questions.

Is there a reason that the HelpOverlay doesn’t appear when using FireFox or IE? Chrome works as advertised.

If I comment out these lines in the
.help-overlay
style - the window appears, but obviously without the cool fading transition.

    @include fade-in;
    opacity: 0;
    @include animation-duration(1500ms);
    @include animation-delay(2000ms);
    @include animation-fill-mode(forwards);

Thanks,

Found the problem. The keyframes.scss file needs to be update with the following. The one that ships does not have the settins for moz, ms, or o.

/* Fade-in */
@-webkit-keyframes fade-in
{
0% {opacity: 0;}
100% {opacity: 1;}
}

@-moz-keyframes fade-in {
0% {opacity: 0;}
100% {opacity: 1;}
}

@-ms-keyframes fade-in {
0% {opacity: 0;}
100% {opacity: 1;}
}

@-o-keyframes fade-in {
0% {opacity: 0;}
100% {opacity: 1;}
}

Hi! Thanks for pointing that out. I seem to have had some sort of mishap with those values. Anyway, adding those should fix it indeed. I updated the file in the repository.

Hi,

I am using Maven + GAE for the development of a front-end that will connect with a Maven + GAE back-end. Trying to use the dashboard example (since it will be pretty similar to the kind of functionality I need for the front end). I know this example was not created for GAE. But I have been able to make it work (taking out some functionalities) using VaadinServlet but when i try to use GAEVaadinServlet it gets stock trying to load the inicial login view (shows the loading watch but doesn’t do anything else). I don’t get any exceptions or response I can work with to solve it.

Any ideas?

Any tutorial on working with GAE (+Maven if possible) that can help me with this.

Is it a problem of Vaadin 7 (Have not found any update documentation for this version on GAE)

Thanks

I am using the dashboard theme in a project. How can I get the error symbol to show up for invalid values in form fields? The validation error message shows up when the mouse is over the field, but there’s no obvious way to see that the field has an error.

Ended up cobbling together a solution lbased on:

https://vaadin.com/forum#!/thread/268235
and
http://dev.vaadin.com/browser/doc/book-examples/branches/vaadin-7/src/com/vaadin/book/examples/application/ErrorIndicatorExample.java#L110

Added

  .errorstyle {
    background-color: pink !important;
  }

to the theme.

import com.vaadin.data.Validator;
import com.vaadin.data.fieldgroup.BeanFieldGroup;
import com.vaadin.ui.Field;

public class ErrorfulBeanFieldGroup<T> extends BeanFieldGroup<T> {

    public ErrorfulBeanFieldGroup(Class<T> beanType) {
        super(beanType);
    }

    @Override
    public void commit() throws CommitException {
        Validator.InvalidValueException first = validateFields();
        if (null == first) {
            super.commit();
        } else {
            throw (new CommitException(first));
        }
    }

    public Validator.InvalidValueException validateFields() {
        Validator.InvalidValueException first = null;
        for (Field<?> f : getFields()) {
            try {
                f.validate();
                f.removeStyleName("errorstyle");
            } catch (Validator.InvalidValueException ive) {
                if (null == first) {
                    first = ive;
                }
                f.addStyleName("errorstyle");
            }
        }
        return first;
    }
}

Using the ErrorfulBeanFieldGroup, any Fields which don’t pass validation, show up in pink. You can read the validation message when the mouse is over the field, but at least the user knows which Field has a problem.

When I login into the demo application, it forwards me to the dashboard page. If I later push F5 (reload page), the browser always returns to the login page. What is the right way to omit this behavior and stay in the currently visible view?

Add the @PreserveOnRefresh annotation to the UI class.

Great … thank you very much!!! Now that i know the magic word the net is full of this stuff :wink:

Hi ,

when I try run , show the error in console

Unable to deploy collapsed ear in war StandardEngine[Catalina]
.StandardHost[localhost]
.StandardContext
[/quicktickets-dashboard]
org.apache.openejb.OpenEJBException: Unable to load servlet class: com.vaadin.demo.dashboard.DashboardServlet: com.vaadin.demo.dashboard.DashboardServlet
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:2113)
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1843)
at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:360)
at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1227)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1100)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:130)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5416)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.vaadin.demo.dashboard.DashboardServlet
at org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:176)
at org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:80)
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:2106)
… 17 more

why

Just grabbed from github and updated vaadin-testbench to 4.0.3 and tests stopped working. Some tests fails with:

[code]
org.openqa.selenium.NoSuchElementException: Vaadin could not find elements with the selector (//com.vaadin.ui.Button[caption=“Sign In”]
)[0]

For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘2.46.0’, revision: ‘61506a4624b13675f24581e453592342b7485d71’, time: ‘2015-06-04 10:22:50’
System info: host: ‘localhost.localdomain’, ip: ‘127.0.0.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.0.6-200.fc21.x86_64’, java.version: ‘1.8.0_45’
Driver info: driver.version: unknown
at com.vaadin.testbench.TestBenchDriverProxy.executeSearch(TestBenchDriverProxy.java:209)
at com.vaadin.testbench.TestBenchDriverProxy.findElementsByVaadinSelector(TestBenchDriverProxy.java:154)
at com.vaadin.testbench.By$ByVaadin.findElements(By.java:55)
at com.vaadin.testbench.ElementQuery.executeSearch(ElementQuery.java:367)
at com.vaadin.testbench.ElementQuery.get(ElementQuery.java:317)
at com.vaadin.testbench.ElementQuery.first(ElementQuery.java:297)
at com.vaadin.demo.dashboard.tb.pageobjects.TBLoginView.login(TBLoginView.java:16)
at com.vaadin.demo.dashboard.tb.TransactionsViewIT.setUp(TransactionsViewIT.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.openqa.selenium.WebDriverException: window.vaadin is undefined
Command duration or timeout: 19 milliseconds
Build info: version: ‘2.46.0’, revision: ‘61506a4624b13675f24581e453592342b7485d71’, time: ‘2015-06-04 10:22:50’
System info: host: ‘localhost.localdomain’, ip: ‘127.0.0.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.0.6-200.fc21.x86_64’, java.version: ‘1.8.0_45’
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=39.0, platform=LINUX, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]

Session ID: 4220b8ed-9833-4102-9efa-4ed029f27ad0
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:514)
at com.vaadin.testbench.commands.TestBenchCommandExecutor.executeScript(TestBenchCommandExecutor.java:350)
at com.vaadin.testbench.TestBenchDriverProxy_$$_jvst92f_0.d9executeScript(TestBenchDriverProxy$$jvst92f_0.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.vaadin.testbench.DriverInvocationHandler.invoke(DriverInvocationHandler.java:62)
at com.vaadin.testbench.TestBenchDriverProxy
$$jvst92f_0.executeScript(TestBenchDriverProxy$$_jvst92f_0.java)
at com.vaadin.testbench.TestBenchDriverProxy.executeSearch(TestBenchDriverProxy.java:200)
… 31 more
Caused by: org.openqa.selenium.WebDriverException: window.vaadin is undefined
Build info: version: ‘2.46.0’, revision: ‘61506a4624b13675f24581e453592342b7485d71’, time: ‘2015-06-04 10:22:50’
System info: host: ‘localhost.localdomain’, ip: ‘127.0.0.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.0.6-200.fc21.x86_64’, java.version: ‘1.8.0_45’
Driver info: driver.version: unknown
at .anonymous(about:neterror?e=connectionFailure&u=http%3A//localhost%3A8080/quicktickets-dashboard%3FrestartApplication%3Dtrue&c=UTF-8&f=regular&d=Firefox%20can%27t%20establish%20a%20connection%20to%20the%20server%20at%20localhost%3A8080. line 69 > Function:1)
at .handleEvaluateEvent(about:neterror?e=connectionFailure&u=http%3A//localhost%3A8080/quicktickets-dashboard%3FrestartApplication%3Dtrue&c=UTF-8&f=regular&d=Firefox%20can%27t%20establish%20a%20connection%20to%20the%20server%20at%20localhost%3A8080.:69)
[/code]Test log:

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.298 sec
Running com.vaadin.demo.dashboard.tb.TransactionsViewIT
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 8.549 sec <<< FAILURE!
Running com.vaadin.demo.dashboard.tb.LoginViewIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.36 sec
Running com.vaadin.demo.dashboard.tb.DashboardViewIT
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 8.505 sec <<< FAILURE!
Running com.vaadin.demo.dashboard.tb.ReportsViewIT
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 8.373 sec <<< FAILURE!

Results :

Tests in error:
  testCreateReport(com.vaadin.demo.dashboard.tb.TransactionsViewIT): Element is not currently visible and so may not be interacted with(..)
  testFilter(com.vaadin.demo.dashboard.tb.TransactionsViewIT): Element is not currently visible and so may not be interacted with(..)
  testEditDashboardTitle(com.vaadin.demo.dashboard.tb.DashboardViewIT): Element is not currently visible and so may not be interacted with(..)
  testReadNotifications(com.vaadin.demo.dashboard.tb.DashboardViewIT): Element is not currently visible and so may not be interacted with(..)
  testReportsTextBlock(com.vaadin.demo.dashboard.tb.ReportsViewIT): Element is not currently visible and so may not be interacted with(..)
  testReportsInMenu(com.vaadin.demo.dashboard.tb.ReportsViewIT): Element is not currently visible and so may not be interacted with(..)

Tests run: 8, Failures: 0, Errors: 6, Skipped: 0

If I change original pom (testbench 4.0.0.rc1) to exclude selenium and include it myself, it works perfect.

Any advise? Should I post this in another place?
Thanks

Hi Oscar,

I just tried it myself and I can’t get the tests to fail in the way you see. Could it be due to the Firefox version you are running against or something?

I do get one failure with the latest firefox version and that is where a notification doesn’t contain the expected results, but everything else works correctly.

Cheers,
/Jonatan

Hi Jonatan,

It was something about the side bar. The menu takes 1 or 2 seconds to appear. I needed to add some WebDriverWait for dashboard menu before clicking any of the options. Now it works great.

I’ll fork and do a pull request about this so it is fixed in the demo…

Best regards
Oscar

i have my custom theme and it has imported “…/valo/valo.scss”

but dont the below error is coming.

Sep 07, 2015 12:40:36 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource
[/VAADIN/themes/reindeer/Images/logo_white.png] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Sep 07, 2015 12:40:36 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource
[/VAADIN/themes/reindeer/Images/portfolio-2.jpg] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Sep 07, 2015 12:40:36 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource
[/VAADIN/themes/reindeer/Images/indyne.JPG] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Sep 07, 2015 12:40:36 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource
[/VAADIN/themes/reindeer/Images/banner.jpg] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Sep 07, 2015 12:40:36 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource
[/VAADIN/themes/reindeer/Images/benefits_others.jpg] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Sep 07, 2015 12:40:36 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource
[/VAADIN/themes/reindeer/Images/portfolio-1.png] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Sep 07, 2015 12:40:36 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource
[/VAADIN/themes/reindeer/Images/map.png] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

i dont have any reindeer folder in my VAADIN/themes folder

Please suggest how to remove the error!!!

Using eclipse and tomcat7 server

Hi,
When I download sources and tried to deploy on glassfish 4.1, I received below exception;

com.vaadin.server.ServiceException: java.lang.NoSuchMethodError: com.google.common.eventbus.EventBus.<init>(Lcom/google/common/eventbus/SubscriberExceptionHandler;)V So I edited the DashBoardEventBus class and changed line 14.
Before edit;

private final EventBus eventBus = new EventBus(this); After edit;

private final EventBus eventBus = new EventBus(); Now there is no exception and works fine.

I have a problem when I run, at first it works properly, when I logout the navigation is not working… though the status changes but the view are not… there are no exceptions also…

what problem is this ?

There are so many functions not available in the vaadin jars and are being used in the quicktickets demo source code. May I know how to get it working when the function the demo is using is not in the vaadin jars ? For e.g.
line 99: Package > com.vaadin.demo.dashboard, class > DashboardUI.java, function > userLoggedOut > line: Page.getCurrent().reload();

The reload function does not exist in the com.vaadin.server.page class. How the hell I am supposed to get this demo working when so many of these functions are not there and the whole project is broken. Can the vaadin guys please comment on their incomplete, frustrating and disappointing work they do …

Hi Srinath,

Just making sure you have set up the project using Maven, so that all the dependencies are loaded? If you just copy the source from GitHub without setting up the depencies, mostly everything will be broken and missing.

If you’re unfamiliar with Maven, I suggest you start from
https://vaadin.com/maven

If you are using Maven, I would appreciate some more information about your project setup before I can offer more help, as it is working as expected for me.

As for Page.getCurrent().reload(), it should be available:
https://vaadin.com/api/7.6.2/com/vaadin/server/Page.html#reload()

It doesn’t show the @since notice, but I would think it has been there since version 7.0.0.

Thanks for reaching out to me quickly - it will help me a great deal if you can help me setup this quick tickets demo. I downloaded this quicktickets demo using maven m2e-egit import feature of eclipse - like you have explained for address book demo (not sure why you did not do the same for this quick tickets demo) - then it was throwing error for jetty so I downloaded jetty from eclipse marketplace and took the pom.xml as posted above in the forum by Klajd Deda and then compiled the widget set of gwt: DashboardWidgetSet.gwt.xml - somehow the jetty error got fixed but the codebase was still showing lot of error - I therefore included guave.jar and google analytics jar in my eclipse project - from project settings. Some error went away but others still existed which I mentioned above - I then try to include vaadin latest jars 7.6.2 version but it did not offer much help. Can you please post some correct settings or correct POM.xml which works with current version.

PS: why do you make it so hard for a simple demo project to get it up and running. This project has been there for so long - why is it hard for VAADIN team to post some clear cut instructions to get this up and running. You have created a great product but why have you made simple examples so hard to work - seems very unprofessional and lethargic on Vaadin Team’s end. I would like to use this product with all the available features I therefore request you to please help.