Package com.taobao.zeus.web.platform.client.app.home

Examples of com.taobao.zeus.web.platform.client.app.home.HomeApp


  public void onModuleLoad() {
    RPCS.getUserService().getUser(new AsyncCallback<ZUser>() {
      @Override
      public void onSuccess(ZUser result) {
        Platform s=new Platform(result);
        final HomeApp home=new HomeApp(s.getPlatformContext());
        s.addApp(home);
        s.addApp(new DocumentApp(s.getPlatformContext()));
        s.addApp(new ScheduleApp(s.getPlatformContext()));
        s.addApp(new ReportApp(s.getPlatformContext()));
       
        RootPanel.get().add(s);
       
        s.getPlatformContext().getPlatformBus().fireEvent(new StartEvent());
       
        String id=GWTEnvironment.getNoticeTemplateId();
        RPCS.getFileManagerService().getFile(id, new AbstractAsyncCallback<FileModel>() {
          @Override
          public void onSuccess(FileModel result) {
            if(result.getContent()!=null && result.getContent().startsWith("<!--OK-->")){
              process(result.getContent());
            }
          }
          @Override
          public void onFailure(Throwable caught) {
            TemplateResources templates=com.google.gwt.core.shared.GWT.create(TemplateResources.class);
            process(templates.notice().getText());
          }
          private void process(String content){
            GuideTip tip=new GuideTip(home.getShortcut());
            String[] lines=content.split("\n");
            for(String line:lines){
              if(line.startsWith("<!--width=")){
                tip.setWidth(Integer.valueOf(line.substring(10,line.indexOf("-->"))));
              }else if(line.startsWith("<!--height=")){
View Full Code Here

TOP

Related Classes of com.taobao.zeus.web.platform.client.app.home.HomeApp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.