org.richfaces.renderkit.html
Class TableSelectionRendererContributor

java.lang.Object
  extended by org.richfaces.renderkit.html.TableSelectionRendererContributor
All Implemented Interfaces:
HTMLEncodingContributor, org.richfaces.renderkit.RendererContributor, org.richfaces.renderkit.ScriptOptionsContributor

public class TableSelectionRendererContributor
extends java.lang.Object
implements org.richfaces.renderkit.RendererContributor, HTMLEncodingContributor

Renderer contributor based on SelectionRendererContributor} adapted for UIExtendedDataTable component.

Author:
pawelgo

Field Summary
static java.lang.String CLIENT_SELECTION
           
 
Constructor Summary
TableSelectionRendererContributor()
           
 
Method Summary
 org.richfaces.renderkit.ScriptOptions buildOptions(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
 void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, org.richfaces.renderkit.CompositeRenderer compositeRenderer)
           
 void encode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
 java.lang.Class<?> getAcceptableClass()
           
static java.lang.String getGridId(javax.faces.context.FacesContext context, UIExtendedDataTable table)
           
 java.lang.String getScriptContribution(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
 java.lang.String[] getScriptDependencies()
           
static java.lang.String getSelectionInputName(javax.faces.context.FacesContext context, UIExtendedDataTable table)
           
 java.lang.String[] getStyleDependencies()
           
 boolean shouldAddToSelection(int i, ClientSelection oldSelection, ClientSelection newSelection)
           
 boolean shouldRemoveFromSelection(int i, ClientSelection oldSelection, ClientSelection newSelection)
           
 void writeSelection(javax.faces.context.FacesContext context, UIExtendedDataTable table)
          Get client selection from the component, transform it into string form, and write it as hidden input
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLIENT_SELECTION

public static final java.lang.String CLIENT_SELECTION
See Also:
Constant Field Values
Constructor Detail

TableSelectionRendererContributor

public TableSelectionRendererContributor()
Method Detail

getSelectionInputName

public static final java.lang.String getSelectionInputName(javax.faces.context.FacesContext context,
                                                           UIExtendedDataTable table)

getGridId

public static final java.lang.String getGridId(javax.faces.context.FacesContext context,
                                               UIExtendedDataTable table)

decode

public void decode(javax.faces.context.FacesContext context,
                   javax.faces.component.UIComponent component,
                   org.richfaces.renderkit.CompositeRenderer compositeRenderer)
Specified by:
decode in interface org.richfaces.renderkit.RendererContributor

getAcceptableClass

public java.lang.Class<?> getAcceptableClass()
Specified by:
getAcceptableClass in interface org.richfaces.renderkit.RendererContributor

getScriptContribution

public java.lang.String getScriptContribution(javax.faces.context.FacesContext context,
                                              javax.faces.component.UIComponent component)
Specified by:
getScriptContribution in interface org.richfaces.renderkit.RendererContributor

getScriptDependencies

public java.lang.String[] getScriptDependencies()
Specified by:
getScriptDependencies in interface org.richfaces.renderkit.RendererContributor

getStyleDependencies

public java.lang.String[] getStyleDependencies()
Specified by:
getStyleDependencies in interface org.richfaces.renderkit.RendererContributor

buildOptions

public org.richfaces.renderkit.ScriptOptions buildOptions(javax.faces.context.FacesContext context,
                                                          javax.faces.component.UIComponent component)
Specified by:
buildOptions in interface org.richfaces.renderkit.ScriptOptionsContributor

encode

public void encode(javax.faces.context.FacesContext context,
                   javax.faces.component.UIComponent component)
            throws java.io.IOException
Specified by:
encode in interface HTMLEncodingContributor
Throws:
java.io.IOException

shouldAddToSelection

public boolean shouldAddToSelection(int i,
                                    ClientSelection oldSelection,
                                    ClientSelection newSelection)

shouldRemoveFromSelection

public boolean shouldRemoveFromSelection(int i,
                                         ClientSelection oldSelection,
                                         ClientSelection newSelection)

writeSelection

public void writeSelection(javax.faces.context.FacesContext context,
                           UIExtendedDataTable table)
                    throws java.io.IOException
Get client selection from the component, transform it into string form, and write it as hidden input

Parameters:
context - faces context
table - table component
Throws:
java.io.IOException


Copyright © 2010. All Rights Reserved.