IE6 AdfAgent AdfAgent capabilities. Note: This class contains overrides of the geometry management utilities defined by AdfAgent. The base AdfAgent implementation assume that the browser supports CSS-based stretching, which is true in IE7 and Gecko, but not for IE6. So, agent implementation contains our programmatic geometry management code needed to support content stretching on IE6. Of course, since IE6 is not a supported platform, we should be able to remove this class altogether (along with some of the AdfAgent geometry management APIs), but this will wait till a later release.
Field Summary
Fields inherited from oracle.adf.view.js.agent.AdfAgent
IE6 AdfAgent AdfAgent capabilities. Note: This class contains overrides of the geometry management utilities defined by AdfAgent. The base AdfAgent implementation assume that the browser supports CSS-based stretching, which is true in IE7 and Gecko, but not for IE6. So, agent implementation contains our programmatic geometry management code needed to support content stretching on IE6. Of course, since IE6 is not a supported platform, we should be able to remove this class altogether (along with some of the AdfAgent geometry management APIs), but this will wait till a later release.
Parameters:
domWindow
Method Detail
prepareStretchedChild
public Object prepareStretchedChild(Object childElement, Object parentPadding)
Prepares a child for stretching. This performs initialization work which prepares a child to be stretched, such as setting "position:absolute". This work is typically performed on the server via RichRenderer.encodeStretchedChild() during initial page render. However, in the case of partial page updates, there is no guarantee that a parent component will have the ability to apply styles (on the server) to a child component which is a partial target. As such, we need to perform this work on the client after the child is partially replaced. This method can be called by parent peers to prepare a child for stretching after a partial update which replaces the child occurs.
In certain cases a geometry managing peer may need to explicitly re-position a stretched element which was originally stretched on the server. For CSS-based geometry managing components positions are typically set once on the server and are not re-applied again on the client during browser resize. However, in cases where a child is shown or hidden, either locally on the client or via PPR, it may be necessary for the peer to re-apply the CSS-based stretching properties (ie. positions) on the client. Since we do not want to set both top and bottom (or set both left and right) on platforms where CSS stretching is not supported, we use an agent method to perform this work. This will set the the specified positions on platforms where CSS stretching is supported. On other platforms, top/left will be set, but bottom/right will not. The assumption is that on non-CSS stretching platforms the stretching will be performed programmatically by calling AdfAgent.resizeStretchedElement() during a subsequent resize notification. All positions are CSS lengths, typically "px" units.
public Object resizeStretchedChild(Object childElement, Object parentPadding)
Resizes the specified child element to fill its parent's content space. This method assumes that the child element has already been prepared to be stretched - either via a call to AdfAgent.prepareStretchedChild() or the equivalent (eg. child was rendered via server-side RichRenderer.encodeStretchedChild()). Note that for the moment this utility requires the caller to explicitly specify the parent padding size. The reason for this is that in order to support server-side stretching, the padding must be known on the server. In order to retrieve the padding on the server, the padding must be exposed as a skin property. As such the caller may have a more efficient way of telling us the padding value than requiring us to get this via the computed style. The parentPadding is specified as a css length string (eg. "4px"). Also note that we assume that the padding is the same on all sides.
Resizes the element to fill the specified width and height. If width is undefined, no horizontal stretching occurs. If height is undefined, no vertical stretching occurs. This method assumes that at a minimum the element has already been positioned, ie. position, top, left have already been set, presumably on the server. Furthermore, for browsers which support CSS-based stretching, we assume that right/bottom have already been set as well (in which case this operation becomes a no-op). At the moment there is no server-side counterpart for this method, though there probably should be. For now Renderer authors need to make sure they set the appropriate properties on their own. This may change once the API requirements are flushed out.