5 Replies Latest reply on May 19, 2010 4:30 AM by trong.tran

    How can I call a window popup of Gatein?

      Hello Friends

       

      I need to call the Window popup of Gatein.

      I update the file

      default/deploy/gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtmpl

       

      .........
      ........
      String signInAction = "if(document.getElementById('UIMaskWorkspace')) ajaxGet(eXo.env.server.createPortalURL('UIPortal', 'ShowLoginForm', true));" ;
      
          String newWindow = "if(document.getElementById('UIMaskWorkspace')) ajaxGet(eXo.env.server.createPortalURL('UIPortal', 'ShowNewWindow', true));" ;
      
          String changeLanguageAction = "if(document.getElementById('UIMaskWorkspace')) ajaxGet(eXo.env.server.createPortalURL('UIPortal', 'ChangeLanguage', true));" ;
      ....
      .
      

       

       

      ....
      ..
      <div id="login"><a href="#" onclick="$signInAction">Login</a></div>
      
      
      <div id="register"><a href="$registerURI">register</a></div>
      
      
      <div id="coteja"><a href="#" onclick="$newWindow">new Window</a></div>
      ....
      .
      .
      

       

       

       

       

       


      then create UINewWindow.gtmpl in
      default/deploy/gatein.ear/02portal.war/groovy/portal/webui/

       

      <%   
          import org.exoplatform.web.application.JavascriptManager;
          import javax.servlet.http.HttpSession;
          def rcontext = _ctx.getRequestContext();
          JavascriptManager jsmanager = rcontext.getJavascriptManager();
      
          HttpSession session = rcontext.getRequest().getSession();
          String requestPath = rcontext.getRequestContextPath() + "/private/" + rcontext.getPortalOwner();
          session.setAttribute("initialURI", requestPath);
      %>
      <div>
          <div>
              <% uiform.begin(); %>
                  <div>
                      <div onclick="<%=uicomponent.event('Close');%>">
                          <a href="javascript:void(0);">salir</a>
                      </div>
                  </div> 
              <%uiform.end()%>
          </div>
      </div>
      <script>
          function login(ele) {
              var formEle = eXo.core.DOMUtil.findAncestorByTagName(ele,'form');
              formEle.action = eXo.env.portal.context + "/login";
              formEle.submit();
          }
      </script>
      
      
      

       


      but my link "new Window" not call UINewWindow.

       

      Can help me.thanks