Die Common-Controls Tag Bibliothek

<util:designrule>

Mit Hilfe dieses Tags wird eine Regel festgelegt, welche das Design des umschliessenden Elementes in abhängigkeit von einem Ausdruck zur Laufzeit verändern kann. Damit ist es beispielsweise möglich die Zellen einer Tabelle in Abhängigkeit von den Zellenwerten einzufärben.
Das <designrule>-Tag darf nur innerhalb von einem Taghandler welcher das DesignRuleContainerTag Interface implementiert verwendet werden. Dies sind beispielsweise das <list>- oder die <columnXXX>-Tags.
../images/images/designrule.gif

Tag class: DesignRuleTag
 

[ Syntax ]

Standard Syntax
<util:designrule
rule = "String"
[ onabort = "String" ]
[ onactivate = "String" ]
[ onafterprint = "String" ]
[ onafterupdate = "String" ]
[ onbeforeactivate = "String" ]
[ onbeforecopy = "String" ]
[ onbeforecut = "String" ]
[ onbeforedeactivate = "String" ]
[ onbeforeeditfocus = "String" ]
[ onbeforepaste = "String" ]
[ onbeforeprint = "String" ]
[ onbeforeunload = "String" ]
[ onbeforeupdate = "String" ]
[ onblur = "String" ]
[ onbounce = "String" ]
[ oncellchange = "String" ]
[ onchange = "String" ]
[ oncheck = "String" ]
[ oncheckall = "String" ]
[ onclick = "String" ]
[ oncollapse = "String" ]
[ oncontextmenu = "String" ]
[ oncontrolselect = "String" ]
[ oncopy = "String" ]
[ oncut = "String" ]
[ ondataavailable = "String" ]
[ ondatasetchanged = "String" ]
[ ondatasetcomplete = "String" ]
[ ondblclick = "String" ]
[ ondeactivate = "String" ]
[ ondrag = "String" ]
[ ondragend = "String" ]
[ ondragenter = "String" ]
[ ondragleave = "String" ]
[ ondragover = "String" ]
[ ondragstart = "String" ]
[ ondrop = "String" ]
[ onerror = "String" ]
[ onerrorupdate = "String" ]
[ onexpand = "String" ]
[ onexpandex = "String" ]
[ onfilterchange = "String" ]
[ onfinish = "String" ]
[ onfocus = "String" ]
[ onfocusin = "String" ]
[ onfocusout = "String" ]
[ onhelp = "String" ]
[ onkeydown = "String" ]
[ onkeypress = "String" ]
[ onkeyup = "String" ]
[ onlayoutcomplete = "String" ]
[ onload = "String" ]
[ onlosecapture = "String" ]
[ onmousedown = "String" ]
[ onmouseenter = "String" ]
[ onmouseleave = "String" ]
[ onmousemove = "String" ]
[ onmouseout = "String" ]
[ onmouseover = "String" ]
[ onmouseup = "String" ]
[ onmousewheel = "String" ]
[ onmove = "String" ]
[ onmoveend = "String" ]
[ onmovestart = "String" ]
[ onpaste = "String" ]
[ onpropertychange = "String" ]
[ onreadystatechange = "String" ]
[ onreset = "String" ]
[ onresize = "String" ]
[ onresizeend = "String" ]
[ onresizestart = "String" ]
[ onrowenter = "String" ]
[ onrowexit = "String" ]
[ onrowsdelete = "String" ]
[ onrowsinserted = "String" ]
[ onscroll = "String" ]
[ onselect = "String" ]
[ onselectionchange = "String" ]
[ onselectstart = "String" ]
[ onspindown = "String" ]
[ onspinup = "String" ]
[ onstart = "String" ]
[ onstop = "String" ]
[ onsubmit = "String" ]
[ onuncheck = "String" ]
[ onuncheckall = "String" ]
[ onunload = "String" ]
[ style = "String" ]
[ styleClass = "String" ]
[ styleId = "String" ]
/>
 

[ Attribute ]

AttributTypBeschreibungPflichtRTExp
onabortString Fires when the user aborts the download of an image.

Anmerkung: JavaScript Code

 
onactivateString Fires when the object is set as the active element.

Anmerkung: JavaScript Code

 
onafterprintString Fires on the object immediately after its associated document prints or previews for printing.

Anmerkung: JavaScript Code

 
onafterupdateString Fires on a databound object after successfully updating the associated data in the data source object.

Anmerkung: JavaScript Code

 
onbeforeactivateString Fires immediately before the object is set as the active element.

Anmerkung: JavaScript Code

 
onbeforecopyString Fires on the source object before the selection is copied to the system clipboard.

Anmerkung: JavaScript Code

 
onbeforecutString Fires on the source object before the selection is deleted from the document.

Anmerkung: JavaScript Code

 
onbeforedeactivateString Fires immediately before the activeElement is changed from the current object to another object in the parent document.

Anmerkung: JavaScript Code

 
onbeforeeditfocusString Fires before an object contained in an editable element enters a UI-activated state or when an editable container object is control selected.

Anmerkung: JavaScript Code

 
onbeforepasteString Fires on the target object before the selection is pasted from the system clipboard to the document.

Anmerkung: JavaScript Code

 
onbeforeprintString Fires on the object before its associated document prints or previews for printing.

Anmerkung: JavaScript Code

 
onbeforeunloadString Fires prior to a page being unloaded.

Anmerkung: JavaScript Code

 
onbeforeupdateString Fires on a databound object before updating the associated data in the data source object.

Anmerkung: JavaScript Code

 
onblurString Fires when the object loses the input focus.

Anmerkung: JavaScript Code

 
onbounceString Fires when the behavior property of the marquee object is set to "alternate" and the contents of the marquee reach one side of the window.

Anmerkung: JavaScript Code

 
oncellchangeString Fires when data changes in the data provider.

Anmerkung: JavaScript Code

 
onchangeString Fires when the contents of the object or selection have changed.

Anmerkung: JavaScript Code

 
oncheckString Fires when a checkbox is checked

Anmerkung: JavaScript Code

 
oncheckallString Fires when all rows are checked

Anmerkung: JavaScript Code

 
onclickString Fires when the user clicks the left mouse button on the object.

Anmerkung: JavaScript Code

 
oncollapseString Fires when a tree node is collapsed

Anmerkung: JavaScript Code

 
oncontextmenuString Fires when the user clicks the right mouse button in the client area, opening the context menu.

Anmerkung: JavaScript Code

 
oncontrolselectString Fires when the user is about to make a control selection of the object.

Anmerkung: JavaScript Code

 
oncopyString Fires on the source element when the user copies the object or selection, adding it to the system clipboard.

Anmerkung: JavaScript Code

 
oncutString Fires on the source element when the object or selection is removed from the document and added to the system clipboard.

Anmerkung: JavaScript Code

 
ondataavailableString Fires periodically as data arrives from data source objects that asynchronously transmit their data.

Anmerkung: JavaScript Code

 
ondatasetchangedString Fires when the data set exposed by a data source object changes.

Anmerkung: JavaScript Code

 
ondatasetcompleteString Fires to indicate that all data is available from the data source object.

Anmerkung: JavaScript Code

 
ondblclickString Fires when the user double-clicks the object.

Anmerkung: JavaScript Code

 
ondeactivateString Fires when the activeElement is changed from the current object to another object in the parent document.

Anmerkung: JavaScript Code

 
ondragString Fires on the source object continuously during a drag operation.

Anmerkung: JavaScript Code

 
ondragendString Fires on the source object when the user releases the mouse at the close of a drag operation.

Anmerkung: JavaScript Code

 
ondragenterString Fires on the target element when the user drags the object to a valid drop target.

Anmerkung: JavaScript Code

 
ondragleaveString Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

Anmerkung: JavaScript Code

 
ondragoverString Fires on the target element continuously while the user drags the object over a valid drop target.

Anmerkung: JavaScript Code

 
ondragstartString Fires on the source object when the user starts to drag a text selection or selected object.

Anmerkung: JavaScript Code

 
ondropString Fires on the target object when the mouse button is released during a drag-and-drop operation.

Anmerkung: JavaScript Code

 
onerrorString Fires when an error occurs during object loading.

Anmerkung: JavaScript Code

 
onerrorupdateString Fires on a databound object when an error occurs while updating the associated data in the data source object.

Anmerkung: JavaScript Code

 
onexpandString Fires when a tree node is expanded

Anmerkung: JavaScript Code

 
onexpandexString Fires when a tree node with unknown child count is expanded

Anmerkung: JavaScript Code

 
onfilterchangeString Fires when a visual filter changes state or completes a transition.

Anmerkung: JavaScript Code

 
onfinishString Fires when marquee looping is complete.

Anmerkung: JavaScript Code

 
onfocusString Fires when the object receives focus.

Anmerkung: JavaScript Code

 
onfocusinString Fires for an element just prior to setting focus on that element.

Anmerkung: JavaScript Code

 
onfocusoutString Fires for the current element with focus immediately after moving focus to another element.

Anmerkung: JavaScript Code

 
onhelpString Fires when the user presses the F1 key while the browser is the active window.

Anmerkung: JavaScript Code

 
onkeydownString Fires when the user presses a key.

Anmerkung: JavaScript Code

 
onkeypressString Fires when the user presses an alphanumeric key.

Anmerkung: JavaScript Code

 
onkeyupString Fires when the user releases a key.

Anmerkung: JavaScript Code

 
onlayoutcompleteString Fires when the print or print preview layout process finishes filling the current LayoutRect object with content from the source document.

Anmerkung: JavaScript Code

 
onloadString Fires immediately after the browser loads the object.

Anmerkung: JavaScript Code

 
onlosecaptureString Fires when the object loses the mouse capture.

Anmerkung: JavaScript Code

 
onmousedownString Fires when the user clicks the object with either mouse button.

Anmerkung: JavaScript Code

 
onmouseenterString Fires when the user moves the mouse pointer into the object.

Anmerkung: JavaScript Code

 
onmouseleaveString Fires when the user moves the mouse pointer outside the boundaries of the object.

Anmerkung: JavaScript Code

 
onmousemoveString Fires when the user moves the mouse over the object.

Anmerkung: JavaScript Code

 
onmouseoutString Fires when the user moves the mouse pointer outside the boundaries of the object.

Anmerkung: JavaScript Code

 
onmouseoverString Fires when the user moves the mouse pointer into the object.

Anmerkung: JavaScript Code

 
onmouseupString Fires when the user releases a mouse button while the mouse is over the object.

Anmerkung: JavaScript Code

 
onmousewheelString Fires when the wheel button is rotated.

Anmerkung: JavaScript Code

 
onmoveString Fires when the object moves.

Anmerkung: JavaScript Code

 
onmoveendString Fires when the object stops moving.

Anmerkung: JavaScript Code

 
onmovestartString Fires when the object starts to move.

Anmerkung: JavaScript Code

 
onpasteString Fires on the target object when the user pastes data, transferring the data from the system clipboard to the document.

Anmerkung: JavaScript Code

 
onpropertychangeString Fires when a property changes on the object.

Anmerkung: JavaScript Code

 
onreadystatechangeString Fires when the state of the object has changed.

Anmerkung: JavaScript Code

 
onresetString Fires when the user resets a form.

Anmerkung: JavaScript Code

 
onresizeString Fires when the size of the object is about to change.

Anmerkung: JavaScript Code

 
onresizeendString Fires when the user finishes changing the dimensions of the object in a control selection.

Anmerkung: JavaScript Code

 
onresizestartString Fires when the user begins to change the dimensions of the object in a control selection.

Anmerkung: JavaScript Code

 
onrowenterString Fires to indicate that the current row has changed in the data source and new data values are available on the object.

Anmerkung: JavaScript Code

 
onrowexitString Fires just before the data source control changes the current row in the object.

Anmerkung: JavaScript Code

 
onrowsdeleteString Fires when rows are about to be deleted from the recordset.

Anmerkung: JavaScript Code

 
onrowsinsertedString Fires just after new rows are inserted in the current recordset.

Anmerkung: JavaScript Code

 
onscrollString Fires when the user repositions the scroll box in the scroll bar on the object.

Anmerkung: JavaScript Code

 
onselectString Fires when the current selection changes.

Anmerkung: JavaScript Code

 
onselectionchangeString Fires when the selection state of a document changes.

Anmerkung: JavaScript Code

 
onselectstartString Fires when the object is being selected.

Anmerkung: JavaScript Code

 
onspindownString Fires when a spin-down button is clicked

Anmerkung: JavaScript Code

 
onspinupString Fires when a spin-up button is clicked

Anmerkung: JavaScript Code

 
onstartString Fires at the beginning of every loop of the marquee object.

Anmerkung: JavaScript Code

 
onstopString Fires when the user clicks the Stop button or leaves the Web page.

Anmerkung: JavaScript Code

 
onsubmitString Fires when a FORM is about to be submitted.

Anmerkung: JavaScript Code

 
onuncheckString Fires when a checkbox is unchecked

Anmerkung: JavaScript Code

 
onuncheckallString Fires when all rows are unchecked

Anmerkung: JavaScript Code

 
onunloadString Fires immediately before the object is unloaded.

Anmerkung: JavaScript Code

 
ruleString Der verzögerte Expression Language Ausdruck (Syntax: @{...}) über welchen die Auswahl der Regel erfolgt. In dem Ausdruck kann der Bezeichner bean verwendet werden.

Wenn die Regel ausgewählt ist, dann werden Ihre Eigenschaften auf das umschliessende Kontrollelement angewendet.

Anmerkung: Es wird ein gültiger EL Ausdruck erwartet. Dabei sollte unbedingt die Common-Controls Syntax für verzögerte Ausdrücke (@{...} anstelle von ${...}) verwendet werden, da diese erst zum Rendering Zeitpunkt ausgewertet werden.

styleString Über dieses Attribut kann direkt ein HTML-style Attribut angegeben werden.

Anmerkung: Siehe HTML Dokumentation für das Attribut style.

 
styleClassString Über dieses Attribut kann direkt ein HTML-class Attribut angegeben werden.

Anmerkung: Siehe HTML Dokumentation für das Attribut class.

 
styleIdString Über dieses Attribut kann direkt ein HTML-id Attribut angegeben werden.

Anmerkung: Siehe HTML Dokumentation für das Attribut id.

 

[ Beispiel ]

Das Beispiel zeigt die Deklaration von Design Regeln für Zeilen und Spalten innerhalb einer Liste.


<%@ taglib uri="http://www.common-controls.com/cc/tags-ctrl"    prefix="ctrl" %>
<%@ taglib uri="http://www.common-controls.com/cc/tags-util"   prefix="util" %>

<ctrl:list
    styleId="myListControl"
    action="sample109/userBrowse"
    name="users"
    title="user.list.title"
    width="550"
    rows="10"
    refreshButton="true"
    createButton="$user.create"
    noframe="true"
    pageButtons="3">


    <%--  Row based Design Rules  --%>
    <util:designrule
        rule="@{bean.userId == 'MUD'}"
        style="background-color: red; font-weight: bold;"/>

    <util:designrule
        rule="@{bean.userId == 'HOP'}"
        style="background-color: #AAAAAA; font-weight: bold; line-height: 28px;"/>

    <util:designrule
        rule="@{bean.userId == 'FAS'}"
        style="background-color: braun; font-weight: bold; text-transform: uppercase;"/>


    <ctrl:columndrilldown   title="user.list.id"  property="userId"  width="65">
        <%--  Column based Design Rules  --%>
        <util:designrule
            rule="@{bean.userId != 'MUD'}"
            style="background-color: #80ADBA;"/>

    </ctrl:columndrilldown>

    <ctrl:columntext  title="user.list.name"  property="name"  width="200">
        <%--  Column based Design Rules  --%>
        <util:designrule
            rule="@{bean.userId == 'ELK'}"
            style="font-style : italic; color: navy; font-weight: bold;"
            onmouseover="javascript:this.title='${bean.name}';"/>

      <util:designrule
          rule="@{bean.userId == 'DIS'}"
          style="background-color: brown; letter-spacing: 2px; text-align: right;"/>

    </ctrl:columntext>
</ctrl:list>