<ctrl:tree>
TreeGroupDataModel
.
The layout of the tree can be defined in the JSP-Page.
TreeGroupDataModel
Interface or is derived
from TreeListControl
.
Attribute | Type | Description | Req. | RTExp |
action | String |
Specifies the Struts Action that is to be called in case of control element events.
This attribute need not be specified if the tag is included within a Struts <html:form> tag. In that case, the name of the action is determined using the Struts Form Bean. Annotation: The action must be declared in one of the struts-config.xml files. |
|
|
ajax | Boolean |
Activates the AJAX function of the column. With AJAX all
control events will be sent asynchronously to the application server
where the processing takes place.
The event processing on the server is the same as without AJAX enabled. However the application developer has the possibility to control the response output through some additional methods of the AjaxRequest interface (the base class for ActionContext). The normal AJAX server processing (-> AjaxRequest.isAjaxCanceled() == false) will send back a XML stream to the Web Browser. This stream contains only the HTML code for the dirty controls, which will be merged in the Browser through a JavaScript handler into the current HTML DOM Tree. So the Server will not transmit the full HTML page!
Most of the Controls will add themselves to the dirty list of the ActionContext. This is done through a call to AjaxRequest.markDirty(). With this method the application developer has the opportunity to add additional controls to the dirty list and send them back to the browser in the XML stream. This is necessary when an event handler changes the state of a second control that was not the originator of the request. In some cases it is not sufficient to send back only the dirty control because the whole HTML page has to be changed. In this cases the application developer can cancel AJAX server event processing by calling the AjaxRequest.cancelAjaxRequest() method. When the AJAY request is canceled the framework will send a full HTML page back to the Browser - as if this was a normal HTTP request. The Common-Controls AJAX XML Protocol has the following format: <?xml version="1.0" encoding="UTF-8" ?> <ajax-response> <token/> <controls> <control styleId="" class="" name=""> <html> <[CDATA[...]] > </html> </control> </controls> </ajax-response> |
|
|
border | Integer | Specifies the thickness of the border that has to be drawn around the control element. |
|
|
buttons | boolean |
Indicates whether, in case of group nodes, buttons for exploding
or closing the branch should be displayed.
This option has no effect if the expandMode of the tree structure
is set to |
|
|
checkboxes | boolean |
Indicates whether a checkbox should be displayed before the tree entries.
The tree entries must implement the |
|
|
disabled | boolean | This attribute can be used to disable the control element. It then does not accept any user inputs and does not generate any control element events. |
|
|
enableProperty | String |
Indicates the name of a property, with the help of which
the drilldown function can be disabled in the relevant line.
For this, the TreeNode-Bean must provide a corresponding Property Getter, which returns a Boolean data type. Annotation: Valid Java identifier/label. The TreeNode-Bean must implement a suitable property-getter method. |
|
|
expandMode | ExpansionMode |
This attribute specifies how many nodes of the
tree structure may be displayed exploded at the same time.
|
|
|
filter | boolean | Spcifies if the node labels should be html encoded. |
|
|
formElement | boolean |
This attribute is used to control how the control element should behave
in case of a user action.
Annotation:
The value |
|
|
groupselect | boolean | Specifies whether, for the group nodes of the tree structure, a Click Eventhandler should be called. |
|
|
height | String |
Sets the height of the control element. The height
may be specified in absolute or percent terms.
See the HTML documentation |
|
|
id | String |
The name of a page scope JSP bean that will contain
the current element.
Using the given Id, the variable can be
accessed in scripting expressions in the tag Body.
The id mus be a string lteral because the JSP
compiler generates a variable withthis name at compile
time
Annotation: A valid Java identifier must be given. |
|
|
imagemap | String |
Specifies the name of an Imagemap which must be saved in the request.
The values that the ImageProperty returns are mapped to the entries
of this Imagemap. The mapping is done with the help of the regular
expression, which is assigned to every entry of the Imagemap.
The Framework appends, in the case of group nodes, to the value of the ImageProperty, the character strings .open or .closed, in order to be able to distinguish between the open and closed states By default, the framework uses a folder icon as the image for group nodes. Annotation: Under the name, there must be an Imagemap saved in the request. |
|
|
imageProperty | String |
Specifies the property using which an image can be assigned to every Row-Bean.
The image names do not designate any direct HTML-resources; rather, they are translated into the actual resource names with the help of the Imagemap. Annotation: Valid Java designator/label for a property which has to be implemented by every Row-Bean! |
|
|
labelProperty | String |
Specifies the property using which a label can be assigned to every Row-Bean.
Annotation: Valid Java designator/label for a property which has to be implemented by every Row-Bean! |
|
|
labelWrap |
|
|||
lines | boolean | Specifies whether connecting lines should be drawn between the construction elements. |
|
|
linesAtRoot | boolean | Specifies whether lines should be drawn to the construction elements of the uppermost (displayed) level. |
|
|
locale | String |
enables localization for the control element.
String literals will be interpreted as keys
in the Application.properties file.
Annotation:
boolean value |
|
|
maxlength | Integer |
Specifies the maximum number of characters which should be displayed
for labels on the tree nodes. If the maxlength is exceeded, a hint
"..." is displayed.
This functionality is not provided if the filter-attribute is set to false . In this case the number of visible
characters can not be detected, because the String can contain some html data.
|
|
|
name | String |
Specifies the name of the Java-Bean.
The Java-Bean must be stored in the given scope.
When the tag is surrounded by a Struts <html:form> tag, no Bean Name need be specified. In this case, the Java-Bean is drawn via a property of the Struts Form Bean. Annotation: A valid Java identifier must be given. |
|
|
onblur | String |
Fires when the object loses the input focus.
Annotation: JavaScript Code |
|
|
onchange | String |
Fires when the contents of the object or selection have changed.
Annotation: JavaScript Code |
|
|
oncheck | String |
Fires when a checkbox is checked
Annotation: JavaScript Code |
|
|
onclick | String |
Fires when the user clicks the left mouse button on the object.
Annotation: JavaScript Code |
|
|
oncollapse | String |
Fires when a tree node is collapsed
Annotation: JavaScript Code |
|
|
oncontextmenu | String |
Fires when the user clicks the right mouse button in the client
area, opening the context menu.
Annotation: JavaScript Code |
|
|
ondblclick | String |
Fires when the user double-clicks the object.
Annotation: JavaScript Code |
|
|
onexpand | String |
Fires when a tree node is expanded
Annotation: JavaScript Code |
|
|
onexpandex | String |
Fires when a tree node with unknown child count is expanded
Annotation: JavaScript Code |
|
|
onfocus | String |
Fires when the object receives focus.
Annotation: JavaScript Code |
|
|
onkeydown | String |
Fires when the user presses a key.
Annotation: JavaScript Code |
|
|
onkeypress | String |
Fires when the user presses an alphanumeric key.
Annotation: JavaScript Code |
|
|
onkeyup | String |
Fires when the user releases a key.
Annotation: JavaScript Code |
|
|
onmousedown | String |
Fires when the user clicks the object with either mouse button.
Annotation: JavaScript Code |
|
|
onmousemove | String |
Fires when the user moves the mouse over the object.
Annotation: JavaScript Code |
|
|
onmouseout | String |
Fires when the user moves the mouse pointer outside the boundaries
of the object.
Annotation: JavaScript Code |
|
|
onmouseover | String |
Fires when the user moves the mouse pointer into the object.
Annotation: JavaScript Code |
|
|
onmouseup | String |
Fires when the user releases a mouse button while the mouse is
over the object.
Annotation: JavaScript Code |
|
|
onuncheck | String |
Fires when a checkbox is unchecked
Annotation: JavaScript Code |
|
|
permission | ACL |
With this attribute, access to the element can be restricted.
Authorizations are checked using the com.cc.framework.security.Principal object in the user session. The principal object is registered in the session with the method com.cc.framework.security.SecurityUtil#registerPrincipal(HttpSession, Principal). It is made available by the application developer by implementing the principal interface. In this manner, any authorization system can be very easily connected within the framework. Authorizations are always specified in the form of an Access Control List (ACL). What is involved here is a semicolon-delimited list with individual authorizations. The framweork supports the following authorization types, which, however, can be expanded at will by the application developer:
|
|
|
property | String |
Specifies the name of the property using which the Java-Bean
is to be accessed. This is generally only necessary when
the Java-Bean is associated with a Struts Form Bean.
Annotation: A valid Java identifier must be given. |
|
|
root | boolean |
Specifies whether the root node of the tree structure (Level 0)
should be displayed or whether the display should first start
at the next tree level(Level 1).
Definition: A tree always has exactly one root! |
|
|
runat | RunAt |
This attribute specifies whether, for the control element,
Clientside JavaScript should be used, or whether the control element
should work purely with Server Roundtrips.
|
|
|
scope | HTTPScope |
This attribute shows the Scope in which the Java-Bean with
the actual display data can be found.
|
|
|
scrollHeight | String |
Specifies the height of the scrollable body for the control.
Note: If the scrollHeight-Attribute is set, the width-Attribute for each column- and columngroup-Tag needs to be specified! Annotation: See HTML documentation for the attribute width. |
|
|
shadow | boolean |
Specifies whether the control element should be saved with a shadow.
This function is only available in the case of specific Painterfactories. |
|
|
style | String |
An HTML-style can be directly specified with this attribute.
Annotation: See HTML documentation for the attribute style. |
|
|
styleClass | String |
The HTML-class attribute of the element can be specified with this attribute.
Annotation: See HTML documentation for the attribute class. |
|
|
styleId | String |
The HTML-id attribute of the element can be specified with this attribute.
Annotation: See HTML documentation for the Attribute id. |
|
|
summary | String | This property can be used for rendering to non-visual media such as speech or Braille. |
|
|
tabindex | Integer | Tabulator Index for this element. |
|
|
target | String |
The HTML-target attribute of the element can be specified with
this attribute.
Annotation: See HTML documentation for the attribute target. |
|
|
targetProperty | String |
Specifies the name of a property with the help of which the relevant
line can generate an HTML-target attribute.
Annotation: Valid Java identifier/label. The Row-Bean must implement a suitable property-getter method. |
|
|
tooltipProperty | String |
Specifies the name of a property with the help of which
the relevant line can generate an HTML-text attribute.
Annotation: Valid Java identifier/label. The Row-Bean must implement a suitable property-getter method. |
|
|
transaction | Boolean | This flag directs the framework to append a transaction token to all generated hyperlinks. The transactio token allows the detection of form re-submissions (multiple submission of the same HTTP form). |
|
|
width | String |
Sets the width of the control element. The height
may be specified in absolute or percent terms.
See the HTML documentation |
|
Event | Description |
Check |
public void control_onCheck( ControlActionContext ctx, String key, SelectMode mode, boolean checked) throws Exception |
Collapse |
public void control_onCollapse( ControlActionContext ctx, String key) throws Exception |
Expand |
public void control_onExpand( ControlActionContext ctx, String key) throws Exception |
ExpandEx |
public void control_onExpandEx( ControlActionContext ctx, String key) throws Exception |