com.sun.webui.jsf.component
Class DndContainer

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by com.sun.webui.jsf.component.DndContainer
All Implemented Interfaces:
javax.faces.component.StateHolder

public class DndContainer
extends javax.faces.component.UIComponentBase

DndContainer represents drag, drop or drag-and-drop container. This container makes any Woodstock components OR any other user elements nested in it draggable: DndContainer itself becomes a drag source/target/source-and-target container, each element of which is activated for DnD ( drag and drop).

DndContainer component represents a "render-only" component and the JSF component tree will not reflect any changes performed on the client side. todo rendered


Field Summary
static java.lang.String CONTAINER_ID
           
static java.lang.String STATE_ID
           
 
Constructor Summary
DndContainer()
          Creates a new instance of DndContainer
 
Method Summary
 java.lang.String getDragTypes()
          Returns list of drag item types for any/all children within this container.
 java.lang.String getDropTypes()
          Returns list of drag item types for any/all children within this container.
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getOnDropFunc()
          Function name to be executed after element is dropped into the container.
 java.lang.String getOnNodeCreateFunc()
          Function name to be executed when new element is created from the data.
 java.lang.String getStyle()
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 boolean isCopyOnly()
          Flag indicating that modification of this component by the user is not currently permitted, but that it will be included when the form is submitted.
 boolean isHorizontalIndicator()
          Sets horizontalIndicator flag
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setCopyOnly(boolean copyOnly)
          Flag indicating that modification of this component by the user is not currently permitted, but that it will be included when the form is submitted.
 void setDragTypes(java.lang.String dragTypes)
          Sets list of drag item types.
 void setDropTypes(java.lang.String dropTypes)
          Sets list of drag item types.
 void setHorizontalIndicator(boolean horizontalIndicator)
          Returns horizontalIndicator flag
 void setOnDropFunc(java.lang.String onDropFunc)
          Function name to be executed after element is dropped into the container.
 void setOnNodeCreateFunc(java.lang.String onNodeCreateFunc)
          Scripting code executed when new element is created from the data.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 
Methods inherited from class javax.faces.component.UIComponentBase
broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_ID

public static final java.lang.String STATE_ID
See Also:
Constant Field Values

CONTAINER_ID

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

DndContainer

public DndContainer()
Creates a new instance of DndContainer

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Specified by:
getFamily in class javax.faces.component.UIComponent

isHorizontalIndicator

public boolean isHorizontalIndicator()

Sets horizontalIndicator flag


setHorizontalIndicator

public void setHorizontalIndicator(boolean horizontalIndicator)

Returns horizontalIndicator flag

See Also:
isHorizontalIndicator()

getDragTypes

public java.lang.String getDragTypes()

Returns list of drag item types for any/all children within this container.


setDragTypes

public void setDragTypes(java.lang.String dragTypes)

Sets list of drag item types.

See Also:
getDragTypes()

getDropTypes

public java.lang.String getDropTypes()

Returns list of drag item types for any/all children within this container.


setDropTypes

public void setDropTypes(java.lang.String dropTypes)

Sets list of drag item types.

See Also:
getDropTypes()

getOnNodeCreateFunc

public java.lang.String getOnNodeCreateFunc()

Function name to be executed when new element is created from the data. Specified function must have signature function(data, hint) For details, see attribute description.


setOnNodeCreateFunc

public void setOnNodeCreateFunc(java.lang.String onNodeCreateFunc)

Scripting code executed when new element is created from the data.

See Also:
getOnNodeCreateFunc()

getOnDropFunc

public java.lang.String getOnDropFunc()

Function name to be executed after element is dropped into the container. Specified function must have signature function(source, nodes, copy) .


setOnDropFunc

public void setOnDropFunc(java.lang.String onDropFunc)

Function name to be executed after element is dropped into the container.

See Also:
getOnDropFunc()

isCopyOnly

public boolean isCopyOnly()

Flag indicating that modification of this component by the user is not currently permitted, but that it will be included when the form is submitted.


setCopyOnly

public void setCopyOnly(boolean copyOnly)

Flag indicating that modification of this component by the user is not currently permitted, but that it will be included when the form is submitted.

See Also:
isCopyOnly()

getStyle

public java.lang.String getStyle()

CSS style(s) to be applied to the outermost HTML element when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyleClass()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.


setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.

See Also:
isVisible()

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.