Top Description Methods
javax.faces.component

public Interface TransientStateHelper

extends TransientStateHolder
Known Direct Implementers
javax.faces.component.ComponentStateHelper

Define a Map-like contract that makes it easier for components to implement TransientStateHolder. Each UIComponent in the view will return an implementation of this interface from its UIComponent#getTransientStateHelper method.

The values retrieved or saved through getTransient or putTransient will not be preserved between requests.

Since
2.1

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the stored value.
getTransient
(Object
the key for which the value should be returned.
key
)

Return the value currently associated with the specified key if any.

public Object

Returns:

the stored value.
getTransient
(Object
the key for which the value should be returned.
key
,
Object
the value to return if no value is found in the call to get().
defaultValue
)

Performs the same logic as getTransient } but if no value is found, this will return the specified defaultValue

public Object

Returns:

the previously stored value
putTransient
(Object
the key for the value
key
,
Object
the value
value
)

Return the previously stored value and store the specified key/value pair.

Inherited from javax.faces.component.TransientStateHolder:
restoreTransientStatesaveTransientState

Method Detail

getTransientback to summary
public Object getTransient(Object key)

Return the value currently associated with the specified key if any.

Parameters
key:Object

the key for which the value should be returned.

Returns:Object

the stored value.

Since
2.1
getTransientback to summary
public Object getTransient(Object key, Object defaultValue)

Performs the same logic as getTransient } but if no value is found, this will return the specified defaultValue

Parameters
key:Object

the key for which the value should be returned.

defaultValue:Object

the value to return if no value is found in the call to get().

Returns:Object

the stored value.

Since
2.1
putTransientback to summary
public Object putTransient(Object key, Object value)

Return the previously stored value and store the specified key/value pair. This is intended to store data that would otherwise reside in an instance variable on the component.

Parameters
key:Object

the key for the value

value:Object

the value

Returns:Object

the previously stored value

Since
2.1