actualtest.c2040-922 66,questions … · d. wayne can open the java perspective in domino designer,...

27
ActualTest.C2040-922_66,Questions Number : C2040-922 Passing Score : 800 Time Limit : 120 min File Version : 19.02 http://www.gratisexam.com/ IBM C2040-922 Developing IBM Lotus Domino 8.5.2 Applications: Advanced XPage Design Best to read my cover notes in this vce at the start of the exam. This is a new VCE file with new questions. I took the exam today. All questions and Sims were different. Used the new actual test file that has been published and achieve the high scores in your exams.

Upload: others

Post on 09-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

ActualTest.C2040-922_66,Questions

Number: C2040-922Passing Score: 800Time Limit: 120 minFile Version: 19.02

http://www.gratisexam.com/

IBM C2040-922Developing IBM Lotus Domino 8.5.2 Applications:

Advanced XPage Design

Best to read my cover notes in this vce at the start of the exam.

This is a new VCE file with new questions.

I took the exam today. All questions and Sims were different.

Used the new actual test file that has been published and achieve the high scores in your exams.

Page 2: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Exam A

QUESTION 1Wayne needs to debug some client side JavaScript code in an XPage to find why a feature is not workingas expected. Which of the following actions would be the best option to determine the problem?

A. Wayne can activate the Source pane for the XPage in Domino Designer, set breakpoint(s) on theJavaScript code by double-clicking in theside-gutter and then preview the application

B. Wayne can install FireBug or FireBug lite in the browser, set breakpoints in the JavaScript code andthen run and debug the application

C. Wayne can insert print() and _dump() statements directly in the JavaScript code and use theinformation sent to the console window to helpdebug the problem

D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the"local\xsp" source folder, set breakpoint(s)in the code using the standard Java tooling and then preview the application

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 2Peter wants to enhance the view controls used in his application so that they can display rich content fromthe underlying document collection. He wants to do this in an efficient manner as the application hasthousands of documents and is accessed by hundreds of concurrent users. Which of the followingapproaches should John take to add this enhancement to his application most efficiently?

A. Modify the Domino view to include the rich text field and add a new column to his view controls thatautomatically binds to this field.

B. Add a computed column to the view control that opens each document, set the column content type toHTML, and bind the rich text contentfrom each document using JavaScript code.

C. Add an action to each column that will retrieve the rich text content from the underlying document whenclicked, assign it to a computed field with content type set to HTML, and then display that field.

D. Nothing - XPages view controls cannot display rich content.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:answer is corrected.

QUESTION 3Liz must do a code review of a third party XPages application in order to optimize performance whereverpossible. She has come up with a shortlist of things to do. Each of the following can be used to improveperformance EXCEPT which one?

A. Using partial refresh wherever possible.B. Replacing post-based requests with get-based requests wherever possibleC. Setting the dataCache property on Domino view data sources to "full" wherever possibleD. Using viewScope variables to manage application state wherever possible

Correct Answer: CSection: (none)Explanation

Page 3: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Explanation/Reference:Explanation:

QUESTION 4Tamsin is building an XPages application for use on mobile devices. She finds the font and row height onView Panel controls too small and difficult to navigate on a touch screen. Which View Panel propertyshould she add her CSS class to?

A. dataTableStyleClassB. viewStyleClassC. viewPanelStyleClassD. captionStyleClass

Correct Answer: ASection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 5Marion wants to use the Dojo mobile controls in an application she is building for deployment on a Domino8.5.2 server. Which of the following statements best describes the steps she must take?

A. Marion just has to use the relevant Dojo modules that are installed by default on the server.B. Marion must use modules from at least Dojo 1.5.0.C. Marion must use modules from at least Dojo 1.6.0.D. Dojo does not have any mobile controls.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 6Elaine wants to use the "webkit" stylesheet for webkit browsers. Which object will enable her to do this?

http://www.gratisexam.com/

A. facesContext.getExternalContext().getRequest().getHeader("User-Agent")B. facesContext.getExternalContext().getContext().getHeader("User-Agent")C. facesContext.getRequest().getHeader("User-Agent")D. facesContext.getExternalContext().getHeader("User-Agent")

Correct Answer: ASection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 7

Page 4: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Joe wishes to retrieve the HttpServletRequest while his XPage is loading. Which of the following is trueregarding this activity?

A. Joe needs to add the following server side JS code to the afterPageLoad event: var request =facesContext.getRequest();

B. It is not possible to obtain this information as an XPage is loadingC. Joe needs to add the following server side JS code to the beforePageLoad event:

var externalContext = facesContext.getExternalContext(); var request = externalContext.getRequest();D. Joe needs to add the following client side JS code to the beforePageLoad event:

var clientContext = facesContext.getClientContext(); var request = clientContext.getRequest();

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 8John has a managed bean which is defined as follows:

The bean has a property called 'miles' which allows a distance in miles to be entered and converted tokilometers. John wishes to have a user enter a value via an edit box and use the managed bean to convertthe value from miles to kilometers. What should the value of the edit box's value attribute be in order toutilize the managed bean?

A. <xp:inputText id="inputText1" value="#{view.distanceConverter.miles}"></xp:inputText>B. <xp:inputText id="inputText1" value="#{bean.MyBean.setMiles()}"></xp:inputText>C. <xp:inputText id="inputText1" value="distanceConverter.miles"></xp:inputText>D. <xp:inputText id="inputText1" value="#{distanceConverter.miles}"></xp:inputText>

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 9John wishes to create a component that is capable of saving its state as the JSF component tree is beingsaved and restored. In order to do this, John's component must implement which of the followinginterfaces:

A. com.ibm.xpages.component.XPStateHolderB. javax.faces.component.StateHolderC. javax.faces.component.DataHolderD. javax.xpages.component.StateHolder

Correct Answer: BSection: (none)Explanation

Page 5: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Explanation/Reference:Explanation:

QUESTION 10John wishes to add a managed bean to his application. In order to do this he must do which of thefollowing:

A. Create a file called xpages-config.xml within his application and define the managed bean within the fileusing the appropriate syntax.

B. Create a JavaBean class and add the Java class as a page resource to the XPage where the managedbean is to be used.

C. Open the pre-existing faces-config.xml file located at WebContent\WEB-INF\faces-config.xml and addthe appropriate markup to the file.

D. Open the pre-existing xpages-config.xml file located at WebContent\WEB-INF\xpages- config.xml andadd the appropriate markup to the file.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 11John wishes to add a Java Class to his XPages application. How would he do this?

A. Expand his application in the "Applications Navigator" and create a new Java Script Library and placethe necessary Java logic within that script library?

B. Switch to the Java Perspective, navigate to the "Local" Java Source Folder within the application (usingthe Package Explorer), and create the Java Class within that folder

C. Switch to the Java Perspective and create a new Java Source Folder within the application (using thePackage Explorer), and create the Java Class within that folder

D. Expand his application in the "Applications Navigator" and create a new Java Agent, place thenecessary Java logic within the agent, and call the agent from within the XPage

Correct Answer: CSection: (none)Explanation

Explanation/Reference:answer is valid.

QUESTION 12Pat wishes to create a new XPages UI control which will take user input. At a MINIMUM which of thefollowing does he need to do?

A. Create a UI Component extension Java Class that extends UIInputComponent, create an xsp- configfile to define the tag, create a Java Class which will serve as a renderer, in order to render the tag asHTML markup.

B. Create a UI Component extension Java Class that extends UIInput, create an xsp-config file to definethe tag, create a Java Class which will serve as a renderer, in order to render the tag as HTML markup.

C. Create a custom control with an edit box and reuse the custom control within the XPagesD. Create a UI Component extension Java Class that extends UIInputComponent, create an xsp- config

file to define the tag, create a Java Class which will serve as a renderer, in order to render the tag asHTML markup. Then create a managed bean definition in faces-config.xml.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

Page 6: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

QUESTION 13Per wants to connect to a datasource using JDBC. What is the best way to do this?

A. Write a LotusScript or Java agent and call it from Client-Side JavaScript, as he would have done intraditional Domino web applications.

B. He must use a third-party tool like DECS or LEI.C. The necessary JDBC drivers will come pre-installed with Domino. He just needs to write SSJS or Java

to call the required methods.D. He will need to download and install the relevant JDBC drivers and write SSJS or Java to call the

required methods.

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 14John needs to access data which is in a relational database from his XPages application. What is the bestoption for accessing the data?

A. As long as there is a JDBC driver available for the database then John can write Java to access thedatabase

B. As long as there is a JDBC driver available for the database then John can write Java or Server SideJavascript to access the database.

C. The relational data source would need to have a web service added to it to allow access to the data.D. It is not possible to access relational data from an XPage

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 15David has an XPage designed to view a document. He is adding a Delete button, but he wants to addsome client-side browser JavaScript to make a confirm dialog appear containing the document Subjectfield. How would he retrieve the Subject field value?

A. var subject = "#{javascript: dominoDoc.getItemValueString('Subject')}"; confirm("Subject: "+subject+"\nAre you sure you want to delete this document?");

B. var subject = dominoDoc.getItemValueString('Subject'); confirm("Subject: "+subject+"\nAre you sureyou want to delete this document?");

C. var subject = "#{id:dominoDoc.getItemValueString('Subject')}"; confirm("Subject: "+subject+"\nAre yousure you want to delete this document?");

D. var subject = XSP.xhr("#{id:Subject}");confirm("Subject: "+subject+"\nAre you sure you want to delete this document?");

Correct Answer: ASection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 16Elizabeth needs to parse the contents of a web page held on a remote server into an applicationScope

Page 7: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

variable via the server side onclick event of a button using Server Side JavaScript. How would she do this?

A. It is not possible to perform network operations from Server Side JavaScriptB. Create a new Java class to perform the operation in a Java Script Library and call it from the onclick

event of the button.C. Create a new Java class to perform the operation in a Java Agent and call it from the onclick event of

the button.D. Create a new Java class to perform the operation in the WebContent\WEB-INF\src folder via the

Package Explorer and call it from the onclickevent of the button.

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

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

A. Create a common Client-Side JavaScript Library for the XPages to share that the user interface canuse to execute the business logic

B. Use a series of Custom Controls to hold the business logic and share them amongst the XPagesC. Create a common Server-Side JavaScript Library for the XPages to share that the user interface can

use to execute the business logicD. The user interface and the business logic in an XPage can not easily be separated and must be

maintained in each XPage

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

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

http://www.gratisexam.com/

A. The application will perform as expected.B. The application will generate an error because you can not declare global Server-Side JavaScript

variablesC. The application will run, but the values of the globally defined variables may be lost when the server's

JVM garbage collects variables, causingunexpected results.

D. The application will run, but every partial or full refresh will reset the values of the global variables when

Page 8: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

it reloads the Server-Side JavaScript library.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 19Liz wants to make the user confirm their action when they try and delete a document from the applicationusing a delete button. The confirmation message needs to display the title of the document in it. What isthe best way to compute this message?

A. In the client side event of the delete button use the following code:if (confirm("Are you sure you want to delete the document " + document1.getItemValueString('title'))){return true;}else{return false;}

B. In the client side event of the delete button use the following code:if (confirm("Are you sure you want to delete the document " + "#{javascript:document1.getItemValueString('title')}")){ return true;}else{return false;}

C. In the server side event of the delete button use the following code:if (confirm("Are you sure you want to delete the document " + document1.getItemValueString('title'))){return true;}else{return false;}

D. In the server side event of the delete button use the following code:if (confirm("Are you sure you want to delete the document " + "#{javascript:document1.getItemValueString('title')}"){ return true;}else{return false;}

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 20Fred wants to remove any reference to pre-defined CSS frameworks such as OneUI from his XPagesapplication. How does he achieve this?

A. It is not possible to remove all CSS files from an XPages applicationB. Create a new Theme which extends the "webstandard" framework like this:

<theme extends="webstandard"></theme>

C. Create a new Theme which extends the "none" framework like this:<theme extends="none"></theme>

D. Create a new Theme which removed the extends property from the theme definition like this:<theme></theme>

Correct Answer: D

Page 9: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Section: (none)Explanation

Explanation/Reference:

QUESTION 21Francis wants to add a ClientSide JavaScript library called "loading.js" to his XPages. What is the bestmethod to achieve this?

A. He must add the script library as a resource to each XPage.B. He should add it to a Custom Control, which he should then add to every XPage.C. He should add the following code to a theme:

<resource><content-type>application/x-javascript</content-type> <href>loading.js</href></resource>

D. He should add the following code to a theme:<resource><content-type>text/javascript</content-type><href>loading.js</href></resource>

Correct Answer: CSection: (none)Explanation

Explanation/Reference:answer is verified.

QUESTION 22Dominic wants to implement the open source CSS framework called Blueprint in his XPages application.He does not want to include any other 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?

A. In each XPage in the application add the required CSS files to the Resources sectionB. Create a new theme which extends webstandard and then add each Blueprint CSS file via a resource

definitionC. Create a new theme which extends oneui and then add each Blueprint CSS file via a resource definitionD. Create a new theme which does not have an extension property and then add each Blueprint CSS file

via a resource definition

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 23Titus has created a JSON string that he will pass to the browser. What method could he use to convert thestring to an object?

A. dijit,fromJson()B. dojo.fromJson()C. dojo.toJson()D. dijit.toJson()

Correct Answer: BSection: (none)Explanation

Page 10: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Explanation/Reference:Explanation:

QUESTION 24John has a page with an edit box and a submit button and decides he wants to use a Dojo NumberSpinnerdijit. 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?

A. John needs to check the check box "Enable Dojo" on the submit buttonB. John needs to add a dojo module to the XPage.C. John needs to add a server side JavaScript library to the XPageD. John needs to configure themes to include a dojo theme like tundra

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 25Brandon wants to extend Dojo's dijit.Dialog box to add some extra functionality. How would Brandondeclare the new Dojo class?

A. dijit.declare("brandons.Dialog", "dijit.Dialog", { // added functionality });B. dojo.declare("brandons.Dialog", "dijit.Dialog", { // added functionality });C. dojo.declare("brandons.Dialog", dijit.Dialog, { // added functionality });D. dijit.declare("brandons.Dialog", dijit.Dialog, { // added functionality });

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 26Lydia wants to create a JSON string to represent an array with three objects. Each object has twovariables, vA and vB, set to different string values of "one", "two", "three", "four", "five", and "six".What is the proper syntax for the JSON string?

A. [ { vA: 'one', vB: 'two' },{ vA: 'three', vB: 'four' },{ vA: 'five', vB: 'six' } ]B. "[ { vA: 'one', vB: 'two' },{ vA: 'three', vB: 'four' },{ vA: 'five', vB: 'six' } ]"C. "[ { vA: one, vB: two },{ vA: three, vB: four },{ vA: five, vB: six } ]"D. new Array(new Object({ vA: 'one', vB: 'two' }), new Object({ vA: 'one', vB: 'two' }), new Object({

vA: 'one', vB: 'two' }));

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 27Jane would like to specify a custom toolbar for the CK Editor in her Domino 8.5.2 application. How can sheachieve this?

A. Jane will need to edit the files in the domino\html\ckeditor subfolders of the data folder on her server.B. Jane can use the toolBar property of the Rich Text Field and set it accordingly.

Page 11: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

C. Jane can add a Dojo Attribute called "toolBar" and set it accordingly.D. There is no way to change the default toolbar of the CK Editor.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

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

A. From the 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 Box to set the dojoType to "dijit.form.NumberSpinner".

B. 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 thatNumberSpinner.js file to the XPage.Configure the Edit Box to set the dojoType to "dijit.form.NumberSpinner".

C. 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 thatNumberSpinner.js file to the XPage.Configure the Edit Box to set the dojoType to "dijit.form.NumberSpinner".

D. In the XPage, in the Resources tab of the Properties view, add a Dojo Module resource for"dijit.form.NumberSpinner" to the XPage.Configure the Edit Box to set the dojoType to "dijit.form.NumberSpinner".

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

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

A. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application usingthe following code:/*** Custom Dojo Control*/dojo.provide('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/var dialog = new dijit.Dialog();

B. Whenever he initializes a new dijit.Dialog, add an onHide event like so:var dialog = new dijit.Dialog({onHide: validateForm});

Page 12: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

C. In the "Close" or "Cancel" button of each dialog add a call to validateForm in the onClick event.D. 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('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/var dialog = new com.myco.widget.Dialog();

E. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application usingthe following code:/*** Custom Dojo Control*/dojo.provide('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/var dialog = new com.myco.widget.Dialog();

F. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application usingthe following code:/*** Custom Dojo Control*/dojo.provide('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/var dialog = new com.myco.widget.Dialog();

G. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application usingthe following code:/*** Custom Dojo Control*/dojo.provide('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/var dialog = new com.myco.widget.Dialog();

Correct Answer: DEFG

Page 13: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Section: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 30Michelle is editing an existing XPage: ?The page has a "tags" Edit Box with Type Ahead enabled, whichprovides suggestions for possible tags or keywords to add to the document. ?The HTML source of the EditBox includes a dojoType attribute. ?After the edit box there is a panel named "tagsHint" explaining theconcept of tags. ?Now Michelle wants to hide the "tagsHint" panel when values are already present in the"tags" field. ?She adds an Output Script control containing the following code: var tags = dijit.byId("#{id:tags}"); if( tags.value.length > 0 ){ // already set some tag var tagsHint = XSP.getElementById("#{id:tagsHint}"); tagsHint.style.display = "none"; } ?When she opens the page in a web browser, theJavaScript Error Console reports the error: tags is undefined at the line: if( tags.value.length > 0 ){ //already set some tag What is the problem with the sample code?

A. There is no initial value in the tags field, so it is not possible to find the length of the value.B. The dijit is not yet loaded; the code in the Output Script control should be in an "addOnLoad" listener

function.C. The script should be in the "onload" event of the XPage control corresponding to the HTML "body" tag.D. The first line should be: var tags = XSP.getElementById("#{id:tags}");

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 31Rachel needs to enable her XPages application for multi-language use. Where should she go to enablelocalization?

A. It is not possible to enable localization at application-level in XPages.B. In Lotus Notes, open up the Application Properties and on the Advanced tab click 'Enable localization'C. In Domino Designer, open up the Application Properties and on the Advanced tab click 'Enable

localization'D. In Domino Designer, open up the Application Properties and on the XPages tab click 'Enable

localization'

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 32Wayne needs to debug some client side JavaScript code in an XPage to find why a feature is not workingas expected. Which of the following actions would be the best option to determine the problem?

A. Wayne can activate the Source pane for the XPage in Domino Designer, set breakpoint(s) on theJavaScript code by double-clicking in theside-gutter and then preview the application

B. Wayne can install FireBug or FireBug lite in the browser, set breakpoints in the JavaScript code andthen run and debug the application

C. Wayne can insert print() and _dump() statements directly in the JavaScript code and use theinformation sent to the console window to helpdebug the problem

D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the

Page 14: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

"local\xsp" source folder, set breakpoint(s)in the code using the standard Java tooling and then preview the application

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 33Peter wants to enhance the view controls used in his application so that they can display rich content fromthe underlying document collection. He wants to do this in an efficient manner as the application hasthousands of documents and is accessed by hundreds of concurrent users. Which of the followingapproaches should John take to add this enhancement to his application most efficiently?

http://www.gratisexam.com/

A. Modify the Domino view to include the rich text field and add a new column to his view controls thatautomatically binds to this field.

B. Add a computed column to the view control that opens each document, set the column content type toHTML, and bind the rich text contentfrom each document using JavaScript code.

C. Add an action to each column that will retrieve the rich text content from the underlying document whenclicked, assign it to a computed field with content type set to HTML, and then display that field.

D. Nothing - XPages view controls cannot display rich content.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 34Marco has built an XPage that has increased in complexity over time and now contains several hundredlines of XSP markup, with many postback actions that conditionalize the display of the page. He feels thatthe page does not perform well and is looking to improve the responsiveness for the end-user. He isconsidering the following actions to improve performance. All of the following actions may improveperformance EXCEPT which one:

A. Reduce the size of the page by splitting it up into several custom controls wherever possible.B. Use Partial Refresh to conditionally redraw only those parts of the page impacted by postback actions.C. Conditionally set the "loaded" property to "true" for controls and data sources that are displayed, and

"false" when they are hidden.D. Use scoped variables to store/retrieve data that will not change between postback requests.

Correct Answer: ASection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 35

Page 15: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Liz must do a code review of a third party XPages application in order to optimize performance whereverpossible. She has come up with a shortlist of things to do. Each of the following can be used to improveperformance EXCEPT which one?

A. Using partial refresh wherever possible.B. Replacing post-based requests with get-based requests wherever possibleC. Setting the dataCache property on Domino view data sources to "full" wherever possibleD. Using viewScope variables to manage application state wherever possible

Correct Answer: CSection: (none)Explanation

Explanation/Reference:answer is corrected.

QUESTION 36Eric is writing an XPages in the Notes Client (XPinC) application and has a data type problem in a ServerSide JavaScript function. How can he find out more information about the objects in his code?

A. Use print() and _dump statements in his code and look for the output on the server consoleB. Use print() and _dump statements in his code and look in Help -> Support -> View Trace for the outputC. Set up a new debug configuration in the Java perspective in Domino Designer and then set a

breakpoint in the code and step through it toexamine the objects

D. Add a Firebug Lite control to his XPage and then set a breakpoint in the code using Firebug in theNotes Client

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 37Marion wants to use the Dojo mobile controls in an application she is building for deployment on a Domino8.5.2 server. Which of the following statements best describes the steps she must take?

A. Marion just has to use the relevant Dojo modules that are installed by default on the server.B. Marion must use modules from at least Dojo 1.5.0.C. Marion must use modules from at least Dojo 1.6.0.D. Dojo does not have any mobile controls.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 38Elaine wants to use the "webkit" stylesheet for webkit browsers. Which object will enable her to do this?

A. facesContext.getExternalContext().getRequest().getHeader("User-Agent")B. facesContext.getExternalContext().getContext().getHeader("User-Agent")C. facesContext.getRequest().getHeader("User-Agent")D. facesContext.getExternalContext().getHeader("User-Agent")

Page 16: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Correct Answer: ASection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 39Tamsin is building an XPages application for use on mobile devices. She finds the font and row height onView Panel controls too small and difficult to navigate on a touch screen. Which View Panel propertyshould she add her CSS class to?

A. dataTableStyleClassB. viewStyleClassC. viewPanelStyleClassD. captionStyleClass

Correct Answer: ASection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 40John has a managed bean which is defined as follows: <faces-config> <managed-bean> <managed-bean-name>distanceConverter</managed-bean-name> <managed-bean- class>bean.MyBean</managed-bean-class> <managed-bean-scope>view</managed-bean- scope> </managed-bean> </faces-config> Thebean has a property called 'miles' which allows a distance in miles to be entered and converted tokilometers. John wishes to have a user enter a value via an edit box and use the managed bean to convertthe value from miles to kilometers.What should the value of the edit box's value attribute be in order to utilize the managed bean?

A. <xp:inputText id="inputText1" value="#{view.distanceConverter.miles}"></xp:inputText>B. <xp:inputText id="inputText1" value="#{bean.MyBean.setMiles()}"></xp:inputText>C. <xp:inputText id="inputText1" value="distanceConverter.miles"></xp:inputText>D. <xp:inputText id="inputText1" value="#{distanceConverter.miles}"></xp:inputText>

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 41John wishes to create a component that is capable of saving its state as the JSF component tree is beingsaved and restored. In order to do this, John's component must implement which of the followinginterfaces:

A. com.ibm.xpages.component.XPStateHolderB. javax.faces.component.StateHolderC. javax.faces.component.DataHolderD. javax.xpages.component.StateHolder

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

Page 17: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Explanation:

QUESTION 42John wishes to add a Java Class to his XPages application. How would he do this?

A. Expand his application in the "Applications Navigator" and create a new Java Script Library and placethe necessary Java logic within that scriptlibrary?

B. Switch to the Java Perspective, navigate to the "Local" Java Source Folder within the application (usingthe Package Explorer), and create the Java Class within that folder

C. Switch to the Java Perspective and create a new Java Source Folder within the application (using thePackage Explorer), and create the JavaClass within that folder

D. Expand his application in the "Applications Navigator" and create a new Java Agent, place thenecessary Java logic within the agent, and callthe agent from within the XPage

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 43Joe wishes to retrieve the HttpServletRequest while his XPage is loading. Which of the following is trueregarding this activity?

A. Joe needs to add the following server side JS code to the afterPageLoad event: var request =facesContext.getRequest();

B. It is not possible to obtain this information as an XPage is loadingC. Joe needs to add the following server side JS code to the beforePageLoad event:

var externalContext = facesContext.getExternalContext(); var request = externalContext.getRequest();D. Joe needs to add the following client side JS code to the beforePageLoad event:

var clientContext = facesContext.getClientContext(); var request = clientContext.getRequest();

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 44Pat wishes to create a new XPages UI control which will take user input. At a MINIMUM which of thefollowing does he need to do?

A. Create a UI Component extension Java Class that extends UIInputComponent, create an xsp- configfile to define the tag, create a Java Classwhich will serve as a renderer, in order to render the tag as HTML markup.

B. Create a UI Component extension Java Class that extends UIInput, create an xsp-config file to definethe tag, create a Java Class which willserve as a renderer, in order to render the tag as HTML markup.

C. Create a custom control with an edit box and reuse the custom control within the XPagesD. Create a UI Component extension Java Class that extends UIInputComponent, create an xsp- config

file to define the tag, create a Java Classwhich will serve as a renderer, in order to render the tag as HTML markup. Then create a managedbean definition in faces-config.xml.

Correct Answer: BSection: (none)

Page 18: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

Explanation

Explanation/Reference:

QUESTION 45John wishes to add a managed bean to his application. In order to do this he must do which of thefollowing:

A. Create a file called xpages-config.xml within his application and define the managed bean within the fileusing the appropriate syntax.

B. Create a JavaBean class and add the Java class as a page resource to the XPage where the managedbean is to be used.

C. Open the pre-existing faces-config.xml file located at WebContent\WEB-INF\faces-config.xml and addthe appropriate markup to the file.

D. Open the pre-existing xpages-config.xml file located at WebContent\WEB-INF\xpages- config.xml andadd the appropriate markup to the file.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 46John needs to access data which is in a relational database from his XPages application. What is the bestoption for accessing the data?

A. As long as there is a JDBC driver available for the database then John can write Java to access thedatabase

B. As long as there is a JDBC driver available for the database then John can write Java or Server SideJavascript to access the database.

C. The relational data source would need to have a web service added to it to allow access to the data.D. It is not possible to access relational data from an XPage

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 47Per wants to connect to a datasource using JDBC. What is the best way to do this?

A. Write a LotusScript or Java agent and call it from Client-Side JavaScript, as he would have done intraditional Domino web applications.

B. He must use a third-party tool like DECS or LEI.C. The necessary JDBC drivers will come pre-installed with Domino. He just needs to write SSJS or Java

to call the required methods.D. He will need to download and install the relevant JDBC drivers and write SSJS or Java to call the

required methods.

Page 19: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

http://www.gratisexam.com/

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 48Jo wants to make a configurable list of countries available to the client side JavaScript of her XPage for usein various different fields on the web page. What would be the most efficient approach?

A. Add an @DbColumn to a server side script library to look up the country list in each place it is requiredB. Perform an AJAX request to get the country list from another XPage when it is required using

dojo.xhrGetC. Use the Output Script control to create a global Client Side JavaScript object to reference when the list

is requiredD. Add a @Decorum to a client side script library to look up the country list in each place it is required

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

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

A. Create a common Client-Side JavaScript Library for the XPages to share that the user interface canuse to execute the business logic

B. Use a series of Custom Controls to hold the business logic and share them amongst the XPagesC. Create a common Server-Side JavaScript Library for the XPages to share that the user interface can

use to execute the business logicD. The user interface and the business logic in an XPage can not easily be separated and must be

maintained in each XPage

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 50

Elizabeth needs to parse the contents of a web page held on a remote server into an applicationScopevariable via the server side onclick event of a button using Server Side JavaScript. How would she do this?

A. It is not possible to perform network operations from Server Side JavaScript

Page 20: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

B. Create a new Java class to perform the operation in a Java Script Library and call it from the onclickevent of the button.

C. Create a new Java class to perform the operation in a Java Agent and call it from the onclick event ofthe button.

D. Create a new Java class to perform the operation in the WebContent\WEB-INF\src folder via thePackage Explorer and call it from the onclickevent of the button.

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

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

A. The application will perform as expected.B. The application will generate an error because you can not declare global Server-Side JavaScript

variablesC. The application will run, but the values of the globally defined variables may be lost when the server's

JVM garbage collects variables, causingunexpected results.

D. The application will run, but every partial or full refresh will reset the values of the global variables whenit reloads the Server-Side JavaScript library.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 52John has a JavaScript function in a Client Side JavaScript library which he wrote to parse some JSON dataand loop through the resulting objects. If he wanted to perform the same task in ServerSide JavaScript what would be the most efficient action?

A. write a new function in Server Side JavaScript to perform the same taskB. copy the Client Side function into a Server Side JavaScript library, add the script library to his XPage

and call the function from his Server SideJavaScript

C. add the Client Side JavaScript library to his XPage and call the function from his server side JavaScriptD. Server Side JavaScript does not work with JSON data

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 53Liz wants to make the user confirm their action when they try and delete a document from the applicationusing a delete button. The confirmation message needs to display the title of the document in it. What isthe best way to compute this message?

Page 21: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

A. In the client side event of the delete button use the following code:if (confirm("Are you sure you want to delete the document " + document1.getItemValueString('title'))){return true;}else{return false;}

B. In the client side event of the delete button use the following code:if (confirm("Are you sure you want to delete the document " + "#{javascript:document1.getItemValueString('title')}")){ return true;}else{return false;}

C. In the server side event of the delete button use the following code:if (confirm("Are you sure you want to delete the document " + document1.getItemValueString('title'))){return true;}else{return false;}

D. In the server side event of the delete button use the following code:if (confirm("Are you sure you want to delete the document " + "#{javascript:document1.getItemValueString('title')}"){ return true;}else{return false;}

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 54Dominic wants to implement the open source CSS framework called Blueprint in his XPages application.He does not want to include any other 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?

A. In each XPage in the application add the required CSS files to the Resources sectionB. Create a new theme which extends webstandard and then add each Blueprint CSS file via a resource

definitionC. Create a new theme which extends oneui and then add each Blueprint CSS file via a resource definitionD. Create a new theme which does not have an extension property and then add each Blueprint CSS file

via a resource definition

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 55Ernie wants to add the Dojo theme "soria" to the other styling on his XPage. Which theme code will add theappropriate class to the body tag of the outputted HTML?

A. <control><name>ViewRoot</name><property mode="override"><name>styleClass</name><value>soria</value></property>

Page 22: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

<control>B. <control>

<name>ViewBody</name><property mode="override"><name>styleClass</name><value>soria</value></property><control>

C. <control><name>ViewRoot</name><property mode="concat"><name>styleClass</name><value>soria</value></property><control>

D. <control><name>ViewBody</name><property mode="concat"><name>styleClass</name><value>soria</value></property><control>

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 56Lydia wants to create a JSON string to represent an array with three objects. Each object has twovariables, vA and vB, set to different string values of "one", "two", "three", "four", "five", and "six".What is the proper syntax for the JSON string?

A. [ { vA: 'one', vB: 'two' },{ vA: 'three', vB: 'four' },{ vA: 'five', vB: 'six' } ]B. "[ { vA: 'one', vB: 'two' },{ vA: 'three', vB: 'four' },{ vA: 'five', vB: 'six' } ]"C. "[ { vA: one, vB: two },{ vA: three, vB: four },{ vA: five, vB: six } ]"D. new Array(new Object({ vA: 'one', vB: 'two' }), new Object({ vA: 'one', vB: 'two' }), new Object({

vA: 'one', vB: 'two' }));

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 57Frank is attempting to add some functionality to an existing XPage: ?The XPage has a Date Time Pickeredit box named "graduationDate" where users must enter their graduation date. ?Franklooks at the HTML source of the XPage and sees that the edit box has the HTML attribute:dojoType="ibm.xsp.widget.layout.DateTimeTextBoxContainer" ?Frank has added a combo box whereusers should choose their type of Job, from the options "Intern", "Graduate" or "Experienced". ?Frankwants to add an onchange listener to the combo box, that checks the value of the graduation date andgives a browser alert popup dialog like "Intern and Graduate positions only available in the first 2 yearsafter graduation". ?Frank has looked at the HTML source of the XPage and sees that the Date Time Pickeredit box has a dojoType attribute. Which of the following code snippets should Frank use to retrieve thegraduation date before triggering the alert dialog:

A. var graduationDate = getComponent("graduationDate").getValue();B. var graduationDate = XSP.getElementById("#{id:graduationDate}").value;

Page 23: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

C. var graduationDate = dojo.byId("#{id:graduationDate}").value;D. var graduationDate = dijit.byId("#{id:graduationDate}").getValue();

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 58Eric has added the Dojo Module "dijit.form.FilteringSelect" to his XPage and set the dojoType on hisCombo Box to "dijit.form.FilteringSelect". However, when he previews his XPage he is not seeing theFilteringSelect? What has he done wrong?

A. The correct Dojo module is dijit.FilteringSelectB. He has forgotten to set dojoParseOnLoad="true" and dojoTheme="true"C. He needs to use an Edit Box control instead of a Combo Box controlD. The correct Dojo module is dojo.FilteringSelect

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 59Brandon wants to extend Dojo's dijit.Dialog box to add some extra functionality. How would Brandondeclare the new Dojo class?

A. dijit.declare("brandons.Dialog", "dijit.Dialog", { // added functionality });B. dojo.declare("brandons.Dialog", "dijit.Dialog", { // added functionality });C. dojo.declare("brandons.Dialog", dijit.Dialog, { // added functionality }); D. dijit.declare("brandons.Dialog", dijit.Dialog, { // added functionality });

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 60Titus has created a JSON string that he will pass to the browser. What method could he use to convert thestring to an object?

A. dijit,fromJson()B. dojo.fromJson()C. dojo.toJson()D. dijit.toJson()

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 61

Page 24: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

John has a page with an edit box and a submit button and decides he wants to use a Dojo NumberSpinnerdijit. 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?

A. John needs to check the check box "Enable Dojo" on the submit buttonB. John needs to add a dojo module to the XPage.C. John needs to add a server side JavaScript library to the XPageD. John needs to configure themes to include a dojo theme like tundra

Correct Answer: BSection: (none)Explanation

Explanation/Reference:answer is updated.

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

A. From the 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 Box to set the dojoType to "dijit.form.NumberSpinner".

B. 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 thatNumberSpinner.js file to the XPage.Configure the Edit Box to set the dojoType to "dijit.form.NumberSpinner".

C. 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 thatNumberSpinner.js file to the XPage.Configure the Edit Box to set the dojoType to "dijit.form.NumberSpinner".

D. In the XPage, in the Resources tab of the Properties view, add a Dojo Module resource for"dijit.form.NumberSpinner" to the XPage.Configure the Edit Box to set the dojoType to "dijit.form.NumberSpinner".

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

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

A. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application usingthe following code:/*** Custom Dojo Control*/dojo.provide('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/

Page 25: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

var dialog = new dijit.Dialog();B. Whenever he initializes a new dijit.Dialog, add an onHide event like so:

var dialog = new dijit.Dialog({onHide: validateForm});

C. In the "Close" or "Cancel" button of each dialog add a call to validateForm in the onClick event.D. 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('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/var dialog = new com.myco.widget.Dialog();

E. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application usingthe following code:/*** Custom Dojo Control*/dojo.provide('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/var dialog = new com.myco.widget.Dialog();

F. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application usingthe following code:/*** Custom Dojo Control*/dojo.provide('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());/*** Initialization code*/var dialog = new com.myco.widget.Dialog();

G. Create a custom Dojo control and use that instead of the standard dijit.Dialog in the application usingthe following code:/*** Custom Dojo Control*/dojo.provide('com.myco.widget.Dialog');dojo.require('dijit.Dialog');(function(){dojo.declare("com.myco.widget.Dialog", dijit.Dialog, { onHide: validateForm})}());

Page 26: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

/*** Initialization code*/var dialog = new com.myco.widget.Dialog();

Correct Answer: DEFGSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 64Marco has built an XPage that has increased in complexity over time and now contains several hundredlines of XSP markup, with many postback actions that conditionalize the display of the page. He feels thatthe page does not perform well and is looking to improve the responsiveness for the end-user. He isconsidering the following actions to improve performance. All of the following actions may improveperformance EXCEPT which one:

A. Reduce the size of the page by splitting it up into several custom controls wherever possible.B. Use Partial Refresh to conditionally redraw only those parts of the page impacted by postback actions.C. Conditionally set the "loaded" property to "true" for controls and data sources that are displayed, and

"false" when they are hidden.D. Use scoped variables to store/retrieve data that will not change between postback requests.

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 65Eric is writing an XPages in the Notes Client (XPinC) application and has a data type problem in a ServerSide JavaScript function. How can he find out more information about the objects in his code?

A. Use print() and _dump statements in his code and look for the output on the server consoleB. Use print() and _dump statements in his code and look in Help -> Support -> View Trace for the outputC. Set up a new debug configuration in the Java perspective in Domino Designer and then set a

breakpoint in the code and step through it toexamine the objects

D. Add a Firebug Lite control to his XPage and then set a breakpoint in the code using Firebug in theNotes Client

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Explanation:

QUESTION 66John has an XPages application whose UI is entirely in English. John's company has expanded to newmarkets and as a result the application now also needs to support French and German users. Which of thefollowing are the first steps that John should take in order to localize his application?

A. Create a new application for each language, copying the XPage and Custom control design elements tothe new applications, localizing theXPages and Custom Controls in each application

B. Use a tool like Domino Global Workbench to localize the application and make it a multilingualapplication

Page 27: ActualTest.C2040-922 66,Questions … · D. Wayne can open the Java perspective in Domino Designer, find the Java code for the XPage in the "local\xsp" source folder, set breakpoint(s)

C. Create a copy of each of the XPages and Custom Controls, suffixed by the language identified (e.g._en, _fr etc..) and localize the contents ofthe suffixed design element.

D. Add English, French and German in the XPage localization options in Application Properties, perform a'clean' and 'rebuild' on the application.Enter the translated strings in the generated properties files.

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:

http://www.gratisexam.com/