<ctrl:list>
ListDataModel
.
The layout of the list can be defined in the JSP-Page with the help of the
<columnXXXX>-tags.
The output format of the list element (HTML, XML, JavaApplet, etc.) is determined by the Painter Factory used.
ListDataModel
interface.
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. |
|
|||||||||||||
cellPadding | Integer | Sets the cell padding for cell elements |
|
|||||||||||||
cellSpacing | Integer | Sets the cell spacing for cell elements |
|
|||||||||||||
createButton | ACL | Indicates whether a button for creating a new data record should be displayed. By specifying an Access Control List, the creation of new records can be restricted to certain users. |
|
|||||||||||||
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. |
|
|||||||||||||
emptyText | String |
A text that is output in the body of the list element if there are no lines available.
The character string is HTML-encoded before outputting. |
|
|||||||||||||
exportListButton | ACL | Shows the exportlist button within the list header. An Access Control List (ACL) can be specified to grant access the button to restricted users. |
|
|||||||||||||
formElement | boolean |
This attribute is used to control how the control element should behave
in case of a user action.
Annotation:
The value |
|
|||||||||||||
height | String |
Sets the height of the control element. The height
may be specified in absolute or percent terms.
See the HTML documentation |
|
|||||||||||||
help | String |
Allows to assign a help id for the element. If set, a help symbol
will be displayed beside the element, which will generate an onHelp
event if the icon is clicked. The id can be used to display a special page
of the help system. The help system is not part of the Common-Controls
Framework.
To generate the hyperlink some default framework resources where used:
Annotation: A jump screen of the Help system must be specified. |
|
|||||||||||||
hideButtons | String list |
This attribute can be used to hide some of the buttons.
The buttons needs to be specified within a semicolon separated list.
Annotation: A semicolon separated list. The button names must match values of ControlButton.getName() |
|
|||||||||||||
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. |
|
|||||||||||||
locale | String |
enables localization for the control element.
String literals will be interpreted as keys
in the Application.properties file.
Annotation:
boolean value |
|
|||||||||||||
minRows | Integer | This attribute is used to specify the minimum number of lines that are depicted simultaneously. When the total number of available lines in the data model is lesser than the number of lines displayed, empty lines are automatically generated. |
|
|||||||||||||
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. |
|
|||||||||||||
noframe | Boolean | Hides the controls frame and title |
|
|||||||||||||
noheader | Boolean | Hides the controls column headers |
|
|||||||||||||
pageButtons | integer | The number of buttons for direct page navigation. |
|
|||||||||||||
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:
|
|
|||||||||||||
printListButton | ACL | Shows the printlist button within the list header. An Access Control List (ACL) can be specified to grant access the button to restricted users. |
|
|||||||||||||
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. |
|
|||||||||||||
refreshButton | ACL | Specifies whether a button should be displayed for updating the elements. |
|
|||||||||||||
rows | Integer |
This attribute is used to specify the maximum number of lines
that are depicted simultaneously. When the total number of
available lines in the data model is greater than the number
of lines displayed, scrollbars are automatically generated
for slowly scrolling through pages.
If this attribute is not specified, all lines are always displayed. |
|
|||||||||||||
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. |
|
|||||||||||||
select | SelectType |
Specifies the selection mode of the list. This is only used
if a Check column is to be displayed here as well.
|
|
|||||||||||||
shadow | boolean |
Specifies whether the control element should be saved with a shadow.
This function is only available in the case of specific Painterfactories. |
|
|||||||||||||
showHeader | boolean | Specifies if the header of the control including the column titels should be rendered. If set to false the header will not be shown |
|
|||||||||||||
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. |
|
|||||||||||||
taborientation | OrientationType |
This attribute sets the tabulator orientation for multi
column controls.
|
|
|||||||||||||
title | String |
The main title of the list element . The character string is HTML-encoded
before outputting .
Example: ä becomes ä |
|
|||||||||||||
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 |
CellClick |
public void control_onCellClick( ControlActionContext ctx, String column, String key) throws Exception |
Check |
public void control_onCheck( ControlActionContext ctx, String key, SelectMode mode, boolean checked) throws Exception |
CheckAll |
public void control_onCheckAll( ControlActionContext ctx, SelectMode mode, boolean checked) throws Exception |
Create |
public void control_onCreate( ControlActionContext ctx) throws Exception |
Delete |
public void control_onDelete( ControlActionContext ctx, String key) throws Exception |
Drilldown |
public void control_onDrilldown( ControlActionContext ctx, String key) throws Exception |
Edit |
public void control_onEdit( ControlActionContext ctx, String key) throws Exception |
ExportList |
public void control_onExportList( ControlActionContext ctx) throws Exception |
Page |
public void control_onPage( ControlActionContext ctx, int page) throws Exception |
PrintList |
public void control_onPrintList( ControlActionContext ctx) throws Exception |
Refresh |
public void control_onRefresh( ControlActionContext ctx) throws Exception |
Select |
public void control_onSelect( ControlActionContext ctx, String key) throws Exception |
Sort |
public void control_onSort( ControlActionContext ctx, String column, SortOrder direction) throws Exception |