blob: 29595c487979c03cf4d8e5d546a8ecc06fc0b303 [file] [log] [blame]
/**
* Copyright (c) 2011, 2014 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Florian Pirchner - Initial implementation
*/
package org.eclipse.osbp.runtime.web.sample;
import org.eclipse.osbp.runtime.web.ecview.presentation.vaadin.common.FilteringComponentEmbeddable;
import org.eclipse.osbp.runtime.web.sample.dtos.PersonDto;
import com.vaadin.annotations.Theme;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.UI;
import com.vaadin.ui.themes.ValoTheme;
@SuppressWarnings("serial")
@Theme(ValoTheme.THEME_NAME)
public class ECViewSampleUI extends UI {
private CssLayout content = new CssLayout();
@Override
protected void init(VaadinRequest request) {
setContent(content);
content.setSizeFull();
FilteringComponentEmbeddable<PersonDto> comp = new FilteringComponentEmbeddable<>(PersonDto.class, 3);
comp.setSizeFull();
content.addComponent(comp);
comp.init(getLocale());
comp.setAcceptCallback(p -> {
System.out.println(p);
});
}
}