0 votes
225 views
in Coach Views by (11.2k points)

1 Answer

+2 votes
by (10.6k points)

There is no need to create a custom coach view for this since its a simple javascript invocation of the window.print() method, you can make a copy of the stock button and change the onclick() as following in the behaviour->view javascript

    button.onclick = function() {
        if (this.disabled == false) {
            var context = _this.context;
            if (context.options.allowMultipleClicks == undefined || !context.options.allowMultipleClicks.get("value")) {
                this.disabled = true;
                domClass.add(this, "BPMButton-disabled");
            }
            if (context.binding) {
                context.binding.set("value", true);
            }
            var _button = this;
            window.print();
            //context.trigger(function() {_button.disabled = false; domClass.remove(_button, "BPMButton-disabled");});

        }
    }

if you need to print certain div in the Coach, you can do that also by defining a div wrapper and passing the specified div to the invocation as specified at the following url

http://stackoverflow.com/questions/16894683/how-to-print-html-content-on-click-of-a-button-but-not-the-page

Related questions

0 votes
0 answers 59 views
0 votes
1 answer 225 views
0 votes
0 answers 32 views
0 votes
1 answer 101 views
0 votes
2 answers 79 views
0 votes
0 answers 16 views
0 votes
1 answer 81 views
0 votes
2 answers 246 views
0 votes
1 answer 26 views
0 votes
1 answer 11 views
0 votes
0 answers 8 views
0 votes
1 answer 88 views

493 questions

404 answers

81 comments

1.6k users

Created By Dosvak LLC (WWW.DOSVAK.COM)
Our Public Git Repository

Dosvak UI Toolkit --- Download --- Demo

Subscribe us at

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
...