GridLayoutPresentationContext Class

com.bea.netuix.servlets.controls.layout
GridLayoutPresentationContext Class

public class GridLayoutPresentationContext

    extends LayoutPresentationContext

Used to provide access to presentation-related attributes specific to the GridLayout in use. Typically used during portal rendering via look and feel skeleton files (e.g. gridlayout.jsp).

Related Topics

GridLayoutPresentationContext.getGridLayoutPresentationContext(HttpServletRequest)


Hierarchy
Object
  ControlContext
    PresentationContext
      LayoutPresentationContext
        GridLayoutPresentationContext
All Implemented Interfaces

Serializable

Field Summary

protected static final String
CLASS_NAME
String
public static final int
DEFAULT_GRID_COLUMNS
int
   
Fields from  com.bea.netuix.servlets.controls.layout.LayoutPresentationContext
CLASS_NAME
 
Fields from  com.bea.netuix.servlets.controls.ControlContext
debug
 

Constructor Summary

 

Method Summary

public int
getColumns()
Returns the value of the columns attribute that corresponds to this GridLayout portal component.
public static GridLayoutPresentationContext
getGridLayoutPresentationContext(HttpServletRequest request)
This is a convenience method for returning a reference to the one and only GridLayoutPresentationContext.
public PlaceholderPresentationContext[][]
getPlaceholderGrid()
This method arranges the placeholder context children of this layout into an n-by-m grid, ready for rendering.
public int
getRows()
Returns the value of the rows attribute that corresponds to this GridLayout portal component.
public boolean
isRowMajor()
Row-major orientation is defined by specifying the number of columns to use when horizontally wrapping layout placeholders.
 
Methods from  com.bea.netuix.servlets.controls.layout.LayoutPresentationContext
getLayoutPresentationContext, getType
 
Methods from  com.bea.netuix.servlets.controls.PresentationContext
getChildren, getChildren, getFirstChild, getParsedProperties, getPresentationClass, getPresentationId, getPresentationStyle, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsInt, getResolvedLocale, getTagName, isVisible, setVisible
 
Methods from  com.bea.netuix.servlets.controls.ControlContext
getContextFromRequest, getContextKey, getControl, getRequestKey, getUniqueId, removeContextFromRequest, setContextInRequest
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   

Field Detail

CLASS_NAME

protected static final String CLASS_NAME


DEFAULT_GRID_COLUMNS

public static final int DEFAULT_GRID_COLUMNS

 

Constructor Detail

 

Method Detail

getColumns() Method

public int getColumns()
Returns the value of the columns attribute that corresponds to this GridLayout portal component. The columns is used to specify how many columns a GridLayout will contain.

Returns

the value of the columns attribute specified in the .layout file. If unspecified, defaults to 0.

getGridLayoutPresentationContext(HttpServletRequest) Method

public static GridLayoutPresentationContext getGridLayoutPresentationContext(HttpServletRequest request)
This is a convenience method for returning a reference to the one and only GridLayoutPresentationContext. Note this method will only work if called from within a portal (typically, from the gridlayout.jsp skeleton). This method may return null if called when no appropriate context exists, but such a context should safely exist when being fetched from the associated skeleton JSP during normal portal rendering.

Parameters

request
The current HTTPServletRequest instance

Returns

A reference to the current GridLayoutPresentationContext, if any

getPlaceholderGrid() Method

public PlaceholderPresentationContext[][] getPlaceholderGrid()
This method arranges the placeholder context children of this layout into an n-by-m grid, ready for rendering.

The grid layout logic is as follows:


getRows() Method

public int getRows()
Returns the value of the rows attribute that corresponds to this GridLayout portal component. The rows value is used to specify how many rows a GridLayout will contain.

Returns

the value of the rows attribute specified in the .layout file. If unspecified, defaults to 0.

isRowMajor() Method

public boolean isRowMajor()
Row-major orientation is defined by specifying the number of columns to use when horizontally wrapping layout placeholders. Therefore, this method will return true when getColumns is greater than zero.

Returns

true if getColumns is greater than zero (thus defining a row major layout).