ilog.views.faces.dhtml.renderkit
Class ComponentCreationListener

java.lang.Object
  extended by ilog.views.faces.dhtml.renderkit.ComponentCreationListener

public class ComponentCreationListener
extends Object

The ComponentCreationListener is a listener class used to resolve the dependencies between the JViews DHTML components. When the component that is needed by this listener is created, the onComponentCreated must be called. This method should be overridden to resolve the dependency.

Since:
JViews 6.0

Constructor Summary
ComponentCreationListener(UIComponent component, String id, String property)
          The base constructor of a ComponentCreationListener
 
Method Summary
protected  UIComponent getComponent()
          Returns the component that has a dependency that needs to e resolved.
 String getComponentId()
          Returns the absolute id of the component that needs its dependency to be resolved.
 String getDependencyId()
          Returns the absolute id of the component that is needed to resolve this dependency.
protected  String getJSMethod()
          Returns a String that represents the javascript method from a property.
 String getProperty()
          Returns the property that needs to be refreshed by the resolved dependency.
 void onComponentCreated(Writer writer, UIComponent depComponent)
          Emits the javascript code to set the javascript property, if needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentCreationListener

public ComponentCreationListener(UIComponent component,
                                 String id,
                                 String property)
The base constructor of a ComponentCreationListener

Parameters:
component - The component that has an unresolved dependency.
id - The id of the component that is needed.
property - The property.
Method Detail

getComponent

protected UIComponent getComponent()
Returns the component that has a dependency that needs to e resolved.

Returns:
The component that has a dependency.

getProperty

public String getProperty()
Returns the property that needs to be refreshed by the resolved dependency.

Returns:
The property that needs to be refreshed by the resolved dependency.

getComponentId

public String getComponentId()
Returns the absolute id of the component that needs its dependency to be resolved.

Returns:
The absolute id of the component that need to resolve a dependency.

getDependencyId

public String getDependencyId()
Returns the absolute id of the component that is needed to resolve this dependency.

Returns:
The absolute id of the component that is needed

onComponentCreated

public void onComponentCreated(Writer writer,
                               UIComponent depComponent)
                        throws IOException
Emits the javascript code to set the javascript property, if needed.

Parameters:
writer - The writer to print into.
depComponent - The resolved component on which a dependency was registered.
Throws:
IOException

getJSMethod

protected String getJSMethod()
Returns a String that represents the javascript method from a property.

Returns:
The javascript method.
Since:
JViews 6.5


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.