Prepare Interview

Exams Attended

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

ExtJS Interview Questions and Answers

Experienced / Expert level questions & answers

Ques 1. Do you have any advice for developers using ExtJS for the first time?

ExtJS can be used by Web Application developers who are familiar with HTML but may have little or no experience with JavaScript application development. If you are starting to build a new web application, or you are revamping an existing application, then take your time to understand the basics of the library including.

Is it helpful? Add Comment View Comments
 

Ques 2. What is the purpose of Element Object in ExtJS?

  • Element wraps most of the DOM methods and properties that you'll need, providing a convenient, unified, cross-browser DOM interface (and you can still get direct access to the underlying DOM node when you need it via Element.dom)
  • The Element.get() method provides internal caching, so multiple calls to retrieve the same object are incredibly fast
  • The most common actions performed on DOM nodes are built into direct, cross-browser Element methods (add/remove CSS classes, add/remove event handlers, positioning, sizing, animation, drag/drop, etc.)

Is it helpful? Add Comment View Comments
 

Ques 3. For example, to show our message when any paragraph in our test page is clicked, what is the ExtJS code on paragraph click?

Ext.onReady(function() {
Ext.select('p').on('click', function() {
alert("You clicked a paragraph");
});
});

or

Ext.onReady(function() {
var paragraphClicked = function() {
alert("You clicked a paragraph");
}
Ext.select('p').on('click', paragraphClicked);
});

Is it helpful? Add Comment View Comments
 

Ques 4. How to handle event for a extjs component?

1) Using listeners config object.
For ex for grid events : listeners: {rowclick: gridRowClickHandler,rowdblclick: gridRowDoubleClickHandler}
2) Using addListener( String eventName, Function handler, [Object scope], [Object options] ) : void
Appends an event handler to this component
3) Using on( String eventName, Function handler, [Object scope], [Object options] ) : void
Appends an event handler to this element (shorthand for addListener)
For ex: store.on( "datachanged", function( store ){ ..... });

Is it helpful? Add Comment View Comments
 

Ques 5. How to handle exception while loading datastore?

Using loadexception event.
syntax: store.loadexception() : Fires if an exception occurs in the Proxy during loading.
use beforeload : ( Store this, Object options ) : Fires before a request is made for a new data object. If the beforeload handler returns false the load action will be canceled.
syntax:
store.on('loadexception', function(event, options, response, error) {
alert("Handling the error");
event.stopEvent();
});

Is it helpful? Add Comment View Comments
 

Ques 6. How we can apply pagination in grid panel?

using Ext.PagingToolbar plugin, we can implement pagination to a grid panel
syntax:
new Ext.PagingToolbar({
pageSize: 25,
store: store,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No topics to display",
})
// trigger the data store load
store.load({params:{start:0, limit:25}});

Is it helpful? Add Comment View Comments
 

Ques 7. What is the purpose of Load mask?

To apply mask to page level / component level.
restrict user not to access any components in page
var pageProcessBox = new Ext.LoadMask( Ext.getBody(), { msg: 'Loading Employee details.' } );
pageProcessBox.show();

Is it helpful? Add Comment View Comments
 

Ques 8. What is purpose of renderer in grid panel?

Using config option,
renderer: fnCellColor where fnCellColor is method to apply color to a cell.

Is it helpful? Add Comment View Comments
 

Ques 9. How to get selection model used in a grid panel?

Using grid.getSelectionModel(); method

Is it helpful? Add Comment View Comments
 

Ques 10. What is use of combo select event function?

To get the selected value from a combo.using getvalue();
var selectedComboValue = mycombo1.getValue();

Is it helpful? Add Comment View Comments
 

Ques 11. How to register callbacks to the load and exception events of the JsonStore?

var grid = new Ext.grid.GridPanel({
store: new Ext.data.JsonStore({
[...]
listeners: {
load: this.onLoadSuccess.crateDelegate(this),
exception: this.onLoadException.createDelegate(this)
}
}),

onLoadSuccess: function () {
// success
},

onLoadException: function () {
// error
},

[...]
}

Is it helpful? Add Comment View Comments
 

Ques 12. Why did you choose Ext JS?

Given the wide range of JavaScript libraries available it was important to choose the right one. We needed to choose a library that was consistent in the way that it presents information to the user, but also consistent in the way that you code using the library.

With all Ext components extending the ‘Observable’ class we had the ability to write consistent code in an event-driven manner, much like writing a desktop application, not easily achieved with other libraries. What’s more is that we knew it would work cross-browser, again something not easily achieved that saves countless hours on large projects.

Is it helpful? Add Comment View Comments
 

Ques 13. What features could we add to Ext to make building a rich application like PLANet easier in the future?

Once an application gets over a certain size, and customer releases become more frequent, the burden of testing the application starts to take its toll. An Ext supported test suite would save huge amounts of time. The current problem of test suites with Ext is being able to reliably predict the automatic ids that Ext generates for page elements. Test tools are beginning to implement support for CSS selectors to overcome this problem, but few currently exist. Ext could provide better documentation on how to build better test cases with Ext so that more time can be spent on development rather than testing.

Is it helpful? Add Comment View Comments
 

Ques 14. Difference between ExtJS and JQuery?

ExtJs and JQuery are kind of apples and oranges. You can compare Ext Core to JQuery, and ExtJs to JQuery UI.
Ext JS is a full-fledged widget library while jQuery (not jQuery UI) and Mootools are JavaScript frameworks that help with DOM manipulation etc.
Whilst jQuery and Mootools help with the general workings of a site.
jQuery UI is a much less rich set of components.
Ext JS seems to be focussed on tables and storing data, plus manipulating it.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

Related interview subjects

PHP interview questions and answers - Total 27 questions
jQuery interview questions and answers - Total 22 questions
React interview questions and answers - Total 40 questions
Dojo interview questions and answers - Total 23 questions
Ajax interview questions and answers - Total 58 questions
ASP interview questions and answers - Total 82 questions
Angular interview questions and answers - Total 50 questions
Oracle JET(OJET) interview questions and answers - Total 54 questions
ExtJS interview questions and answers - Total 50 questions
Angular JS interview questions and answers - Total 21 questions
JavaScript interview questions and answers - Total 59 questions
©2023 WithoutBook