TWiki
>
WebXEO Web
>
XeoPrimer
>
XeoPrimerWebComponentChangeListener
(revision 2) (raw view)
Edit
Attach
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 * AttributeImage * AttributeLabel * Attribute * AttributeBoolean * AttributeDate * AttributeDateTime * AttributeFile * AttributeHtmlEditor * AttributeLov * AttributeNumber * AttributeNumberLookup * AttributeObjectLookup * AttributeOutput * AttributePassword * AttributeText * AttributeTextArea * AttributeTime * AttributeWordMacro * OutputHtml * HtmlFileBrowse * FileBrowserHtml * MessageBox * 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> _
Edit
|
Attach
|
P
rint version
|
H
istory
:
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2011-03-31
-
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