Examples of RenderingContext


Examples of org.apache.myfaces.trinidad.context.RenderingContext

   */
  @SuppressWarnings("unchecked")
  static public void service(FacesContext context)
    throws IOException
  {
    RenderingContext arc = RenderingContext.getCurrentInstance();
    CoreDocument doc = new CoreDocument();
    context.getViewRoot().getChildren().add(doc);
    doc.setTitle(arc.getTranslatedString(_DIALOG_TITLE_KEY));

    CoreForm form = new CoreForm();
    doc.getChildren().add(form);
    form.setId("a");

    boolean isDesktop = (arc.getAgent().getType().equals(Agent.TYPE_DESKTOP));

    //
    // Create the calendar row
    //
    UIComponent calendarRow = _createRow(isDesktop,
                                         XhtmlConstants.H_ALIGN_END);
    CoreChooseDate ccd = CalendarUtils.createChooseDate(context);
    calendarRow.getChildren().add(ccd);

    // Get a destination that points back to this dialog, including
    // any viewIDs
    String destination =
      GenericEntry.getGenericEntryURL(context,
                                      GenericEntry.CALENDAR_DIALOG_ENTRY);
    ccd.getAttributes().put("destination", destination);

    //
    // Create a spacer
    //
    UIComponent spacerRow = _createRow(isDesktop, null);
    CoreSpacer cos = new CoreSpacer();
    spacerRow.getChildren().add(cos);
    cos.setHeight("8");

    //
    // Create the button row
    //
    UIComponent buttonRow = _createRow(isDesktop, XhtmlConstants.H_ALIGN_END);

    CoreGoButton cancelButton =
       JspUtils.createGoButton(arc, _CANCEL_LABEL_KEY);
    buttonRow.getChildren().add(cancelButton);

    Object cap = arc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_MULTIPLE_WINDOWS);
    boolean multWindowsSupported = Boolean.TRUE.equals( cap );
    if (multWindowsSupported )
    {
      cancelButton.setOnclick("return _doCancel()");
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.RenderingContext

    throws IOException
  {
    Map<String, String> requestParams =
      context.getExternalContext().getRequestParameterMap();

    RenderingContext arc = RenderingContext.getCurrentInstance();
    arc.getPartialPageContext().addPartialTarget(
              requestParams.get(XhtmlConstants.SOURCE_PARAM));

    // Use Html and Body to avoid the cost of the stylesheet
    HtmlHtml html = new HtmlHtml();
    context.getViewRoot().getChildren().add(html);
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.RenderingContext

      {
        iconName   = AF_TABLE_NB_NEXT_DISABLED_ICON_NAME;
      }
    }
    Skin skin = context.getSkin();
    RenderingContext arc = RenderingContext.getCurrentInstance();
    FacesContext fContext = context.getFacesContext();

    String iconURI = (String)(skin.getIcon(
                                          iconName).getImageURI(fContext, arc));
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.RenderingContext

      _addValidatedInput(clientId);
    }

    FacesContext context = FacesContext.getCurrentInstance();
    RenderingContext rc = RenderingContext.getCurrentInstance();

    if (converter != null && converter instanceof ClientConverter)
    {
      if (convertValidateInfo == null)
        convertValidateInfo = _getNewConvertValidate(clientId);
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.RenderingContext

                                            String.valueOf(percentComplete));
    // render the determinateIcon if we have one
    if ((determinateIcon != null) &&
        (!determinateIcon.equals(NullIcon.sharedInstance())))
    {
      RenderingContext arc = RenderingContext.getCurrentInstance();
      FacesContext fContext = context.getFacesContext();
      OutputUtils.renderIcon(fContext,
                             arc,
                             determinateIcon,
                             altText,
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.RenderingContext

      getTranslatedString(context, "af_progressIndicator.PROCESSING");
    // render the indeterminateIcon if we have one
    if ((indeterminateIcon != null) &&
        (!indeterminateIcon.equals(NullIcon.sharedInstance())))
    {
      RenderingContext arc = RenderingContext.getCurrentInstance();
      FacesContext fContext = context.getFacesContext();
      OutputUtils.renderIcon(fContext,
                             arc,
                             indeterminateIcon,
                             processingString,
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.RenderingContext

    // If we didn't get the style classes Dictionary yet,
    // try to get it now
    if (styleClasses == null)
    {
      RenderingContext arc = RenderingContext.getCurrentInstance();
      styleClasses = context.getSkin().getStyleClassMap(arc);

      if (styleClasses == null)
        styleClasses = _NULL_STYLE_CLASSES;
View Full Code Here

Examples of org.apache.shindig.gadgets.RenderingContext

    boolean debug = "1".equals(debugStr);
    if (container == null) {
      container = ContainerConfig.DEFAULT_CONTAINER;
    }
    RenderingContext context = "1".equals(containerStr) ?
        RenderingContext.CONTAINER : RenderingContext.GADGET;

    Collection<GadgetFeature> features = registry.getFeatures(needed);
    StringBuilder jsData = new StringBuilder();
    for (GadgetFeature feature : features) {
View Full Code Here

Examples of org.apache.shindig.gadgets.servlet.GadgetsHandlerApi.RenderingContext

    public String getGadget() { return gadget; }
    public String getRepository() { return repository; }
  }

  private RenderingContext getRenderingContext(String param) {
    RenderingContext context = RenderingContext.GADGET;
    if ("1".equals(param)) {
      context = RenderingContext.CONTAINER;
    } else if ("2".equals(param)) {
      context = RenderingContext.CONFIGURED_GADGET;
    }
View Full Code Here

Examples of org.xhtmlrenderer.render.RenderingContext

        if (root == null) {
            //Uu.p("dispatching an initial resize event");
            //queue.dispatchLayoutEvent(new ReflowEvent(ReflowEvent.CANVAS_RESIZED, this.getSize()));
            XRLog.render(Level.FINE, "skipping the actual painting");
        } else {
            RenderingContext c = newRenderingContext((Graphics2D) g);
            long start = System.currentTimeMillis();
            doRender(c, root);
            long end = System.currentTimeMillis();
            XRLog.render(Level.FINE, "RENDERING TOOK " + (end - start) + " ms");
        }
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.