[Free] 2017(Nov) EnsurePass Braindumps IBM C2040-922 Dumps with VCE and PDF Download 41-50

EnsurePass 2017 Nov IBM Official New Released C2040-922
100% Free Download! 100% Pass Guaranteed!
http://www.EnsurePass.com/C2040-922.html

Developing IBM Lotus Domino 8.5.2 Applications: Advanced XPage Design

Question No: 41 – (Topic 2)

Wayne needs to debug some client side JavaScript code in an XPage to find why a feature is not working as expected. Which of the following actions would be the bestoption to determine the problem?

  1. Wayne can activate the Source pane for the XPage in Domino Designer, set breakpoint(s) on the JavaScript code by double-clicking in the

    side-gutter and then preview the application

  2. Wayne can install FireBug or FireBug lite in the browser, set breakpoints in the

    JavaScript code and then run and debug the application

  3. Wayne can insert print() and _dump() statements directly in the JavaScript code and use the information sent to the console window to help

    debug the problem

  4. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the quot;local\xspquot; source folder, set breakpoint(s)

in the code using the standard Java tooling and then preview the application

Answer: B

Question No: 42 – (Topic 2)

Michelle is editing an existing XPage: ?The page has a quot;tagsquot; Edit Box with Type Ahead enabled, which provides suggestions for possible tags or keywords to add to the document.

?The HTML source of the Edit Box includes a dojoType attribute. ?After the edit box there is a panel named quot;tagsHintquot; explaining the concept of tags. ?Now Michelle wants to hide the quot;tagsHintquot; panel when values are already present in the quot;tagsquot; field. ?She adds an Output Script control containing the following code: var tags = dijit.byId(quot;#{id:tags}quot;); if( tags.value.length gt; 0 ){ // already set some tag var tagsHint = XSP.getElementById(quot;#{id:tagsHint}quot;); tagsHint.style.display = quot;nonequot;; } ?When she opens the page in a web browser, the JavaScript Error Console reports the error: tags is undefined at the line: if( tags.value.length gt; 0 ){ // already set some tag What is the problem with the sample code?

  1. There is no initial value in the tags field, so it is not possible to find the length of the value.

  2. The dijit is not yet loaded; the code in the Output Script control should be in an quot;addOnLoadquot; listener function.

  3. The script should be in the quot;onloadquot; event of the XPage control corresponding to the HTML quot;bodyquot; tag.

  4. The first line should be: var tags = XSP.getElementById(quot;#{id:tags}quot;);

Answer: B

Question No: 43 – (Topic 2)

Jeremy wants all of the dijit.Dialog boxes in his application to call a client side JavaScript function called quot;validateFormquot; whenever they are hidden. What is the best solution?

  1. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the

    application using the following code:

    /**

  • Custom Dojo Control

  • */ dojo.provide(#39;com.myco.widget.Dialog#39;); dojo.require(#39;dijit.Dialog#39;);

    (function(){

    dojo.declare(quot;com.myco.widget.Dialogquot;, dijit.Dialog, { onHide: validateForm

    })

    }());

    /**

    • Initialization code

      */

      var dialog = new dijit.Dialog();

      1. Whenever he initializes a new dijit.Dialog, add an onHide event like so: vardialog = new dijit.Dialog({

        onHide: validateForm

        }

        );

      2. In the quot;Closequot; or quot;Cancelquot; button of each dialog add a call to validateForm in the onClick event.

      3. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the applicationusing the following code:

        /**

    • Custom Dojo Control

    */ dojo.provide(#39;com.myco.widget.Dialog#39;); dojo.require(#39;dijit.Dialog#39;);

    (function(){

    dojo.declare(quot;com.myco.widget.Dialogquot;, dijit.Dialog, { onHide: validateForm

    })

    }());

    /**

    • Initialization code

      */

      vardialog = new com.myco.widget.Dialog();

      1. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application using the following code:

        /**

    • Custom Dojo Control

    */ dojo.provide(#39;com.myco.widget.Dialog#39;); dojo.require(#39;dijit.Dialog#39;);

    (function(){

    dojo.declare(quot;com.myco.widget.Dialogquot;, dijit.Dialog, { onHide: validateForm

    })

    }());

    /**

    • Initialization code

      */

      var dialog = new com.myco.widget.Dialog();

      1. Create a custom Dojo control and use that instead ofthe standard dijit.Dialog in the application using the following code:

        /**

    • Custom Dojo Control

    */ dojo.provide(#39;com.myco.widget.Dialog#39;); dojo.require(#39;dijit.Dialog#39;);

    (function(){

    dojo.declare(quot;com.myco.widget.Dialogquot;, dijit.Dialog, { onHide:validateForm

    })

    }());

    /**

    • Initialization code

      */

      var dialog = new com.myco.widget.Dialog();

      1. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application using the following code:

      /**

    • Custom Dojo Control

    */ dojo.provide(#39;com.myco.widget.Dialog#39;); dojo.require(#39;dijit.Dialog#39;);

    (function(){

    dojo.declare(quot;com.myco.widget.Dialogquot;, dijit.Dialog, { onHide: validateForm

    })

    }());

    /**

    * Initialization code

    */

    var dialog = new com.myco.widget.Dialog();

    Answer: D,E,F,G

    Question No: 44 – (Topic 2)

    Rick creates a Server-Side JavaScript library, and defines a few global variables at the beginning of the library. The JavaScript in his XPage and in the JavaScript library modify those global variables. The server the application runs on is heavily used, and the application settings are set to Keep Pages on Disk for best scalability. When the application executes, what is likely to happen?

    1. The application will perform as expected.

    2. The application will generate an error because you can not declare global Server-Side JavaScript variables

    3. The application will run, but the values of the globally defined variables may be lost when the server#39;s JVM garbage collects variables, causing

      unexpected results.

    4. The application will run, but every partial or full refresh will reset the values of the global variables when it reloads the Server-Side JavaScript

    library.

    Answer: C

    Question No: 45 – (Topic 2)

    John has a page with an edit box and a submit button and decides he wants to use a Dojo NumberSpinner dijit. He adds the dojoType dijit.form.NumberSpinner to the edit box. The submit button stops working. What is the reason for the submit button not working?

    1. John needs to check the check box quot;Enable Dojoquot; on the submit button

    2. John needs to add a dojo module to the XPage.

    3. John needs to add a server sideJavaScript library to the XPage

    4. John needs to configure themes to include a dojo theme like tundra

    Answer: B

    Question No: 46 – (Topic 2)

    Dominic wants to implement the open source CSS framework called Blueprint in his XPages application. He does not want to include anyother CSS framework resources which may exist on the Domino server. What is the best way to include all of the required CSS files in the XPages in his application?

    1. In each XPage in the application add the required CSS files to the Resources section

    2. Create a new theme which extends webstandard and then add each Blueprint CSS file via a resource definition

    3. Create a new theme which extends oneui and then add each Blueprint CSS file via a resource definition

    4. Create a new theme which does not havean extension property and then add each Blueprint CSS file via a resource definition

    Answer: D

    Question No: 47 – (Topic 2)

    Aaron has created an XPages application that has a couple of XPages to surface the same data to two different application roles in two completely different userinterfaces. Each role can manipulate parts of the data, but in both cases, the data must adhere to the same business logic and rules. What would be the best way for Aaron to implement the same business logic in each XPage?

    1. Create a common Client-SideJavaScript Library for the XPages to share that the user interface can use to execute the business logic

    2. Use a series of Custom Controls to hold the business logic and share them amongst the XPages

    3. Create a common Server-Side JavaScript Library for the XPages to share that the user interface can use to execute the business logic

    4. The user interface and the business logic in an XPage can not easily be separated and must be maintained in each XPage

    Answer: C

    Question No: 48 – (Topic 2)

    Tamsin is building an XPages application for use on mobile devices. She finds the font and row height on View Panel controls too small and difficult to navigate on a touch screen.

    Which View Panel property should she add her CSS class to?

    1. dataTableStyleClass

    2. viewStyleClass

    3. viewPanelStyleClass

    4. captionStyleClass

    Answer: A

    Question No: 49 – (Topic 2)

    Tim has an XPage containing anEdit Box. He has read that it is possible to use the Dojo Toolkit NumberSpinner control in XPages, and he wishes to modify his XPage so that the Edit Box will appear as a Number Spinner in the browser. What would the steps be to accomplish this?

    1. Fromthe Dojo Tollkit Website, get the URL to the most recent version of the NumberSpinner.js control (where the URL begins with http://).

      In the XPage, in the Resources tab of the Properties view, add a JavaScript Library using that URL.

      Configure the Edit Boxto set the dojoType to quot;dijit.form.NumberSpinnerquot;.

    2. Import the NumberSpinner.js file from Dojo into the application as a JavaScript Library. In the XPage, in the Resources tab of the Properties view, add a JavaScript Library resource for that NumberSpinner.js file to the XPage.

      Configure the Edit Box to set the dojoType to quot;dijit.form.NumberSpinnerquot;.

    3. Import the NumberSpinner.js file from Dojo into the application as a Dojo Module.

      In the XPage, in the Resources tab of the Properties view, add that Dojo Module resource for that NumberSpinner.js file to the XPage.

      Configure the Edit Box to set the dojoType to quot;dijit.form.NumberSpinnerquot;.

    4. In the XPage, in the Resources tab of the Properties view, add a Dojo Module resource for quot;dijit.form.NumberSpinnerquot;to the XPage.

    Configure the Edit Box to set the dojoType to quot;dijit.form.NumberSpinnerquot;.

    Answer: D

    Question No: 50 – (Topic 2)

    Francis wants to add a ClientSide JavaScript library called quot;loading.jsquot; to his XPages. What is the best method to achieve this?

    1. He must add the script library as a resource to each XPage.

    2. He should add itto a Custom Control, which he should then add to every XPage.

    3. He should add the following code to a theme:

      lt;resourcegt;

      lt;content-typegt;application/x-javascriptlt;/content-typegt;

      lt;hrefgt;loading.jslt;/hrefgt;

      lt;/resourcegt;

    4. He should add the following code to a theme:lt;resourcegt;

    lt;content-typegt;text/javascriptlt;/content-typegt;

    lt;hrefgt;loading.jslt;/hrefgt;

    lt;/resourcegt;

    Answer: C

    100% Free Download!
    Download Free Demo:C2040-922 Demo PDF
    100% Pass Guaranteed!
    Download 2017 EnsurePass C2040-922 Full Exam PDF and VCE

    EnsurePass ExamCollection Testking
    Lowest Price Guarantee Yes No No
    Up-to-Dated Yes No No
    Real Questions Yes No No
    Explanation Yes No No
    PDF VCE Yes No No
    Free VCE Simulator Yes No No
    Instant Download Yes No No

    2017 EnsurePass IT Certification PDF and VCE