Hi, I am retrieving NULL when I call getFormName of JSEvent in onElementFocusGained(event).
This is the scenario:
- I have 4 forms: 1 Main form has a TabPanel with 2 forms in a Tab. All forms extends the Parent Form.
a. Main form (Policy)
b. Tab1 form (Product)
c. Tab2 form (Customers)
d. Parent form has the onElementFocusGained(event) method. - I have 2 Button elements which does the following:
a. Button1 adds a record in Tab1, calls elements[elementName].requestFocus(); to request focus, and switches the TabPanel’s index to Tab1.
b. Button2 does the same thing with Tab2. - The problem occurs when I am in Tab1 and click Button2. The requestFocus() triggers onElementFocusGained(event) of the Parent form and when I check event.getFormName(), it already returns NULL.
How come the form name is NULL at this stage? This does not happen when I click the element manually through the mouse or through keyboard tab.