Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Tabbing problem - Searching the hierarchy.

Avatar

Former Community Member

I have a tabbing problem which I suspect is really an inability to find the correct position in the form hierarchy.

I have a subform, a fairly large one, that takes up almost half the page.  It starts on the lower half of the page so that when I press the Add button twice, the two new instances appear on a new page which follows the current page.

I can tab forward through all three instances of the subform fine.  The problem occurs when I try to tab back from the first field of the second instance across a page break to the last field of the first instance.  I can't seem to find the location.

Here's the code which sets the location in the hierarchy (It's the Delete button of the previous subform instance that I'm trying to reach):

var i = .parent.instanceManager.index - 1;

var back=parent[i].Delete.somExpression;

"i" keeps coming back correct but someExpression keeps coming back as null.  Where am I going wrong?

2 Replies

Avatar

Former Community Member

Oops.  This is the corrected code:

var i = parent.instanceManager.index - 1;

var back=parent[i].Delete.somExpression;

Avatar

Former Community Member

Ok, I solved the problem on my own, but I it has led to some questions on how LiveCycle acts.  What was happening was this:  Anytime the user did anything that caused a repainting of the screen, tabbing from page-to-page was disrupted.  The cursor always ended up in a field which was on the master page.  What I ended up doing was putting this code (this.access = "protected") in the layout:ready event of each field on the master page.   When I did that, tabbing worked correctly.

Could somebody explain how the fact that an unprotected field on the master page could interrupt my tabbing sequence?