use of com.vaadin.ui.Link in project vaadin-samples by xpoft.
the class RoleAdminView method PostConstruct.
@PostConstruct
public void PostConstruct() {
LoggerFactory.getLogger(this.getClass()).debug("POST");
setSizeFull();
VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
layout.setMargin(true);
layout.addComponent(new Label("ROLE_ADMIN"));
layout.addComponent(new Link("Go back", new ExternalResource("#!" + MainView.NAME)));
setContent(layout);
}
use of com.vaadin.ui.Link in project vaadin-samples by xpoft.
the class AuthenticatedView method PostConstruct.
@PostConstruct
public void PostConstruct() {
setSizeFull();
VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
layout.setMargin(true);
layout.addComponent(new Label("@RequiresAuthentication"));
layout.addComponent(new Link("Go back", new ExternalResource("#!" + MainView.NAME)));
setContent(layout);
}
use of com.vaadin.ui.Link in project vaadin-samples by xpoft.
the class RoleUserView method PostConstruct.
@PostConstruct
public void PostConstruct() {
setSizeFull();
VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
layout.setMargin(true);
layout.addComponent(new Label("@RequiresRoles(\"user\")"));
layout.addComponent(new Link("Go back", new ExternalResource("#!" + MainView.NAME)));
setContent(layout);
}
use of com.vaadin.ui.Link in project vaadin-samples by xpoft.
the class RoleAdminView method PostConstruct.
@PostConstruct
public void PostConstruct() {
setSizeFull();
VerticalLayout layout = new VerticalLayout();
layout.setSpacing(true);
layout.setMargin(true);
layout.addComponent(new Label("@RequiresRoles(\"admin\")"));
layout.addComponent(new Link("Go back", new ExternalResource("#!" + MainView.NAME)));
setContent(layout);
}
use of com.vaadin.ui.Link in project Activiti by Activiti.
the class ProfilePanel method initContactSection.
protected void initContactSection() {
Label header = createProfileHeader(infoPanelLayout, i18nManager.getMessage(Messages.PROFILE_CONTACT));
header.addStyleName(ExplorerLayout.STYLE_H3);
header.addStyleName(ExplorerLayout.STYLE_DETAIL_BLOCK);
infoPanelLayout.addComponent(header);
GridLayout contactLayout = createInfoSectionLayout(2, 4);
// Email
if (!editable && isDefined(user.getEmail())) {
addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_EMAIL), user.getEmail());
} else if (editable) {
emailField = new TextField();
addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_EMAIL), emailField, user.getEmail());
}
// Phone
if (!editable && isDefined(phone)) {
addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_PHONE), phone);
} else if (editable) {
phoneField = new TextField();
addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_PHONE), phoneField, phone);
}
// Twitter
if (!editable && isDefined(twitterName)) {
Link twitterLink = new Link(twitterName, new ExternalResource("http://www.twitter.com/" + twitterName));
addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_TWITTER), twitterLink);
} else if (editable) {
twitterField = new TextField();
addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_TWITTER), twitterField, twitterName);
}
// Skype
if (!editable && isDefined(skypeId)) {
// The skype entry shows the name + skype icon, laid out in a small grid
GridLayout skypeLayout = new GridLayout(2, 1);
skypeLayout.setSpacing(true);
skypeLayout.setSizeUndefined();
Label skypeIdLabel = new Label(skypeId);
skypeIdLabel.setSizeUndefined();
skypeLayout.addComponent(skypeIdLabel);
addProfileEntry(contactLayout, i18nManager.getMessage(Messages.PROFILE_SKYPE), skypeLayout);
} else if (editable) {
skypeField = new TextField();
addProfileInputField(contactLayout, i18nManager.getMessage(Messages.PROFILE_SKYPE), skypeField, skypeId);
}
}
Aggregations