org.javalid.core.extlookup
Interface JsfLookupExt

All Known Implementing Classes:
JsfLookupExtImpl

public interface JsfLookupExt

This interface defines the contract that must be used for looking up JSF (Java Server Faces) beans. The implementing class can be found inside the jsf-dep project. As you can see we return an Object, this is to keep things independent, so that the core can be used independently if you do not use JSF.

The default implementation class can be found in the jsf-dep project, if you wish to provide a custom implementation, feel free and specify in the jv-config.xml file.

Since:
1.0
Version:
1.0
Author:
M.Reuvers

Method Summary
 java.lang.Object getJsfBean(java.lang.String jsfExpression)
          This method locates given bean and returns it.
 void setJvConfigurationWrapper(JvConfigurationWrapper jvConfigWrapper)
          Called by the jv framework when initializing the implementation class (right after constructing an instance).
 

Method Detail

getJsfBean

java.lang.Object getJsfBean(java.lang.String jsfExpression)
This method locates given bean and returns it. Raises a JvLookupException if the jsf bean is not found. The implementing class must use the current faces context and use a ValueBinding to retrieve an instance. Other than a backing bean, one could directly lookup a property of a backing bean too this way.

Parameters:
jsfExpression - A valid jsf expression, which will be resolved. Make sure to include the jsf tags: #{myBackingBeanName} for instance.
Returns:
Jsf object (backing bean e.g., cast to proper instance yourself) if found, exception raised if not

setJvConfigurationWrapper

void setJvConfigurationWrapper(JvConfigurationWrapper jvConfigWrapper)
Called by the jv framework when initializing the implementation class (right after constructing an instance).

Parameters:
jvConfigWrapper - The configuration of the framework, allowing access to the current configuration.