Examples of UIStyle


Examples of org.apache.myfaces.tobago.component.UIStyle

public class StyleRenderer extends RendererBase {

  public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
    super.prepareRender(facesContext, component);
    UIStyle styleComponent = (UIStyle) component;
    String file = styleComponent.getFile();
    if (file != null) {
      FacesContextUtils.addStyleFile(facesContext, file);
    }
    String style = styleComponent.getStyle();
    if (style != null) {
      FacesContextUtils.addStyleBlock(facesContext, style);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIStyle

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIStyle component = (UIStyle) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (style != null) {
      component.setValueExpression("style", style);
    }

    if (file != null) {
      component.setValueExpression("file", file);
    }

  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIStyle

  @Override
  public int doAfterBody() throws javax.servlet.jsp.JspException {
    final String content = bodyContent.getString();
    bodyContent.clearBody();
    if (StringUtils.isNotBlank(content)) {
      final UIStyle component = (UIStyle) getComponentInstance();
      component.setStyle(content.trim());
    }
    return super.doAfterBody();
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIStyle

public class StyleRenderer extends RendererBase {

  public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
    super.prepareRender(facesContext, component);
    UIStyle styleComponent = (UIStyle) component;
    String file = styleComponent.getFile();
    if (file != null) {
      FacesContextUtils.addStyleFile(facesContext, file);
    }
    String style = styleComponent.getStyle();
    if (style != null) {
      FacesContextUtils.addStyleBlock(facesContext, style);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIStyle

public class StyleRenderer extends RendererBase {

  public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
    super.prepareRender(facesContext, component);
    final UIStyle styleComponent = (UIStyle) component;
    final String file = styleComponent.getFile();
    if (file != null) {
      FacesContextUtils.addStyleFile(facesContext, file);
    }
    final String style = styleComponent.getStyle();
    if (style != null) {
      FacesContextUtils.addStyleBlock(facesContext, style);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIStyle

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIStyle component = (UIStyle) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (style != null) {
      component.setValueExpression("style", style);
    }

    if (file != null) {
      component.setValueExpression("file", file);
    }

  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIStyle

  @Override
  public int doAfterBody() throws javax.servlet.jsp.JspException {
    final String content = bodyContent.getString();
    bodyContent.clearBody();
    if (StringUtils.isNotBlank(content)) {
      final UIStyle component = (UIStyle) getComponentInstance();
      component.setStyle(content.trim());
    }
    return super.doAfterBody();
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIStyle

public class StyleRenderer extends RendererBase {

  public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
    super.prepareRender(facesContext, component);
    final UIStyle styleComponent = (UIStyle) component;
    final String file = styleComponent.getFile();
    if (file != null) {
      FacesContextUtils.addStyleFile(facesContext, file);
    }
    final String style = styleComponent.getStyle();
    if (style != null) {
      FacesContextUtils.addStyleBlock(facesContext, style);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.tobago.component.UIStyle

  public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
    super.prepareRender(facesContext, component);
    if (facesContext instanceof TobagoFacesContext) {
      TobagoFacesContext pageFacesContext = (TobagoFacesContext) facesContext;
      UIStyle styleComponent = (UIStyle) component;
      String file = styleComponent.getFile();
      if (file != null) {
        pageFacesContext.getStyleFiles().add(file);
      }
      String style = styleComponent.getStyle();
      if (style != null) {
        pageFacesContext.getStyleBlocks().add(style);
      }
    }
  }
View Full Code Here

Examples of org.jboss.seam.ui.component.UIStyle

{
  
   @Override
   protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException
   {
      UIStyle style = (UIStyle) component;
     
      startElement(writer, style);

      writer.writeAttribute("id", component.getClientId(context), "id");
     
      if (style.getStyleClass() != null)
      {
         writer.writeAttribute("class", style.getStyleClass(), "styleClass");
      }

      if (style.getStyle() != null)
      {
         writer.writeAttribute("style", style.getStyle(), "style");
      }
   }
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.