Package org.apache.myfaces.trinidad.context

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


  protected boolean isDisabled(
    UIXRenderingContext context,
    UINode           node
    )
  {
    RenderingContext arc = RenderingContext.getCurrentInstance();
    boolean isDisabled = ((CoreRenderingContext) arc).isLinkDisabled();
    boolean disabledAttr = XhtmlLafUtils.getLocalBooleanAttribute(context,
                                               node,
                                               DISABLED_ATTR,
                                               false);
View Full Code Here


   * of their disabled attributes.
   * @see #isDisabled(UIXRenderingContext,UINode)
   */
  public static void setDisabled(UIXRenderingContext context, boolean isDisabled)
  {
    RenderingContext arc = RenderingContext.getCurrentInstance();
    ((CoreRenderingContext) arc).setLinkDisabled(isDisabled);
  }
View Full Code Here

      ResponseWriter writer = context.getResponseWriter();
      writer.startElement(TABLE_DATA_ELEMENT, null);

      // Render the icon
      FacesContext fContext = context.getFacesContext();
      RenderingContext arc = RenderingContext.getCurrentInstance();
      OutputUtils.renderIcon(fContext, arc, icon, "", null);

      writer.endElement(TABLE_DATA_ELEMENT);
    }
  }
View Full Code Here

    out.writeAttribute("border", "0", null);
    out.writeAttribute("cellspacing", "0", null);
    out.writeAttribute("cellpadding", "0", null);

    String styleClass = (String) component.getAttributes().get("styleClass");
    RenderingContext arc = RenderingContext.getCurrentInstance();
    if (styleClass != null)
    {
      XhtmlRenderer.renderStyleClass(context, arc, styleClass);
    }
View Full Code Here

   */
  @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

    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

      {
        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

      _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

                                            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

      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

TOP

Related Classes of org.apache.myfaces.trinidad.context.RenderingContext

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.