IBM Business Process Manager


Coach Views - Subscribe to an event from a subview


Greetings all,
I'm building a Coach View which is built around a complex Business Object. Some of the properties of this Business Object are represented by out of the box (and custom) coach views.
I would like to have my Coach View set the value of propertyB to a certain value (the result of an AJAX service) when propertyA is changed.
Using straight dojo, I would connect an event handler for the change event. Is there a best practice for doing this with the coach view framework?
Thanks,
Paul
I haven't done it, but the "change" event available when you create a coach view appears to be used for "what to do when the data in represented by this variable changes on the server side" and not the "onChange" event I expected it to be (which, as an aside is really confusing since "load" maps to the "onload" event for the widget).
So I would look to see if that method can be used to do what you want.
Andrew Paier | Director | BP3 Global, Inc.
BP3 Global's Website | Twitter | Linkedin | Google+ | Blogs
AndrewPaier
2700040K2Q
‏2013-06-06T19:14:09Z
I haven't done it, but the "change" event available when you create a coach view appears to be used for "what to do when the data in represented by this variable changes on the server side" and not the "onChange" event I expected it to be (which, as an aside is really confusing since "load" maps to the "onload" event for the widget).
So I would look to see if that method can be used to do what you want.
Andrew Paier | Director | BP3 Global, Inc.
BP3 Global's Website | Twitter | Linkedin | Google+ | Blogs
More...
I'm still playing with it - I may be able to do this without using event subscribers - but I'm having trouble envisioning that.
Continuing on the "event subscriber" path, I think I might be able to do what I need by using dojo's "aspect.after".
It looks like aspect.after does the job - not sure if there's a best practice, so I'm certainly open to alternative:
in the AMD dependencies, use Module ID of dojo/aspect (Alias aspect). my sample has 2 text inputs. One with Control Id "Text1" and another with control Id "Text2":
the "load" event handler looks like this:
text1 = this.context.getSubview("Text1")[0];
text2 = this.context.getSubview("Text2")[0];
aspect.after(text1, "change", function () {
var newValue = "it happened: ";
newValue += this.context.binding.get("value");
newValue += " jfklds.";
text2.context.binding.set("value", newValue);
}
);
edit: Please note that this doesn't reflect my normal JavaScript code;)

Related Links

Is it Possible to Install IBM BPM 8.5 and ODM 8.5 in the same WAS?
Authorization in REST API calls
Sending Business Object as one of the input to the AJAX service
How to get swimlane documentation using rest api
Creating Coach Views Dynamically
rest call from a service
BPM 8.5 Portal Customization
How to Change Comment Color
Read user\'s session data at server side
Getting error while running service / task in BPM 7.5
Help: WS Security Implementation IBM BPM 8.0.1
Validation On Legacy Document Attach Control
TWSearch not working for migrated instances
Help with Selecting value from DatePicker in dojo
Duplicate Entries in Process Designer
Process Portal Collaberation Feature Not Working

Categories

DW
PowerVM
IBM messaging
Worklight
Tivoli Business Servic...
IBM Connections Meetin...
IBM Connections Cloud ...
IBM Connections Social...
IBM SmartCloud Notes
eDiscovery
IBM Kenexa HDAS Assess...
CustomerInsight
PredictiveInsight
IBM SmartCloud Applica...
Facilities Maintenance...
Customizations
Cast Iron Runtime Appl...
Cast Iron Best Practices
Cast Iron PIPs and TIPs
R Programmability in S...
IBM SPSS Accessibility
IBM ILOG Elixir
Cognos BI 10
IBM Cognos 论坛 - 中文
Information Management
Rational Asset Manager
wireless
aix
rational
Test for satish
Greenhouse
Media and Entertainment
aW
All blogs
IBM Research Labs
AIX and UNIX
Power Architecture
InfoSphere Master Data...
IBM Data Studio
IBM DB2 Recovery Exper...
DB2 Web Query for IBM i
Optim Test Data Fabric...
DB2 for Linux, UNIX, a...
DB2 for i
WAPL and SOE - Workloa...
IBM HTTP Server
WebSphere eXtreme Scale
IBM Visual Configurati...
WebSphere Enterprise S...
AppScan Source
Network Protection (XGS)
General
Tivoli Security Compli...
IBM Cloud Identity
Collecting Windows Eve...
Investigating with QRadar
Transportation Managem...
Standards / Compliance
Gentran Basic, RTE, Co...
General Discussion
Connect:Express
Business Solutions Forums
Industry
Applications Framework
General Discussion
Connect:Direct for Win...
Connect:Direct Mainframe
Connect:Direct Mainframe
Product Information Ma...
Analytics & Reporting
Selling System SDK
Services & Integration
C3 Configurator
Application Best Pract...
Web Services, Messagin...
Receiving and putaway
Configuring Warehouse ...
Retail
DB2
HATS HotSpot
EGL
Business/IT Issues & B...
Rule Studio for Java
FAQ
OMEGAMON Performance M...
z/OS Communications Se...
Cluster Systems Manage...
IBM WebSphere Applicat...
Web Site Development w...
XML and Java Technology
Exploring Semantic Web...
Atom and RSS forum
Middleware and Web ser...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile