Examples of ClientProperties


Examples of org.apache.myfaces.tobago.context.ClientProperties

        Measure horizontal = Measure.valueOf(tokenizer.nextToken());
        if (vertical.greaterThan(Measure.valueOf(30)) || vertical.lessThan(Measure.valueOf(3))
           || horizontal.greaterThan(Measure.valueOf(30)) || horizontal.lessThan(Measure.valueOf(3))) {
          LOG.error("Ignoring strange values: vertical=" + vertical + " horizontal=" + horizontal);
        } else {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
          client.setVerticalScrollbarWeight(vertical);
          client.setHorizontalScrollbarWeight(horizontal);
        }
      }
    } catch (Exception e) {
      LOG.error("Error in decoding '" + name + "': value='" + value + "'", e);
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

    String formAction = viewHandler.getActionURL(facesContext, viewId);
    formAction = facesContext.getExternalContext().encodeActionURL(formAction);
    String contentType = writer.getContentTypeWithCharSet();
    ResponseUtils.ensureContentTypeHeader(facesContext, contentType);
    String clientId = page.getClientId(facesContext);
    final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
    final ProjectStage projectStage = TobagoConfig.getInstance(facesContext).getProjectStage();
    final boolean developmentMode =  projectStage == ProjectStage.Development;
    final boolean debugMode = client.isDebugMode() || developmentMode;
    final boolean productionMode = !debugMode && projectStage == ProjectStage.Production;
    boolean calculateScrollbarWeight = false;
    int clientLogSeverity = 2;
    if (debugMode) {
      String severity = (String) facesContext.getExternalContext().getRequestMap().get(CLIENT_DEBUG_SEVERITY);
      if (LOG.isDebugEnabled()) {
        LOG.debug("get " + CLIENT_DEBUG_SEVERITY + " = " + severity);
      }
      if (severity != null) {
        try {
          int index = severity.indexOf(';');
          if (index == -1) {
            index = severity.length();
          }
            clientLogSeverity = Integer.parseInt(severity.substring(0, index));
        } catch (NumberFormatException e) {/* ignore; use default*/ }
      }
    }

    if (!FacesContextUtils.isAjax(facesContext)) {
      HtmlRendererUtils.renderDojoDndSource(facesContext, component);

      String title = (String) page.getAttributes().get(Attributes.LABEL);

      writer.startElement(HtmlElements.HEAD, null);

      // meta tags

      // this is needed, because websphere 6.0? ignores the setting of the content type on the response
      writer.startElement(HtmlElements.META, null);
      writer.writeAttribute(HtmlAttributes.HTTP_EQUIV, "Content-Type", false);
      writer.writeAttribute(HtmlAttributes.CONTENT, contentType, false);
      writer.endElement(HtmlElements.META);

      // title
      writer.startElement(HtmlElements.TITLE, null);
      writer.writeText(title != null ? title : "");
      writer.endElement(HtmlElements.TITLE);
      final Theme theme = client.getTheme();

      if (debugMode) {
        // This tag must not be earlier, because the
        // IE doesn't accept some META tags, when they are not the first ones.
        writer.writeJavascript("var TbgHeadStart = new Date();");
      }

      // style files
      for (String styleFile : theme.getStyleResources(productionMode)) {
        writeStyle(facesContext, writer, styleFile);
      }

      for (String styleFile : FacesContextUtils.getStyleFiles(facesContext)) {
        writeStyle(facesContext, writer, styleFile);
      }

      if (!productionMode) {
        checkDuplicates(theme.getStyleResources(productionMode), FacesContextUtils.getStyleFiles(facesContext));
      }

      String icon = page.getApplicationIcon();
      if (icon != null) {
        // XXX unify with image renderer
        if (ResourceManagerUtils.isAbsoluteResource(icon)) {
          // absolute Path to image : nothing to do
        } else {
          icon = ResourceManagerUtils.getImageWithPath(facesContext, icon);
        }

        writer.startElement(HtmlElements.LINK, null);
        if (icon.endsWith(".ico")) {
          writer.writeAttribute(HtmlAttributes.REL, "shortcut icon", false);
          writer.writeAttribute(HtmlAttributes.HREF, icon, false);
        } else {
          // XXX IE only supports ICO files for favicons
          writer.writeAttribute(HtmlAttributes.REL, "icon", false);
          writer.writeAttribute(HtmlAttributes.TYPE, MimeTypeUtils.getMimeTypeForFile(icon), false);
          writer.writeAttribute(HtmlAttributes.HREF, icon, false);
        }
        writer.endElement(HtmlElements.LINK);
      }

      // style sniplets
      Set<String> styleBlocks = FacesContextUtils.getStyleBlocks(facesContext);
      if (styleBlocks.size() > 0) {
        writer.startElement(HtmlElements.STYLE, null);
        writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
        for (String cssBlock : styleBlocks) {
          writer.write(cssBlock);
        }
        writer.endElement(HtmlElements.STYLE);
      }

      if (debugMode) {
        boolean hideClientLogging = true;
        String severity = (String) facesContext.getExternalContext().getRequestMap().get(CLIENT_DEBUG_SEVERITY);
        if (LOG.isDebugEnabled()) {
          LOG.debug("get " + CLIENT_DEBUG_SEVERITY + " = " + severity);
        }
        if (severity != null) {
          try {
            int index = severity.indexOf(';');
            if (index == -1) {
              index = severity.length();
            }
            clientLogSeverity = Integer.parseInt(severity.substring(0, index));
          } catch (NumberFormatException e) {/* ignore; use default*/ }
          hideClientLogging = !severity.contains("show");
        }
        // the jquery ui is used in moment only for the logging area...
        FacesContextUtils.addOnloadScript(facesContext, 0, "new LOG.LogArea({hide: " + hideClientLogging + "});");
      }

      // render remaining script tags
      for (String scriptFile: theme.getScriptResources(productionMode)) {
        encodeScript(facesContext, writer, scriptFile);
      }

      for (String scriptFile : FacesContextUtils.getScriptFiles(facesContext)) {
        encodeScript(facesContext, writer, scriptFile);
      }

      if (!productionMode) {
        checkDuplicates(theme.getScriptResources(productionMode), FacesContextUtils.getScriptFiles(facesContext));
      }

      // focus id
      String focusId = page.getFocusId();
      if (focusId != null) {
        writer.startJavascript();
        writer.write("Tobago.focusId = '");
        writer.write(focusId);
        writer.write("';");
        writer.endJavascript();
      }

      if (component.getFacets().containsKey(Facets.ACTION)) {
        UIComponent command = component.getFacet(Facets.ACTION);
        if (command != null && command.isRendered()) {
          int duration = ComponentUtils.getIntAttribute(command, Attributes.DELAY, 100);
          boolean transition = ComponentUtils.getBooleanAttribute(command, Attributes.TRANSITION);
          String target = ComponentUtils.getStringAttribute(command, Attributes.TARGET);
          String action
              = HtmlRendererUtils.createSubmitAction(command.getClientId(facesContext), transition, target, null);
          FacesContextUtils.addOnloadScript(facesContext, "setTimeout(\"" + action  + "\", " + duration + ");\n");
        }
      }


      calculateScrollbarWeight
          = client.getVerticalScrollbarWeight() == null || client.getHorizontalScrollbarWeight() == null;
      if (calculateScrollbarWeight) {
        FacesContextUtils.addOnloadScript(facesContext,
            "Tobago.calculateScrollbarWeights('" + clientId + ComponentUtils.SUB_SEPARATOR + "scrollbarWeight" + "');");
      } else {
        FacesContextUtils.addOnloadScript(facesContext,
            "Tobago.Config.set('Tobago', 'verticalScrollbarWeight', '"
                + client.getVerticalScrollbarWeight().getPixel() + "');");
        FacesContextUtils.addOnloadScript(facesContext,
            "Tobago.Config.set('Tobago', 'horizontalScrollbarWeight', '"
                + client.getHorizontalScrollbarWeight().getPixel() + "');");
      }

      UIComponent command = null;
      if (component.getFacets().containsKey(Facets.RESIZE_ACTION)) {
        Deprecation.LOG.warn("Please use 'resize' instead of 'resizeAction' as facet.");
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

        available = available.subtractNotNegative(getMarginEnd(orientation));
        available = available.subtractNotNegative(LayoutUtils.getPaddingEnd(orientation, container));
        available = available.subtractNotNegative(LayoutUtils.getBorderEnd(orientation, container));

        if (grid.isOverflow(orientation.other())) {
          ClientProperties client = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());
          final Measure scrollbar = orientation
              == Orientation.HORIZONTAL ? client.getVerticalScrollbarWeight() : client.getHorizontalScrollbarWeight();
          available = available.subtractNotNegative(scrollbar);
        }

        List<Measure> partition = factorList.partition(available);
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

  public static ClientPropertiesKey get(FacesContext facesContext) {
    // todo later: refactor when having JSF 2.0: using attributes of facesContext
    Map<String, Object> requestMap = facesContext.getExternalContext().getRequestMap();
    ClientPropertiesKey key = (ClientPropertiesKey) requestMap.get(KEY_IN_REQUEST);
    if (key == null) {
      ClientProperties clientProperties = VariableResolverUtils.resolveClientProperties(facesContext);
      key = new ClientPropertiesKey(clientProperties);
      requestMap.put(KEY_IN_REQUEST, key);
    }

    return key;
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

  }

// ///////////////////////////////////////////// logic

  public void storeInClientProperties() {
    ClientProperties client
        = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());

    client.setDebugMode(debugMode);
    client.setTheme(theme);
    client.setContentType(contentType);
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

    client.setTheme(theme);
    client.setContentType(contentType);
  }

  public void loadFromClientProperties() {
    ClientProperties client
        = VariableResolverUtils.resolveClientProperties(FacesContext.getCurrentInstance());

    debugMode = client.isDebugMode();
    theme = client.getTheme();
    contentType = client.getContentType();
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

            || horizontal.greaterThan(Measure.valueOf(30)) || horizontal.lessThan(Measure.valueOf(3))) {
          if (LOG.isDebugEnabled()) {
            LOG.debug("Ignoring strange scrollbarWeight: vertical=" + vertical + " horizontal=" + horizontal);
          }
        } else {
          final ClientProperties client = ClientProperties.getInstance(facesContext);
          client.setVerticalScrollbarWeight(vertical);
          client.setHorizontalScrollbarWeight(horizontal);
        }
      }
    } catch (final Exception e) {
      LOG.error("Error in decoding '" + name + "': value='" + value + "'", e);
    }
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

    ResponseUtils.ensureContentTypeHeader(facesContext, contentType);
    if (tobagoConfig.isSetNosniffHeader()) {
      ResponseUtils.ensureNosniffHeader(facesContext);
    }
    final String clientId = page.getClientId(facesContext);
    final ClientProperties client = ClientProperties.getInstance(facesContext);
    final ProjectStage projectStage = tobagoConfig.getProjectStage();
    final boolean developmentMode = projectStage == ProjectStage.Development;
    final boolean productionMode = projectStage == ProjectStage.Production;
    int clientLogSeverity = 2;
    if (developmentMode) {
      final String severity = (String) externalContext.getRequestMap().get(CLIENT_DEBUG_SEVERITY);
      if (LOG.isDebugEnabled()) {
        LOG.debug("get " + CLIENT_DEBUG_SEVERITY + " = " + severity);
      }
      if (severity != null) {
        try {
          int index = severity.indexOf(';');
          if (index == -1) {
            index = severity.length();
          }
          clientLogSeverity = Integer.parseInt(severity.substring(0, index));
        } catch (final NumberFormatException e) {
          // ignore; use default
        }
      }
    }
    final boolean preventFrameAttacks = tobagoConfig.isPreventFrameAttacks();

    if (!FacesContextUtils.isAjax(facesContext)) {
      final String title = (String) page.getAttributes().get(Attributes.LABEL);

      writer.startElement(HtmlElements.HEAD, null);

      // meta tags

      // this is needed, because websphere 6.0? ignores the setting of the content type on the response
      writer.startElement(HtmlElements.META, null);
      writer.writeAttribute(HtmlAttributes.HTTP_EQUIV, "Content-Type", false);
      writer.writeAttribute(HtmlAttributes.CONTENT, contentType, false);
      writer.endElement(HtmlElements.META);

      // title
      writer.startElement(HtmlElements.TITLE, null);
      writer.writeText(title != null ? title : "");
      writer.endElement(HtmlElements.TITLE);
      final Theme theme = client.getTheme();

      // style files
      for (final String styleFile : theme.getStyleResources(productionMode)) {
        writeStyle(facesContext, writer, styleFile);
      }

      for (final String styleFile : FacesContextUtils.getStyleFiles(facesContext)) {
        writeStyle(facesContext, writer, styleFile);
      }

      if (!productionMode) {
        checkDuplicates(theme.getStyleResources(productionMode), FacesContextUtils.getStyleFiles(facesContext));
      }

      final String icon = page.getApplicationIcon();
      if (icon != null) {
        final String href;
        if (ResourceManagerUtils.isAbsoluteResource(icon)) {
          href = icon;
        } else {
          href = ResourceManagerUtils.getImageWithPath(facesContext, icon);
        }

        if (href != null) {
          writer.startElement(HtmlElements.LINK, null);
          if (href.endsWith(".ico")) {
            writer.writeAttribute(HtmlAttributes.REL, "shortcut icon", false);
            writer.writeAttribute(HtmlAttributes.HREF, href, false);
          } else {
            // XXX IE only supports ICO files for favicons
            writer.writeAttribute(HtmlAttributes.REL, "icon", false);
            writer.writeAttribute(HtmlAttributes.TYPE, MimeTypeUtils.getMimeTypeForFile(href), false);
            writer.writeAttribute(HtmlAttributes.HREF, href, false);
          }
          writer.endElement(HtmlElements.LINK);
        } else {
          LOG.warn("Application icon '" + icon + "' not found!");
        }
      }

      // style sniplets
      final Set<String> styleBlocks = FacesContextUtils.getStyleBlocks(facesContext);
      if (styleBlocks.size() > 0) {
        writer.startElement(HtmlElements.STYLE, null);
        writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
        for (final String cssBlock : styleBlocks) {
          writer.write(cssBlock);
        }
        writer.endElement(HtmlElements.STYLE);
      }

      // render remaining script tags
      for (final String scriptFile : theme.getScriptResources(productionMode)) {
        encodeScript(facesContext, writer, scriptFile);
      }

      for (final String scriptFile : FacesContextUtils.getScriptFiles(facesContext)) {
        encodeScript(facesContext, writer, scriptFile);
      }

      if (!productionMode) {
        checkDuplicates(theme.getScriptResources(productionMode), FacesContextUtils.getScriptFiles(facesContext));
      }

      writer.startJavascript();
      // onload script
      writeEventFunction(writer, FacesContextUtils.getOnloadScripts(facesContext), "load", false);

      // onunload script
      writeEventFunction(writer, FacesContextUtils.getOnunloadScripts(facesContext), "unload", false);

      // onexit script
      writeEventFunction(writer, FacesContextUtils.getOnexitScripts(facesContext), "exit", false);

      writeEventFunction(writer, FacesContextUtils.getOnsubmitScripts(facesContext), "submit", true);

      int debugCounter = 0;
      for (final String scriptBlock : FacesContextUtils.getScriptBlocks(facesContext)) {

        if (LOG.isDebugEnabled()) {
          LOG.debug("write scriptblock " + ++debugCounter + " :\n" + scriptBlock);
        }
        writer.write(scriptBlock);
        writer.write('\n');
      }
      writer.endJavascript();
      writer.endElement(HtmlElements.HEAD);
    }

    if (portlet) {
      writer.startElement(HtmlElements.DIV, page);
      writer.writeClassAttribute(Classes.create(page, Markup.PORTLET));
    } else {
      writer.startElement(HtmlElements.BODY, page);
      writer.writeClassAttribute(Classes.create(page));
    }
    writer.writeIdAttribute(clientId);
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, page);
    HtmlRendererUtils.renderCommandFacet(page, facesContext, writer);

    writer.startElement(HtmlElements.FORM, page);
    if (preventFrameAttacks && !FacesContextUtils.isAjax(facesContext)) {
      writer.writeClassAttribute(Classes.create(page, "preventFrameAttacks", Markup.NULL));
    }
    writer.writeAttribute(HtmlAttributes.ACTION, formAction, true);
    if (partialAction != null) {
      writer.writeAttribute(DataAttributes.PARTIAL_ACTION, partialAction, true);
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("partial action = " + partialAction);
    }
    writer.writeIdAttribute(page.getFormId(facesContext));
    writer.writeAttribute(HtmlAttributes.METHOD, getMethod(page), false);
    final String enctype = FacesContextUtils.getEnctype(facesContext);
    if (enctype != null) {
      writer.writeAttribute(HtmlAttributes.ENCTYPE, enctype, false);
    }
    // TODO: enable configuration of  'accept-charset'
    writer.writeAttribute(HtmlAttributes.ACCEPT_CHARSET, AbstractUIPage.FORM_ACCEPT_CHARSET, false);
    // TODO evaluate 'accept' attribute usage
    //writer.writeAttribute(HtmlAttributes.ACCEPT, );
    writer.startElement(HtmlElements.INPUT, null);
    writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
    writer.writeNameAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "form-action");
    writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "form-action");
    writer.endElement(HtmlElements.INPUT);

    writer.startElement(HtmlElements.INPUT, null);
    writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
    writer.writeNameAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "context-path");
    writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "context-path");
    writer.writeAttribute(HtmlAttributes.VALUE, externalContext.getRequestContextPath(), true);
    writer.endElement(HtmlElements.INPUT);

    writer.startElement(HtmlElements.INPUT, null);
    writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
    writer.writeNameAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "action-position");
    writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "action-position");
    writer.endElement(HtmlElements.INPUT);

    writer.startElement(HtmlElements.INPUT, null);
    writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
    writer.writeNameAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "form-clientDimension");
    writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "form-clientDimension");
    writer.endElement(HtmlElements.INPUT);

    final boolean calculateScrollbarWeight =
        client.getVerticalScrollbarWeight() == null || client.getHorizontalScrollbarWeight() == null;

    if (calculateScrollbarWeight) {
      writer.startElement(HtmlElements.DIV, null);
      writer.writeClassAttribute(Classes.create(page, "scrollbarWeight", Markup.NULL));
      writer.startElement(HtmlElements.DIV, null);
      writer.endElement(HtmlElements.DIV);
      writer.endElement(HtmlElements.DIV);
    }

    writer.startElement(HtmlElements.INPUT, null);
    writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
    writer.writeNameAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "scrollbarWeight");
    writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "scrollbarWeight");
    if (client.getVerticalScrollbarWeight() != null && client.getHorizontalScrollbarWeight() != null) {
      writer.writeAttribute(
          HtmlAttributes.VALUE,
          client.getVerticalScrollbarWeight().getPixel() + ";" + client.getHorizontalScrollbarWeight().getPixel(),
          false);
    }
    writer.endElement(HtmlElements.INPUT);

    if (TobagoConfig.getInstance(FacesContext.getCurrentInstance()).isCheckSessionSecret()) {
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

    for (final UIPopup popup : popupArray) {
      RenderUtils.encode(facesContext, popup);
    }

    final String clientId = page.getClientId(facesContext);
    final ClientProperties clientProperties = ClientProperties.getInstance(facesContext);
    final ProjectStage projectStage = TobagoConfig.getInstance(facesContext).getProjectStage();
    final boolean developmentMode = projectStage == ProjectStage.Development;

    // avoid submit page in ie if the form contains only one input and you press the enter key in the input
    if (clientProperties.getUserAgent().isMsie()) {
      writer.startElement(HtmlElements.INPUT, null);
      writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.TEXT, false);
      writer.writeAttribute(HtmlAttributes.NAME, "tobago.dummy", false);
      writer.writeAttribute(HtmlAttributes.TABINDEX, -1);
      writer.writeAttribute(HtmlAttributes.STYLE, "visibility:hidden;display:none;", false);
      writer.endElement(HtmlElements.INPUT);
    }

    final List<String> messageClientIds = AjaxInternalUtils.getMessagesClientIds(facesContext);
    if (messageClientIds != null) {
      writer.startElement(HtmlElements.INPUT, null);
      writer.writeAttribute(HtmlAttributes.VALUE, StringUtils.join(messageClientIds, ','), true);
      writer.writeAttribute(HtmlAttributes.ID, clientId + ComponentUtils.SUB_SEPARATOR + "messagesClientIds", false);
      writer.writeAttribute(HtmlAttributes.NAME, clientId + ComponentUtils.SUB_SEPARATOR + "messagesClientIds", false);
      writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);
      writer.endElement(HtmlElements.INPUT);
    }

    // placeholder for menus
    writer.startElement(HtmlElements.DIV, page);
    writer.writeClassAttribute(Classes.create(page, "menuStore"));
    writer.endElement(HtmlElements.DIV);

    final Application application = facesContext.getApplication();
    final ViewHandler viewHandler = application.getViewHandler();

    writer.startElement(HtmlElements.SPAN, null);
    writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "jsf-state-container");
    writer.flush();
    if (!FacesContextUtils.isAjax(facesContext)) {
      viewHandler.writeState(facesContext);
    }
    writer.endElement(HtmlElements.SPAN);


    writer.endElement(HtmlElements.FORM);

    // The waiting for the next page image
    // Warning: The image must be loaded before the submit, otherwise this feature will not work with webkit
    // browsers. This is the reason, why this code has moved from JavaScript to the renderer here.
    writer.startElement(HtmlElements.IMG, null);
    writer.writeClassAttribute(Classes.create(page, "overlayWaitPreloadedImage"));
    final String wait = ResourceManagerUtils.getImageWithPath(facesContext, "image/tobago-overlay-wait.gif");
    writer.writeAttribute(HtmlAttributes.SRC, wait, false);
    writer.endElement(HtmlElements.IMG);

    writer.startElement(HtmlElements.IMG, null);
    writer.writeClassAttribute(Classes.create(page, "overlayErrorPreloadedImage"));
    final String error = clientProperties.getUserAgent().isMsie6()
        ? ResourceManagerUtils.getImageWithPath(facesContext, "image/remove.gif") // XXX why png doesn't work in ie6?
        : ResourceManagerUtils.getImageWithPath(facesContext, "image/dialog-error.png");
    writer.writeAttribute(HtmlAttributes.SRC, error, false);
    writer.endElement(HtmlElements.IMG);
View Full Code Here

Examples of org.apache.myfaces.tobago.context.ClientProperties

    }
    return onclick;
  }

  public static String getEmptyHref(FacesContext facesContext) {
    ClientProperties clientProperties = ClientProperties.getInstance(facesContext);
    return clientProperties.getUserAgent().isMsie() ? "#" : "javascript:;";
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.