4.2.10 (Apr 2007)

FocusService Interface
FocusService is a new interface added to the displayservice package (com.nexaweb.client.displayservice). FocusService allows for the control of focus. All of the focus methods are equivalent to setting "focused" to "true" on an XML element.
FocusService is a powerful tool for the developer. For example, to quicken workflow or to increase usability of a large application developers can use FocusService in a way that allows users to quickly navigate an application via keyboard shortcuts. This saves the user time from clicking around an application, and switching back and forth between mouse and keyboard.

FocusService comes with the following five methods.

  1. focusNext() - Focuses on the next component in the application and returns the element representing that component.
  2. focusNext(Element e) - Focuses on the the next component relative to the one corresponding to the element passed in, returns the element representing that component.
  3. focusPrevious() - Focuses on the previous component in the application and returns the element representing that component.
  4. focusPrevious(Element e) - Focuses on the the previous component relative to the one corresponding to the element passed in, returns the element representing that component.
  5. getCurrentFocus() - Returns the element representing the currently focused component.

FocusService Examples:
The first example declaratively uses the focusNext() method. Clicking "Button 1" moves focus from that button to the next component in the Panel, "Button 2."

<nxml>
   <mco:mco xmlns:mco="http://nexaweb.com/mco" id="focusPreviousMCOID" src="focusPreviousMCO"/>
   <rootPane>
    <borderLayout/>
     <panel borderPosition="center">
      <freeLayout/>

       <button onCommand="FocusService.focusNext()" shortcut="Ctrl+1"
 height="25" text="Button 1" width="100" x="80" y="80"/>
       <button height="25" text="Button 2" width="100" x="220" y="80"/>
     </panel>
   </rootPane>
 </nxml>



The second example is the same as the first but adds functionality to "Button 2." When the user clicks on "Button 2" an MCO is used to invoke the focusPrevious() method.

<nxml>
   <mco:mco xmlns:mco="http://nexaweb.com/mco" id="focusPreviousMCOID" src="focusPreviousMCO"/>
   <rootPane>
    <borderLayout/>
     <panel borderPosition="center">
      <freeLayout/>

       <button onCommand="FocusService.focusNext()" shortcut="Ctrl+1"
 height="25" text="Button 1" width="100" x="80" y="80"/>
       <button onCommand="mco://focusPreviousMCOID.onCommand()" shortcut="Ctrl+2" height="25" text="Button 2" width="100" x="220" y="80"/>
     </panel>
   </rootPane>
 </nxml>

Nodal images in Tree and Tree Table
Developers now have the ability to uniquely specify images (icons) for each type of node in a tree and tree table.
A tree can have three different nodes: expanded branch node, collapsed branch node, and leaf node. A branch node is a node that can have child elements, and a leaf node is a node that can not have child elements.
Images are assigned to nodes via the following attributes.

 Node Attribute
 Expanded Branch Node imgOpen
 Collapsed Branch Node imgClosed
 Leaf Node imgLeaf

Iterator tag now supports resolution syntax
It is now possible to use resolution syntax in an Iterator tag. Please see "UI Resolution Syntax" in "Dev Center -> Documentation -> Developers -> Concepts - Advanced" for more information about resolution syntax.
For example, a developer can use resolution syntax to create a select statement in an Iterator tag as the following simple example shows.
<iterator select="{this.a}" a="//row"/>

Defects Resolved

IdDescription
7228712-3879189 Removing shortcut attribute of Element doesn't clean up listener
6390712-3118232 Create Focus Control API (FocusService)
6528712-3344002 Support the ability to set imgLeaf, imgOpen, and imgClosed attributes independently for each row in a tree component
7506712-4068096 DisplayService.modalAlert() is slow
7260Server class file not found: com.nexaweb.server.protocol.util.PushNotificationObject
7512One needs to hit the "Click to continue loading" button when using JRE 1.6
7570712-4183304 Iterator component does not support resolution syntax
7614FocusService class is not in API documentation
7616focusPrevious() gets stuck on textArea and textView
7617FocusService not in client API jar
75144.1.8 applications don't start when client uses Sun 1.6 JVM.