Oracle CRM On Demand JavaScript API Developer's Guide > JavaScript API Reference > JavaScript API >

Chaining of Methods


The oraclecrmod library uses chained API style for those methods that do not usually have a return value (for example, setter methods). You can chain many methods together to make the code easier to read and write. However, you cannot chain methods that return real values, for example, getXXX or isXXX methods.

The following is an example of chaining:

btn.setText("Sample").setImage(url).on("click",fun1);

Oracle CRM On Demand JavaScript API Developer's Guide, Release 38 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Legal Notices.