TWiki
>
WebXEO Web
>
XeoPrimerXeoXwc
>
XEOMenuCounter
(2012-01-16,
PedroRio
)
(raw view)
E
dit
A
ttach
Tags:
tag this topic
create new tag
,
view all tags
-- Main.JoaoCarreira - 22 Dec 2009 ---+ Menu Counter The component _xeo:MenuCounter_ allows adding counters to the TreePanel entires (think unread messages in outlook). This component extends the xvw:menu component. ---++++++ Declaration <pre><verbatim> <xeo:menuCounter ... ></verbatim> </pre> ---++++++ Properties | *Property* | *Type* | *Description* | *Possible Values* | *Usage* | *Example* | | id | string | Component Id | String (valid Java variable name) | Required | Default auto-generated | | boql | string / EL | BOQL to give the count. Eg. select Ebo_Perf where active='1' | BOQL expression | Optional | | | sql | string / EL | SQL to give the count. Eg: select count(*) from OEbo_Perf | SQL expression | Optional | | | counterValue | string / EL | Value to put in the counter, if the couter result is a bean property, or a fix value | Any integer | Optional | | | counterMask | string | Value Presentation Mask: Eg: <b style='color:red'>%s</b> Where %s is replaced by the counter value. | | Optional | | | updateInterval | string | Time in seconds between each update | Any integer | Optional | | ---++++++ Observations The component to retrieve the counter value uses the following processing order: 1 Checks if the counterValue has value. 1 Checks if the boql property has a value. 1 Checks if the sql property has a value 1 Checks if the value has a JSON Object, and if it has the boql property. ---++++++ Childs Elements NO ---+++++ Examples *Declaring a MenuCounter in a viewer:* <verbatim><xvw:viewer (...)> <xvw:treePanel renderComponent='false' id='tree'> <xeo:menuCounter id='testCounter' boql="select MyObject" updateInterval='60' text='My Object' value="{viewerName:'viewers/MyObject/list.xvw', boql:'select MyObject'}" target='Tab' serverAction="#{viewBean.listObject}" /> </xvw:treePanel> (...) </verbatim> In the previous example as the property "counterValue" is not set, the value for the counter will be retrieved by counting the results of the boql expression. *How to update a counter programatically (in a Bean action):* <verbatim> // Update a specific counter (using its client id) public void updateCounter() { MenuCounter.updateClientCounter( "formId:menuCounterId" ); } //Update all counters public void updateAllCounter() { MenuCounter.updateClientCounters(); } </verbatim>
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r11
<
r10
<
r9
<
r8
<
r7
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r11 - 2012-01-16
-
PedroRio
WebXEO
XEO Primer
-
Instalation
-
Introduction
-
Concepts
-
Architecture
-
XEO Library
-
Deploy to EAR
-
PreferenceStore
XEO - Core
-
XEO Model Reference
-
Security
-
Java API
-
BOL
-
XEOQL (BOQL)
-
Administrating
-
Background Tasks
-
boConfig.xml
-
Web.xml
-
Known Issues
-
XEO Flags
XEO - XWC
- Web Components
- Java Samples
- Custom Components
- Component Plugins
- Internationalization
- Viewer Events
- Value Change Listeners
- XUIServlet
- XeoLocalization
- XvwTemplates
Create New Topic
WebXEO Web
No permission to view
TWiki.WebTopBar
No permission to view
TWiki.WebBottomBar