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.renderkit.HeaderResourceProducer2, 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
`java.lang.Object` | `getChildrenParams(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Returns set of children UIParameters
`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` | `getFileListHeight(UIFileUpload component)` Gets a string representing css specific height of downloaded file list panel.
`java.lang.String` | `getFileListWidth(UIFileUpload component)` Gets a string representing css specific width of downloaded file list panel.
`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` | `getSessionId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)`
`java.lang.String` | `getStopScript(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)` Generates JS script for stopping uploading process
`java.lang.Integer` | `initMaxFilesCount(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String clientId)` Put max file count into session scope
`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, encodeToHead, getHeaderScripts, getHeaderStyles, getScripts, getStyles`

Methods inherited from class org.ajax4jsf.renderkit.RendererBase
`addResource, decode, doEncodeBegin, doEncodeEnd, encodeBegin, encodeEnd, getResource, getSkin, getUtils, preDecode, preEncodeBegin, 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

### initMaxFilesCount

    public java.lang.Integer initMaxFilesCount(javax.faces.context.FacesContext context,
                                               javax.faces.component.UIComponent component,
                                               java.lang.String clientId)

  Put max file count into session scope

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

### 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`

### getFileListHeight

    public java.lang.String getFileListHeight(UIFileUpload component)

  Gets a string representing css specific height of downloaded file list panel.

  Parameters:
    `component` - file upload component
  Returns:
    a string representing css specific height of downloaded file list panel

### getFileListWidth

    public java.lang.String getFileListWidth(UIFileUpload component)

  Gets a string representing css specific width of downloaded file list panel.

  Parameters:
    `component` - file upload component
  Returns:
    a string representing css specific width of downloaded file list panel

### 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:

### getChildrenParams

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

  Returns set of children UIParameters

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

### getSessionId

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

### 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 © 2009. All Rights Reserved.