Package org.exoplatform.webui.application

Examples of org.exoplatform.webui.application.WebuiRequestContext


   {
      super(name, bindField, String.class);
      this.date = date;
      setDisplayTime(isDisplayTime);

      WebuiRequestContext requestContext = WebuiRequestContext.getCurrentInstance();
      formatPattern(requestContext.getLocale());
   }
View Full Code Here


      isDisplayTime_ = isDisplayTime;
   }

   public void setCalendar(Calendar date)
   {
      WebuiRequestContext requestContext = WebuiRequestContext.getCurrentInstance();
      formatPattern(requestContext.getLocale());
      if (date != null)
      {
         this.date = date.getTime();
         value_ = dateFormat_.format(date.getTime());
      }
View Full Code Here

   }

   public void processRender(WebuiRequestContext context) throws Exception
   {

      WebuiRequestContext requestContext = WebuiRequestContext.getCurrentInstance();
      formatPattern(requestContext.getLocale());
      String monthNames_ = "";
      for (String month : months_)
      {
         // remove empty element
         if (!month.equals(""))
View Full Code Here

      return uploadId_;
   }

   public String getActionUpload()
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      WebuiRequestContext pcontext = (WebuiRequestContext)context.getParentAppRequestContext();
      if (pcontext == null)
         pcontext = context;
      String uploadAction = pcontext.getRequestContextPath() + "/command?";
      uploadAction += "type=org.exoplatform.web.command.handler.UploadHandler";
      uploadAction += "&uploadId=" + uploadId_ + "&action=upload";
      return uploadAction;
   }
View Full Code Here

   }

   @SuppressWarnings("unchecked")
   public void begin() throws Exception
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      String b = context.getURLBuilder().createURL(this, null, null);

      Writer writer = context.getWriter();
      writer.append("<form class=\"UIForm\" id=\"").append(getId()).append("\" action=\"").append(b).append('\"');
      if (submitAction_ != null)
         writer.append(" onsubmit=\"").append(submitAction_).append("\"");
      if (multipart_)
         writer.append(" enctype=\"multipart/form-data\"");
View Full Code Here

      writer.append("</div>");
   }

   public void end() throws Exception
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      context.getWriter().write("</form>");
   }
View Full Code Here

   }

   public void renderField(String name) throws Exception
   {
      UIComponent uiInput = findComponentById(name);
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      uiInput.processRender(context);
   }
View Full Code Here

      uiInput.processRender(context);
   }

   public void renderField(UIComponent uiInput) throws Exception
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      uiInput.processRender(context);
   }
View Full Code Here

      uiInput.processRender(context);
   }

   private String getFormId()
   {
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      if (context instanceof PortletRequestContext)
      {
         return ((PortletRequestContext)context).getWindowId() + "#" + getId();
      }
      return getId();
View Full Code Here

   {
      StringBuilder b = new StringBuilder();
      //TODO: Tung.Pham modified
      //------------------------
      b.append("javascript:");
      WebuiRequestContext rcontext = WebuiRequestContext.getCurrentInstance();
      UIComponent subComponent = findComponentById(componentId);
      org.exoplatform.webui.config.Event event = subComponent.getComponentConfig().getUIComponentEventConfig(name);
      if (event == null)
         return "??config??";
      String confirm = event.getConfirm();
      if (confirm != null && confirm.trim().length() > 0)
      {
         confirm = rcontext.getApplicationResourceBundle().getString(confirm);
         b.append("if(confirm('").append(confirm.replaceAll("'", "\\\\'")).append("'))");
      }
      b.append("eXo.webui.UIForm.submitEvent('").append(getFormId()).append("','");
      //b.append("javascript:eXo.webui.UIForm.submitEvent('").append(getId()).append("','");
      //-------------------------
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.application.WebuiRequestContext

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.