TWiki
>
WebXEO Web
>
XeoPrimer
>
XeoPrimerWebComponentChangeListener
(2011-04-04,
NicolauGrosskopf
)
(raw view)
E
dit
A
ttach
Tags:
tag this topic
create new tag
,
view all tags
-- Main.PedroRio - 30 Mar 2011 ---+ XEO Web Components Value Change Listener XEO Web Components that extend the base component XUIOutput can have a Value Change Listener. A method that will be invoked whenever the value of the component changes. As of version 3.1.010 the current list of components that extend the XUIOutputComponent are: * ProgressBar * Title * WebXEO.AttributeImage * AttributeLabel * Attribute * WebXEO.AttributeBoolean * WebXEO.AttributeDate * WebXEO.AttributeDateTime * WebXEO.AttributeFile * WebXEO.AttributeHtmlEditor * WebXEO.AttributeLov * WebXEO.AttributeNumber * WebXEO.AttributeNumberLookup * AttributeObjectLookup * WebXEO.AttributeOutput * WebXEO.AttributePassword * WebXEO.AttributeText * AttributeTextArea * WebXEO.AttributeTime * WebXEO.AttributeWordMacro * OutputHtml * HtmlFileBrowse * FileBrowserHtml * MessageBox * WebXEO.GridPanel * Bridge * List * GridExplorer ---+++++ ValueChangeListeners Value Change Listeners are usefull, for instance, to create a set of ComboBoxes in which the list of values for the boxes depend on a choice made in the previous box (think choosing Continent -> Country -> City). The _valueChangeListener_ property acepts an EL Expression to a bean method (and receives an event as parameter), which is invoked every time the value changes. An example: *In the viewer:* <pre><verbatim>(...) <xvw:viewer beanClass='MyBean'/> (...) <xvw;attributeText valueExpression='#{viewBean.name}' valueChangeListener='#{viewBean.onChangeName}' /> (...)</verbatim> </pre> *In the Bean:* <verbatim>public class MyBean() { //Variable to keep to the name private String name; //Getter to retrieve the name public String getName() { return this.name; } //Setter to set the name public void setName( String Name ) { this.name = name; } //Method invoked whenever the value of the attribute text is changed public void onChangeName( XUIValueChangeEvent e ) { System.out.println( "The name was changed from " + e.getOldValue() + " to " + e.getNewValue() ); } }</verbatim> _
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r3 - 2011-04-04
-
NicolauGrosskopf
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