Resizable

Table of Contents

Overview

Since 3.0

The <ace:resizable> component is used to give another component the capability of being resized.

See the ICEfaces Showcase Live Demo of this component, complete with source code.

Getting Started

The component we want to make resizable is specified as the value of the for attribute.

<h:panelGroup id="panel">
</h:panelGroup>

<ace:resizable for="panel" />

Alernatively, the for value can be omitted, and the parent component will be made resizable.

<h:panelGroup id="panel">
    <ace:resizable />
</h:panelGroup>

Attributes

TagLib Documentation
This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available here.

for Specifies the id of the component to make resizable..

handles Comma-separated list of handles to use. Possible values are n, e, s, w, ne, se, sw, nw. Default value is "e, s, se".

ghost Boolean value to specify whether a semi-transparent helper element is shown for resizing

containment Boolean value to specify whether the resizable element should be restricted to its parent's boundaries.

aspectRatio Boolean value to specifies whether the aspect ratio of the element should be maintained when resizing.

Event Listeners

resizeListener Listener for the end of resize event.

Client Behavior Events

resize Fired at the end of a resize operation (default event).

JavaScript APIs

ICEfaces 3.x

The client side component object is exposed through the global variable name specified in the widgetVar attribute.

ICEfaces 4+

The "widgetVar" attribute on the ACE components has been removed in ICEfaces 4 and in its place a new "ice.ace.instance()" client JavaScript object lookup API has been introduced. The reason for this change is to enable lazy-initialization of the ACE component JavaScript objects to improve runtime performance and reduce browser memory use.

var widget = ice.ace.instance('frm:componentId);
The ice.ace.instance function requires the full client id of the component to be specified, such as "j_idt77:componentId" instead of just "componentId". To reduce the complexity of working with complete IDs with this function it may be preferable in some cases to use prependId="false" in the enclosing form (e.g. <h:form prependId="false">).
This component doesn't have a client-side API made specifically to be used by application developers. However, the component's internal methods and variables can be accessed in this way, including the underlying jQuery object and objects from underlying Javascript libraries (if applicable), and can be used for whatever purpose a developer might have in mind.
Javascript callbacks can be supplied in the onStart, onError, onSuccess, and onComplete attributes of the <ace:ajax /> tag for the resize event. The onStart callback must explicitly return true if the ajax event is to continue.

Keyboard and ARIA support

There is no keyboard and ARIA support.

CSS Classes

This component adds one or more of the following nodes to a container, serving as handles to resize it.

<div class="ui-resizable-handle ui-resizable-n" style="z-index: 1000;"></div>
<div class="ui-resizable-handle ui-resizable-e" style="z-index: 1000;"></div>
<div class="ui-resizable-handle ui-resizable-s" style="z-index: 1000;"></div>
<div class="ui-resizable-handle ui-resizable-w" style="z-index: 1000;"></div>
<div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 1000;"></div>
<div class="ui-resizable-handle ui-resizable-sw" style="z-index: 1000;"></div>
<div class="ui-resizable-handle ui-resizable-ne" style="z-index: 1000;"></div>
<div class="ui-resizable-handle ui-resizable-nw" style="z-index: 1000;"></div>

Known Issues

None, at the moment.

Other Resources

ICEfaces Showcase application, ace:resizable demo.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2021 ICEsoft Technologies Canada Corp.