package no.priv.bang.ukelonn.impl;

import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Notification;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

public class UkelonnUI extends UI {
    private static final long serialVersionUID = 1388525490129647161L;

    @Override
    protected void init(VaadinRequest request) {
        // Create the content root layout for the UI
        VerticalLayout content = new VerticalLayout();
        setContent(content);

        // Display the greeting
        content.addComponent(new Label("Hello World!"));

        // Have a clickable button
        content.addComponent(new Button("Push Me!",
                                        new Button.ClickListener() {
                                            private static final long serialVersionUID = 2723190031041985566L;

                                            @Override
                                            public void buttonClick(ClickEvent e) {
                                                Notification.show("Pushed!");
                                            }
                                        }));
    }

}

@@ -29,16 +29,97 @@
 .impl;%0A%0A
+import org.apache.shiro.SecurityUtils;%0Aimport org.apache.shiro.subject.Subject;%0A%0A
 import c
@@ -512,24 +512,79 @@
  request) %7B%0A
+    %09Subject currentUser = SecurityUtils.getSubject();%0A
         // C
@@ -791,15 +791,38 @@
 llo 
-World!%22
+%22 + currentUser.getPrincipal()
 ));%0A

Access the shiro username (aka "principal") from the vaadin UI.