Examples of UIMediaOutput


Examples of org.ajax4jsf.component.UIMediaOutput

  /* (non-Javadoc)
   * @see org.ajax4jsf.renderkit.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
   */
  protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    UIMediaOutput mmedia = (UIMediaOutput) component;
    String element = mmedia.getElement();
    if(null == element){
      throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"element",component.getClientId(context)));
    }
    writer.endElement(element);
  }
View Full Code Here

Examples of org.ajax4jsf.component.UIMediaOutput

  /* (non-Javadoc)
   * @see org.ajax4jsf.renderkit.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
   */
  protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    UIMediaOutput mmedia = (UIMediaOutput) component;
    String element = mmedia.getElement();
    if(null == element){
      throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"element",component.getClientId(context)));
    }
    String uriAttribute = mmedia.getUriAttribute();
    // Check for pre-defined attributes
    if(null == uriAttribute){
      uriAttribute = (String) uriAttributes.get(element);
      if(null == uriAttribute){
        throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"uriAttribute",component.getClientId(context)));
      }
    }
    writer.startElement(element,mmedia);
    getUtils().encodeId(context,component);
    InternetResourceBuilder internetResourceBuilder = InternetResourceBuilder.getInstance();
    InternetResource resource = internetResourceBuilder.createUserResource(mmedia.isCacheable(),mmedia.isSession(),mmedia.getMimeType());
    StringBuffer uri = new StringBuffer(resource.getUri(context,mmedia));
    // Append parameters to resource Uri
    boolean haveQestion = uri.indexOf("?")>=0;
        Iterator kids = component.getChildren().iterator();
        while (kids.hasNext()) {
View Full Code Here

Examples of org.ajax4jsf.component.UIMediaOutput

  /* (non-Javadoc)
   * @see org.ajax4jsf.renderkit.RendererBase#doEncodeEnd(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
   */
  protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    UIMediaOutput mmedia = (UIMediaOutput) component;
    String element = mmedia.getElement();
    if(null == element){
      throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"element",component.getClientId(context)));
    }
    writer.endElement(element);
  }
View Full Code Here

Examples of org.ajax4jsf.component.UIMediaOutput

  /* (non-Javadoc)
   * @see org.ajax4jsf.renderkit.RendererBase#doEncodeBegin(javax.faces.context.ResponseWriter, javax.faces.context.FacesContext, javax.faces.component.UIComponent)
   */
  protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
    UIMediaOutput mmedia = (UIMediaOutput) component;
    String element = mmedia.getElement();
    if(null == element){
      throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"element",component.getClientId(context)));
    }
    String uriAttribute = mmedia.getUriAttribute();
    // Check for pre-defined attributes
    if(null == uriAttribute){
      uriAttribute = (String) uriAttributes.get(element);
      if(null == uriAttribute){
        throw new FacesException(Messages.getMessage(Messages.NULL_ATTRIBUTE_ERROR,"uriAttribute",component.getClientId(context)));
      }
    }
    writer.startElement(element,mmedia);
    getUtils().encodeId(context,component);
    InternetResourceBuilder internetResourceBuilder = InternetResourceBuilder.getInstance();
    InternetResource resource = internetResourceBuilder.createUserResource(mmedia.isCacheable(),mmedia.isSession(),mmedia.getMimeType());
    StringBuffer uri = new StringBuffer(resource.getUri(context,mmedia));
    // Append parameters to resource Uri
    boolean haveQestion = uri.indexOf("?")>=0;
        Iterator kids = component.getChildren().iterator();
        while (kids.hasNext()) {
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.