InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is SimpleRemoteLogHandler in GWT? |
|
Answer» This handler sends log messages to the server, where they will be logged using the server side logging mechanism. |
|
| 2. |
What is FirebugLogHandler in GWT? |
|
Answer» FirebugLogHandler logs to Firebug console. |
|
| 3. |
What is ConsoleLogHandler in GWT? |
|
Answer» ConsoleLogHandler logs to the javascript console, which is used by Firebug Lite (for IE), Safari and Chrome. |
|
| 4. |
What is DevelopmentModeLogHandler in GWT? |
|
Answer» DevelopmentModeLogHandler logs by calling method GWT.log. These messages can only be seen in Development Mode in the DevMode window. |
|
| 5. |
What is SystemLogHandler in GWT? |
|
Answer» SystemLogHandler logs to stdout and these messages can only be seen in Development Mode in the DevMode window. |
|
| 6. |
What is GWT logging framework? |
|
Answer» The logging framework emulates java.util.logging, so it uses the same syntax and has the same behavior as server side logging code. GWT logging is configured using .gwt.xml files. We can configure logging to be enabled/disabled; we can enable/disable particular handlers, and change the default logging level. |
|
| 7. |
How to enable history support in GWT application? |
|
Answer» In order to use GWT History support, we must first embed following iframe into our host HTML page. <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe> |
|
| 8. |
Which tag of *.gwt.xml is used to support internationalization in GWT application? |
|
Answer» extend-property tag with attribute name set as locale and values as language specific locale, say de for german locale. |
|
| 9. |
What is Localizable Interface internationalization technique in GWT? |
|
Answer» This technique is the most powerful among the three techniques. Implementing Localizable allows us to create localized versions of custom types. It's an advanced internationalization technique. |
|
| 10. |
What is Dynamic String Internationalization technique in GWT? |
|
Answer» This technique is very flexible but slower than static string internationalization. Host page contains the localized strings therefore, applications are not required to be recompiled when we add a new locale. If GWT application is to be integrated with an existing server-side localization system, then this technique is to be used. |
|
| 11. |
What is Static String Internationalization technique in GWT? |
|
Answer» This technique is most prevalent and requires very little overhead at runtime; is a very efficient technique for translating both constant and parameterized strings;simplest to implement. Static string internationalization uses standard Java properties files to store translated strings and parameterized messages, and strongly-typed Java interfaces are created to retrieve their values. |
|
| 12. |
What are the ways using which you can internationalize a GWT application? |
|
Answer» GWT provides three ways to internationalize a GWT application −
|
|
| 13. |
Which interface a java data object should implement so that it can be transferred over the wire in GWT RPC? |
|
Answer» A java data object should implement isSerializable interface so that it can be transferred over the wire in GWT RPC. |
|
| 14. |
What are the core components of GWT RPC? |
|
Answer» Following are the three components used in GWT RPC communication mechanism −
|
|
| 15. |
What is GWT RPC? |
Answer»
|
|
| 16. |
What is GWT UiBinder? |
Answer»
|
|
| 17. |
How can you create a custom GWT Widget? |
|
Answer» GWT provides three ways to create custom user interface elements. There are three general strategies to follow −
|
|
| 18. |
Explain Event handling in GWT. |
|
Answer» GWT provides a event handler model similar to Java AWT or SWING User Interface frameworks. A listener interface defines one or more methods that the widget calls to announce an event. GWT provides a list of interfaces corresponding to various possible events. A class wishing to receive events of a particular type implements the associated handler interface and then passes a reference to itself to the widget to subscribe to a set of events. For example, the Button class publishes click events so you will have to write a class to implement ClickHandler to handle click event. All GWT event handlers have been extended from EventHandler interface and each handler has only a single method with a single argument. This argument is always an object of associated event type. Each event object have a number of methods to manipulate the passed event object. |
|
| 19. |
What is DialogBox in GWT? |
|
Answer» This widget represents a form of popup that has a caption area at the top and can be dragged by the user. Unlike a PopupPanel, calls to PopupPanel.setWidth(String) and PopupPanel.setHeight(String) will set the width and height of the dialog box itself, even if a widget has not been added as yet. |
|
| 20. |
What is PopupPanel in GWT? |
|
Answer» This widget represents a panel that can pop up over other widgets. It overlays the browser's client area (and any previously-created popups). |
|
| 21. |
What is FormPanel in GWT? |
|
Answer» This widget represents a panel that wraps its contents in an HTML <FORM> element. |
|
| 22. |
Which GWT widget represents a simple panel that makes its contents focusable? |
|
Answer» FocusPanel widget represents a simple panel that makes its contents focusable, and adds the ability to catch mouse and keyboard events. |
|
| 23. |
Which GWT widget represents a simple panel that wraps its contents in a scrollable area? |
|
Answer» ScrollPanel widget represents a simple panel that wraps its contents in a scrollable area. |
|
| 24. |
Which GWT widget is the base class for panels that contain only one widget? |
|
Answer» SimplePanel is the base class for panels that contain only one widget. |
|
| 25. |
What is Composite in GWT? |
|
Answer» This widget represents a type of widget that can wrap another widget, hiding the wrapped widget's methods. When added to a panel, a composite behaves exactly as if the widget it wraps had been added. |
|
| 26. |
What is TabPanel in GWT? |
|
Answer» This widget represents a panel that represents a tabbed set of pages, each of which contains another widget. Its child widgets are shown as the user selects the various tabs associated with them. The tabs can contain arbitrary HTML. |
|
| 27. |
What is HTMLPanel in GWT? |
|
Answer» This widget represents a panel that contains HTML, and which can attach child widgets to identified elements within that HTML. |
|
| 28. |
What is DockPanel in GWT? |
|
Answer» This widget represents a panel that lays its child widgets out "docked" at its outer edges, and allows its last widget to take up the remaining space in its center. |
|
| 29. |
What is DeckPanel in GWT? |
|
Answer» DeckPanel is a panel that displays all of its child widgets in a 'deck', where only one can be visible at a time. It is used by TabPanel. |
|
| 30. |
What is Grid in GWT? |
|
Answer» Grid widget represents a rectangular grid that can contain text, html, or a child Widget within its cells. It must be resized explicitly to the desired number of rows and columns. |
|
| 31. |
What is FlexTable in GWT? |
|
Answer» FlexTable widget represents a flexible table that creates cells on demand. It can be jagged (that is, each row can contain a different number of cells) and individual cells can be set to span multiple rows or columns. |
|
| 32. |
What is VerticalSplitPanel in GWT? |
|
Answer» VerticalSplitPanel widget represents a A panel that arranges two widgets in a single vertical column and allows the user to interactively change the proportion of the height dedicated to each of the two widgets. Widgets contained within a VertialSplitPanel will be automatically decorated with scrollbars when necessary. |
|
| 33. |
What is HorizontalSplitPanel in GWT? |
|
Answer» HorizontalSplitPanel widget represents a panel that arranges two widgets in a single horizontal row and allows the user to interactively change the proportion of the width dedicated to each of the two widgets. Widgets contained within a HorizontalSplitPanel will be automatically decorated with scrollbars when necessary. |
|
| 34. |
Which GWT widget represents a panel that lays all of its widgets out in a single vertical column? |
|
Answer» VerticalPanel widget represents a panel that lays all of its widgets out in a single vertical column. |
|
| 35. |
Which GWT widget represents a panel that lays all of its widgets out in a single horizontal column? |
|
Answer» HorizontalPanel widget represents a panel that lays all of its widgets out in a single horizontal column. |
|
| 36. |
Which GWT widget represents a panel that formats its child widgets using the default HTML layout behavior? |
|
Answer» FlowPanel widget represents a panel that formats its child widgets using the default HTML layout behavior. |
|
| 37. |
Which class is the base class of all layout panel classes? |
|
Answer» Panel is the abstract base class for all panels, which are widgets that can contain other widgets. |
|
| 38. |
What are layout panels in GWT? |
|
Answer» Layout Panels can contain other widgets. These panels controls the way widgets to be shown on User Interface. Every Panel widget inherits properties from Panel class which in turn inherits properties from Widget class and which in turn inherits properties from UIObject class. |
|
| 39. |
Which GWT widget represents a browsable view of a tree in which only a single node per level may be open at one time? |
|
Answer» CellBrowser widget represents a browsable view of a tree in which only a single node per level may be open at one time. This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration. |
|
| 40. |
Which GWT widget represents a tabular view that supports paging and columns? |
|
Answer» CellTable widget represents a tabular view that supports paging and columns. |
|
| 41. |
Which GWT widget represents a single column list of cells? |
|
Answer» CellList widget represents a single column list of cells. |
|
| 42. |
Which GWT widget represents a view of a tree? |
|
Answer» CellTree widget represents a view of a tree. This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <!DOCTYPE> declaration. |
|
| 43. |
Which GWT widget represents a standard GWT date picker? |
|
Answer» DatePicker widget represents a standard GWT date picker. |
|
| 44. |
Which GWT widget represents a standard menu bar? |
|
Answer» MenuBar widget represents a standard menu bar widget. A menu bar can contain any number of menu items, each of which can either fire a Command or open a cascaded menu bar. |
|
| 45. |
Which GWT widget represents a standard hierarchical tree? |
|
Answer» Tree widget represents a standard hierarchical tree widget. The tree contains a hierarchy of TreeItems that the user can open, close, and select. |
|
| 46. |
Which widget represents a hidden field in GWT? |
|
Answer» Hidden widget represets a hidden field in an HTML form. |
|
| 47. |
Which widget represents a file upload in GWT? |
|
Answer» FileUpload widget wraps the HTML <input type='file'> element. |
|
| 48. |
Which widget represents a rich text editor in GWT? |
|
Answer» RichTextArea widget represents a rich text editor that allows complex styling and formatting. |
|
| 49. |
Which widget represents a multiline text box in GWT? |
|
Answer» TextArea widget represents a text box that allows multiple lines of text to be entered. |
|
| 50. |
Which widget represents a password text box in GWT? |
|
Answer» PasswordTextBox widget represents a text box that visually masks its input to prevent eavesdropping. |
|