QuickTickets Demo Source

Hi,

I have registered and tested (!) the RottenTomatoes API access and get the following exception.

INFO: Requested resource 
[/VAADIN/widgetsets/com.vaadin.demo.dashboard.DashboardWidgetSet/com.vaadin.demo.dashboard.DashboardWidgetSet.nocache.js] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

The web.xml contains the following entry:

<init-param>
			<param-name>widgetset</param-name>
			<param-value>com.vaadin.demo.dashboard.DashboardWidgetSet</param-value>
		</init-param>

UPDATE:
After deleting the project and compiling it again now it works!

Hi Christian, I got you same problem, did you solved it?

Hi all …
I am beginner at Vaadin …
I try to import the dash-board code that availeble at git but my eclipse is unable to identify dash-board project.
An attachment is added to my post.
How can i import the project properly.

Please help me.
13434.png

The demo works great for me. Thanks for providing it as I was looking for exactly something like this.

One annoyance though is some characters are showing up as weird characters (eg. “No username or password is required, just click the ���Sign In��� button to continue.”)

You may want to use a Unicode character or a different symbol there.
13452.tiff (63.6 KB)

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.