FileUploadRendererBase (RichFaces JSF components library 3.2.0.CR3 API)
Keywords: org.richfaces.renderkit.FileUploadRendererBase class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.renderkit
Class FileUploadRendererBase

    java.lang.Object
      javax.faces.render.Renderer
          org.ajax4jsf.renderkit.RendererBase
              org.ajax4jsf.renderkit.HeaderResourcesRendererBase
                  org.richfaces.renderkit.TemplateEncoderRendererBase
                      org.richfaces.renderkit.FileUploadRendererBase

All Implemented Interfaces:
  org.ajax4jsf.renderkit.ChameleonRenderer, org.ajax4jsf.renderkit.HeaderResourceProducer, org.ajax4jsf.resource.ResourceProduser

Direct Known Subclasses:
  FileUploadRenderer

    public abstract class FileUploadRendererBase

extends org.richfaces.renderkit.TemplateEncoderRendererBase

Class provides base renderer for upload file component

Author:
  "Andrey Markavtsov"

Field Summary

Fields inherited from class org.ajax4jsf.renderkit.RendererBase
`JAVASCRIPT_NAMESPACE`

Constructor Summary
`FileUploadRendererBase()`

Method Summary
`java.lang.Object` | `_getLabels(java.lang.Object o)` Generates map with internalized labels to be put into JS
`protected void` | `doDecode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Overrides standard JSF component method.
`void` | `doEncodeChildren(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`void` | `encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`java.lang.Object` | `getAcceptedTypes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Return accepted types map
`java.lang.String` | `getAsEventHandler(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String attributeName)` Generate component custom events functions
`protected java.lang.Class<? extends javax.faces.component.UIComponent>` | `getComponentClass()`
`java.lang.String` | `getContainerId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Gets container id
`java.lang.String` | `getFileSizeScript(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Generates JS script for getting file size from server
`java.lang.String` | `getFormId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Gets form id
`java.lang.Object` | `getLabelMarkup(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Generates progress label markup
`java.util.Map<java.lang.String,java.lang.String>` | `getLabels(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Gets internalized labels.
`javax.faces.component.UIComponent` | `getProgressBar(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Returns progress bar
`java.lang.String` | `getProgressBarId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Gets progress bar Id
`java.lang.String` | `getStopScript(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Generates JS script for stopping uploading process
`void` | `renderProgress(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Renders progress bar

Methods inherited from class org.richfaces.renderkit.TemplateEncoderRendererBase
`createContentHandler, getRendersChildren, main, writeScriptBody, writeScriptBody`

Methods inherited from class org.ajax4jsf.renderkit.HeaderResourcesRendererBase
`encodeResourcesArray, getHeaderScripts, getHeaderStyles, getScripts, getStyles, preEncodeBegin`

Methods inherited from class org.ajax4jsf.renderkit.RendererBase
`addResource, decode, doEncodeBegin, doEncodeEnd, encodeBegin, encodeEnd, getResource, getSkin, getUtils, preDecode, renderChild, renderChildren`

Methods inherited from class javax.faces.render.Renderer
`convertClientId, getConvertedValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileUploadRendererBase

    public FileUploadRendererBase()

Method Detail

### doDecode

    protected void doDecode(javax.faces.context.FacesContext context,
                            javax.faces.component.UIComponent component)

  Overrides standard JSF component method.

  Overrides:
    `doDecode` in class `org.ajax4jsf.renderkit.RendererBase`
  Parameters:
    `context` - faces context
    `component` - file upload component

### getFormId

    public java.lang.String getFormId(javax.faces.context.FacesContext context,
                                      javax.faces.component.UIComponent component)

  Gets form id

  Parameters:
    `context` - - faces context
    `component` - - component
  Returns:
    String form id

### getContainerId

    public java.lang.String getContainerId(javax.faces.context.FacesContext context,
                                           javax.faces.component.UIComponent component)

  Gets container id

  Parameters:
    `context` - - faces context
    `component` - - component
  Returns:
    String container id

### _getLabels

    public java.lang.Object _getLabels(java.lang.Object o)

  Generates map with internalized labels to be put into JS

  Parameters:
    `o` - map of labels
  Returns:
    javascript hash map

### getLabels

    public java.util.Map<java.lang.String,java.lang.String> getLabels(javax.faces.context.FacesContext context,
                                                                      javax.faces.component.UIComponent component)

  Gets internalized labels. At the first system is looking for them in appropriate attributes if they are defined. Next search place is application and file upload bundles. If no result - default label value will be set up.

  Parameters:
    `context` - facesContext instance
    `component` - UIComponent
  Returns:
    map of labels

### getComponentClass

    protected java.lang.Class<? extends javax.faces.component.UIComponent> getComponentClass()

  Specified by:
    `getComponentClass` in class `org.ajax4jsf.renderkit.RendererBase`

### getAcceptedTypes

    public java.lang.Object getAcceptedTypes(javax.faces.context.FacesContext context,
                                             javax.faces.component.UIComponent component)

  Return accepted types map

  Parameters:
    `context` -
    `component` -
  Returns:

### getStopScript

    public java.lang.String getStopScript(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIComponent component)
                                   throws java.io.IOException

  Generates JS script for stopping uploading process

  Parameters:
    `context` -
    `component` -
  Returns:
  Throws:
    `java.io.IOException`

### getFileSizeScript

    public java.lang.String getFileSizeScript(javax.faces.context.FacesContext context,
                                              javax.faces.component.UIComponent component)
                                       throws java.io.IOException

  Generates JS script for getting file size from server

  Parameters:
    `context` -
    `component` -
  Returns:
  Throws:
    `java.io.IOException`

### getLabelMarkup

    public java.lang.Object getLabelMarkup(javax.faces.context.FacesContext context,
                                           javax.faces.component.UIComponent component)
                                    throws java.io.IOException

  Generates progress label markup

  Parameters:
    `context` -
    `component` -
  Returns:
  Throws:
    `java.io.IOException`

### getAsEventHandler

    public java.lang.String getAsEventHandler(javax.faces.context.FacesContext context,
                                              javax.faces.component.UIComponent component,
                                              java.lang.String attributeName)

  Generate component custom events functions

  Parameters:
    `context` -
    `component` -
    `attributeName` -
  Returns:

### getProgressBarId

    public java.lang.String getProgressBarId(javax.faces.context.FacesContext context,
                                             javax.faces.component.UIComponent component)
                                      throws java.io.IOException

  Gets progress bar Id

  Parameters:
    `context` -
    `component` -
  Returns:
  Throws:
    `java.io.IOException`

### renderProgress

    public void renderProgress(javax.faces.context.FacesContext context,
                               javax.faces.component.UIComponent component)
                        throws java.io.IOException

  Renders progress bar

  Parameters:
    `context` -
    `component` -
  Throws:
    `java.io.IOException`

### getProgressBar

    public javax.faces.component.UIComponent getProgressBar(javax.faces.context.FacesContext context,
                                                            javax.faces.component.UIComponent component)

  Returns progress bar

  Parameters:
    `context` -
    `component` -
  Returns:

### encodeChildren

    public void encodeChildren(javax.faces.context.FacesContext context,
                               javax.faces.component.UIComponent component)
                        throws java.io.IOException

  Overrides:
    `encodeChildren` in class `org.richfaces.renderkit.TemplateEncoderRendererBase`
  Throws:
    `java.io.IOException`

### doEncodeChildren

    public void doEncodeChildren(javax.faces.context.ResponseWriter writer,
                                 javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent component)
                          throws java.io.IOException

  Overrides:
    `doEncodeChildren` in class `org.ajax4jsf.renderkit.RendererBase`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008. All Rights Reserved.