예제 #1
0
 protected void handlePage(String... params) {
   String username = new UrlTokenizer(params[0]).getString();
   UserService userService = ApplicationContextUtil.getSpringBean(UserService.class);
   SimpleUser user =
       userService.findUserByUserNameInAccount(username, AppContext.getAccountId());
   EventBusFactory.getInstance().post(new UserEvent.GotoEdit(EditUrlResolver.this, user));
 }
예제 #2
0
  public UserPanel() {
    super();
    setStyleName("user-info-panel");
    setSpacing(true);
    setMargin(true);
    setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    setHeightUndefined();

    userAvatar = new Image();
    userAvatar.setWidth("24px");
    userAvatar.setHeight("24px");

    userName = new Button();
    userName.setWidth("100%");
    userName.setStyleName("user-btn");

    setUserInfo();

    addComponent(userAvatar);
    addComponent(userName);
    setExpandRatio(userName, 1.0f);

    // add listener to listen the change avatar or user information to
    // update panel display info
    EventBusFactory.getInstance()
        .register(
            new ApplicationEventListener<SessionEvent.UserProfileChangeEvent>() {
              private static final long serialVersionUID = 1L;

              @Subscribe
              @Override
              public void handle(UserProfileChangeEvent event) {
                setUserInfo();
              }
            });
  }
예제 #3
0
 protected void handlePage(String... params) {
   String username = new UrlTokenizer(params[0]).getString();
   EventBusFactory.getInstance().post(new UserEvent.GotoRead(PreviewUrlResolver.this, username));
 }
예제 #4
0
 protected void handlePage(String... params) {
   EventBusFactory.getInstance().post(new UserEvent.GotoAdd(AddUrlResolver.this, null));
 }
 private void displayKanbanView() {
   EventBusFactory.getInstance().post(new TaskEvent.GotoKanbanView(this, null));
 }
 private void displayGanttChartView() {
   EventBusFactory.getInstance().post(new TaskEvent.GotoGanttChart(this, null));
 }
 @Override
 public void detach() {
   EventBusFactory.getInstance().unregister(searchHandler);
   EventBusFactory.getInstance().unregister(newTaskAddedHandler);
   super.detach();
 }
예제 #8
0
 @Override
 protected void showEditTimeView(SimpleTask bean) {
   EventBusFactory.getInstance().post(new ShellEvent.PushView(this, new TaskTimeLogView(bean)));
 }