| java.lang.Object org.zkoss.seam.ContextUtil
ContextUtil | public class ContextUtil (Code) | | This class helps developers to do thing with Seam's context
author: Dennis.Chen |
Method Summary | |
public static Object | getBean(String name) Get bean form Seam's Context by name. | public static void | putToContext(String name, Object bean) Put bean into Seam's context ,
the scope is depends on component's scope. | public static void | putToContext(String name, Object bean, ScopeType scope) | public static void | updateToContext(String name, Object bean) Update bean to Seam's context by name.
This method will force getting a previous bean in context or by Seam's Component.getInstance(). |
getBean | public static Object getBean(String name)(Code) | | Get bean form Seam's Context by name.
Parameters: name - name of component bean of name |
putToContext | public static void putToContext(String name, Object bean)(Code) | | Put bean into Seam's context ,
the scope is depends on component's scope.
Note that, if there is no component found by name, the scope will be ScopeType.CONVERSATION.
Parameters: name - name of component Parameters: bean - new instance or updated instance of component. |
putToContext | public static void putToContext(String name, Object bean, ScopeType scope)(Code) | | Put bean into Seam's context
Parameters: name - name of component Parameters: bean - new instance or updated instance of component. |
updateToContext | public static void updateToContext(String name, Object bean)(Code) | | Update bean to Seam's context by name.
This method will force getting a previous bean in context or by Seam's Component.getInstance().
(This is becase if there is nothing in context, then there is nothing to update into context.
This also make sure Seam will inject updated bean in context into other beans.)
Parameters: name - name of component Parameters: bean - new instance or updated instance of component. |
|
|