Package org.apache.myfaces.trinidad.context

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


    // Make sure we have a name
    if (name != null)
    {
      // Get the Icon from the Skin
      UIXRenderingContext context = uix.getRenderingContext();
      RenderingContext arc = RenderingContext.getCurrentInstance();
      FacesContext fContext = context.getFacesContext();
      Skin skin = context.getSkin();
      Icon icon = skin.getIcon(name);

      Object uri = icon.getImageURI(fContext, arc);
View Full Code Here


    List<String> scriptList = _getScriptList(context, false);
    boolean hasScript = ((scriptList != null) && !scriptList.isEmpty());

    if (hasDialog || hasScript)
    {
      RenderingContext arc = RenderingContext.getCurrentInstance();
      if (hasDialog)
        DialogRequest.addDependencies(context, arc);

      // =-=AEW How to pick a proper ID?

      // Write out a script;  let PPR know to use it
      String scriptId = "::launchScript";
      PartialPageContext ppContext = arc.getPartialPageContext();
      // TODO: Create the span with a bogus component where
      // getClientId() returns the scriptId;  this avoids
      // the need to downcast - you just need to
      // call addPartialTarget().  Or, come up with a better
      // PPR api to make it simpler
View Full Code Here

   * Called when the encoding of a page completes, whether or not there
   * were exceptions.
   */
  public void encodeFinally(FacesContext context)
  {
    RenderingContext arc = RenderingContext.getCurrentInstance();
    if (arc != null)
    {
      arc.release();
    }
    else
    {
      _LOG.warning("No AdfRenderingContext available");
    }
View Full Code Here

    Icon icon)
    throws IOException
  {
    if (icon != null)
    {
      RenderingContext arc = RenderingContext.getCurrentInstance();
      FacesContext fContext = context.getFacesContext();
      __renderBackgroundIcon(fContext, arc, icon);
    }
  }
View Full Code Here

  @Override
  public void addPartialTarget(UIComponent newTarget)
  {
    FacesContext fContext = __getFacesContext();

    RenderingContext afContext = RenderingContext.getCurrentInstance();

    PartialPageContext pContext = null;

    if (afContext != null)
      pContext = afContext.getPartialPageContext();

    // find the nearest ancestor that generates html markup:
    newTarget = _getNearestPPRTarget(newTarget);

    Object savedKey = null;
View Full Code Here

    out.writeAttribute("id", compId, null);

    UIXRenderingContext rCtx = getRenderingContext(context, component);

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

    out.startElement("table", component);
    out.writeAttribute("cellSpacing", "0", null);
    out.writeAttribute("cellPadding", "0", null);
    out.writeAttribute("summary", "", null);

    RenderingContext arc = RenderingContext.getCurrentInstance();
    XhtmlRenderer.renderStyleClass(context, arc, getContentStyleClass());

    out.startElement("tr", component);
    out.startElement("td", component);
View Full Code Here

    }

    @Override
    protected String getDisclosedText(FacesBean bean)
    {
      RenderingContext arc = RenderingContext.getCurrentInstance();
      return arc.getTranslatedString(_HIDE_ALL_DETAILS_TEXT_KEY);
    }
View Full Code Here

    }

    @Override
    protected String getUndisclosedText(FacesBean bean)
    {
      RenderingContext arc = RenderingContext.getCurrentInstance();
      return arc.getTranslatedString(_SHOW_ALL_DETAILS_TEXT_KEY);
    }
View Full Code Here

    throws IOException
  {
    Map<String, String> requestParams =
      context.getExternalContext().getRequestParameterMap();
   
    RenderingContext arc = RenderingContext.getCurrentInstance();
    CoreDocument doc = new CoreDocument();
    context.getViewRoot().getChildren().add(doc);

    doc.setTitle(arc.getTranslatedString("af_inputColor.PICKER_TITLE"));
   
    CoreForm form = new CoreForm();
    form.setId("d");
    doc.getChildren().add(form);
   
    HtmlTableLayout tl = new HtmlTableLayout();
    form.getChildren().add(tl);
   
    HtmlRowLayout rl1 = new HtmlRowLayout();
    tl.getChildren().add(rl1);
    HtmlCellFormat cf1 = new HtmlCellFormat();
    rl1.getChildren().add(cf1);
    cf1.setHalign("center");
   
    CoreInputColor sic = new CoreInputColor();
    cf1.getChildren().add(sic);
    sic.setId("c");
    sic.setOnkeypress("if(_getKC(event)==13){selectColor();return false}");
    Converter converter = _getConverter(requestParams);
    Object value =
      converter.getAsObject(context, sic, requestParams.get("value"));
    sic.setConverter(converter);
    sic.setValue(value);
    sic.setChooseId("choose");
    sic.setLabel(arc.getTranslatedString("af_inputColor.PICKER_PROMPT"));

    HtmlRowLayout rl2 = new HtmlRowLayout();
    tl.getChildren().add(rl2);
    CoreSpacer spacer = new CoreSpacer();
    rl2.getChildren().add(spacer);
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.