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
package com.viavansi.vaadinsample.lib.utils; | |
import com.vaadin.data.util.BeanContainer; | |
import com.vaadin.data.util.converter.Converter; | |
import com.vaadin.ui.AbstractSelect; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Locale; |
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 Component getColumnRangeChart() throws ParseException { | |
Chart chart = new Chart(ChartType.COLUMNRANGE); | |
Configuration conf = chart.getConfiguration(); | |
conf.getChart().setInverted(true); | |
YAxis yAxis = conf.getyAxis(); | |
yAxis.setTitle(new Title("Time")); | |
yAxis.setType(AxisType.DATETIME); | |
conf.getTooltip().setFormatter("return '<b>' + this.x + '</b> started at <b>' + Highcharts.dateFormat('%H:%M', this.point.low) + '</b> and ended at <b>' + Highcharts.dateFormat('%H:%M', this.point.high) + '</b>';"); |
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
//one possibility could be, using some kind of callback, e.g: | |
void onChange(GridEditorChangeEvent e) { | |
if (validationFailedOrSomething()) { | |
e.discardChange(); | |
} | |
} |
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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; |
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
package org.vaadin.jpatest; | |
import javax.persistence.EntityManager; | |
import org.vaadin.jpatest.domain.AbstractEntity; | |
import org.vaadin.jpatest.domain.Car; | |
import org.vaadin.jpatest.domain.Person; | |
import org.vaadin.jpatest.domain.Vehicle; | |
import com.vaadin.addon.jpacontainer.JPAContainer; |
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
@Before | |
public void setUp() throws Exception { | |
WebDriver driver = new LoadTestDriver.LoadTestDriverBuilder(). | |
withIpAddress(LoadTestDriver.getLocalIpAddress()). | |
withNumberOfConcurrentUsers(1). | |
withRampUpTimeInSeconds(1). | |
withProxyPort(9999). | |
withPath("/Users/jotatu/Desktop/gatling"). | |
withStaticResourcesIngnoring(). | |
build(); |
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
import java.io._ | |
import java.util | |
import javax.servlet.annotation.WebServlet | |
import com.vaadin.annotations.{Push, Theme, VaadinServletConfiguration} | |
import com.vaadin.server.StreamResource.StreamSource | |
import com.vaadin.server.{FileDownloader, StreamResource, VaadinRequest, VaadinServlet} | |
import com.vaadin.ui.Button.ClickEvent | |
import com.vaadin.ui.{Label, UI, TabSheet, Upload} |
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
package org.test; | |
import java.util.Arrays; | |
import javax.servlet.annotation.WebServlet; | |
import com.vaadin.annotations.Theme; | |
import com.vaadin.annotations.VaadinServletConfiguration; | |
import com.vaadin.data.provider.ListDataProvider; | |
import com.vaadin.server.VaadinRequest; |
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
// Example view code | |
final Button makeReport = new Button("Generate report", new ClickListener() { | |
@Override | |
public void buttonClick(ClickEvent event) { | |
try { | |
MyPdfSource pdfSource = new MyPdfSource("test.pdf", new ByteArrayOutputStream()); | |
testServiceBean.doReport(pdfSource.getOutputStream()); |
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
import scala.concurrent.duration._ | |
import io.gatling.core.Predef._ | |
import io.gatling.http.Predef._ | |
import io.gatling.jdbc.Predef._ | |
class BevBuddy extends Simulation { | |
val baseUrl: String = System.getProperty("gatling.baseUrl", "http://localhost:8080/bevbuddy-1.0-SNAPSHOT") |
OlderNewer