IBM Business Process Manager


How to use BPM variables in custom HTML


Hi,
IBM BPM V8.0.1.
I am using below html in new coach to launch a popup window to show a document. The document name has to be determined at runtime so I am using a variable to pass the doc name to window.open method. But it doesn't take the variable value rather its takeing as string.
Click here for simple popup window
Could anyone help me with how use variables in custom html in new coach.
Thanks.
If this is a CoachView base custom HTML it does not understand the <#...#> syntax used in Coach Designer. Instead, I would make a custom coach view with the HTML from above on the layout. You should then basically do something like the following in your "onLoad" event -
var anchor = this.context.element.getElementsByName('a')[0]; //this should get the a tag in your custom HTML
anchor.onclick = "window.open('html/custom/'"+this.context.binding.get("value")+")";
And if you bind your tw.local.fileName to this view when you drop it in this should work. Some notes however -
It looks like you may be putting some of your own UI pieces inside the Teamworks.ear file. This is considered a very bad practice.
The code above doesn't do all the checks you really should do to prevent an error when you haven't bound the control to a variable.
I didn't test the above, so you might need to do a different call to change the on click event for the element.
Andrew Paier | Director | BP3 Global, Inc.
BP3 Global's Website | Twitter | Linkedin | Google+ | Blogs

Related Links

BPM 8.5 Table customization doubt
EPVs in Toolkit
Print PDF from an Integration Service
Hiding / Showing section / coach views / fields based on selection of a checkbox
Calling IBM BPM coaches from other portals
href link is not working in process portal
REST calls failing when load balanced
Tabs control - Current Tab
Online Process Server not in Process Center
V8.0.1.1 - coach view refresh issue
Retrieving data variables from a Started Instance/Task BPM 8.0.1.1
[URGENT] "Available in Search" variables: how to delete one aliased variable from the…
List of ENV\'s through JS code
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

Categories

DW
IBM Blockchain
Compiler Cafe
Cloud
IBM Security
Tivoli Business Servic...
IBM Tivoli Monitoring ...
test
Weblogs
IBM Blockchain
Linux on Power Community
LPM (Live Partition Mo...
COBOL Cafe
IBM OS Pattern Kit
IBM CMIS for ECM
IBM Mobile ECM
IBM Kenexa Talent Mana...
IBM Kenexa Click and H...
Tivoli Security Compli...
Netcool/Impact Future ...
Software Asset Management
Endpoint Protection
Patch Management
General Discussion
Fixlet Authoring
iPhone Mobile Apps
Collaboration Network
Cast Iron Runtime Appl...
Cast Iron Best Practices
IBM Analytic Catalyst ...
Getting Started with I...
HATS HotSpot
EGL Cafe
WebSphere ILOG Busines...
Báo cáo về các nội dun...
User Groups
IBM Cognos 论坛 - 中文
ISV und Entwickler For...
Reportar contenido ina...
Rational
Lotus
Rational Publishing En...
Rational DOORS General...
Real-time and Embedded...
Rational Synergy
Installing/Configuring...
db2
Test tivoli forum
Insurance
Automotive
aW
Pattern Modeling and A...
IBM Web Server Plug-in...
IBM Automation Control...
Multicore enablement
Grid Computing
Power Architecture
Autonomic computing
Wireless
Web services
Information Architectu...
BigFix App for QRadar ...
Công ty thiết kế website
Digital Advertising
Runtime Migration to W...
IBM WebSphere Applicat...
Policy Tester
Documentation
Right-click Integrations
QRadar Incident Forens...
QRadar Vulnerability M...
Network Surveillance, ...
Standards / Compliance
Announcements
General Discussion
Release Bulletins
Comments on the OMS Co...
Driving Usage
Backend Systems
C3 Pricing
C3 Invoicing
C3 Analyzer Customization
Project Management and...
Upgrade Issues
Comergent Security
Release 6.0
Internationalization a...
Reverse Logistics
Product Management
IBM Decision Optimizat...
Rule Studio for Java
Форум IBM developerWor...
DB2 Content Management
Replication Monitoring...
Storage Management
IBM Tivoli System Auto...
SmartCloud Analytics -...
IBM Platform MPI Commu...
Ajax forum
PowerVM Forum
HPC Central Technical ...
IT architecture forum
IBM Flex Systems
Power Architecture forum
General Parallel File ...
IBM WebSphere SDK for ...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile