cancel
Showing results for 
Search instead for 
Did you mean: 

Tab order direction and table size

0 Kudos

Hello.

I have a form with a table that should be filled by the user. The default tab order is Left to Right, and I need it to be Right to Left. I tried to set the tab order from the Tab Order tab, and it worked on the first row, but when adding rows their tab order is left to right again. How can I change the default tab order?

And one more thing - How can I get the size of the table (number of rows) with JavaScript?

Regards,

Arik

Accepted Solutions (1)

Accepted Solutions (1)

mona_mehta
Participant
0 Kudos

Hi Arick,

This is a standard functionality provided by Adobe form. You can see 'Tab order' under options, and using the shift key, decide the order in which you want the tab to move.

for the number of row, use the following ( i dont know if theres any standard function, but since its repeated nodes of a subform, you can calculate it in the following way)

I am assuming that the table is called 'Table1' defined under the root node, and has only headerRow defined. No FooterRow is defined

var count = 0;

var nNumRows = form.Table1.nodes.length;

for (var nNodeCount = 0; nNodeCount < nNumRows; nNodeCount ++){

if (Table1.nodes.item(nNodeCount).className == "subform") {

if (Table1.nodes.item(nNodeCount).name != "HeaderRow"){

count++;

}}}

the value of count is the no. of rows in the table

0 Kudos

Thank you for the answer.

I just looked at the standard SAP buttons for adding and removing instances, and I found it:

FormDyn.BodyPage.Table1.Row1.instanceManager.count

This returns the number of rows in the table.

About the Tab Order, is there any way to set the tabbing order at runtime using JavaScript?

Former Member
0 Kudos

Hi Arik,

You can use setFocus method for setting TabOrder dynamically.

xfa.host.setFocus("xfa.form.form1.BodyPage.TestField" );

Hope this helps,

Amit

0 Kudos

Thank you for answering,

but I don''t understand how the setFocus method can set the tab order dynamically.

Can you give me an example?

Former Member
0 Kudos

Hi Arik,

On the Exit event of the field you can define where the next Focus should be set.

Regards,

Amit

0 Kudos

Thanks.

I tried it, but this solution appears to have some problems.

The user can't get the cursor out of the table, and also for some reason the focus 'jumps' 2 cells some times.

Is there a way to do it?

nikhil_bose
Active Contributor
0 Kudos

hi arik,

The tabbing order starts from the object with the smallest vertical coordinate and ends with the object with the largest vertical coordinate, regardless of whether the object is on the body or master page.

Do the following steps:

1) If the form design is not showing the tabbing order, select View > Tab Order.

2) If the tabbing order is currently displayed on the screen, select View > Tab Order to deselect it. Then reselect Tab Order.

3) Click the field you want to be number 1. The tabbing order is modified so that the current field becomes number 1. The remaining fields are renumbered starting with the field that was previously number 1.

4) To continue editing the tabbing order, click the rest of the fields to establish the desired sequence.

nikhiL

0 Kudos

Thank you for your answer.

I know how to set the tab direction at design time. My problem is that I have a dynamic table, and I want the tab order to be right to left between the table's cells.

I tried to set the table's tab order from right to left, the way you suggested, but it worked only on the first row - the other rows were from left to right again. That's why I asked if the tab order can be set at runtime, so I would set it for all the table's rows and columns. Or if there's a way to just set it to be right to left for the entire document.

Apparently there's no way to do it, which is a major problem for documents in Hebrew or Arabic.

Is there a point opening an OSS about this problem? Is there a chance this would be fixed?

nikhil_bose
Active Contributor
0 Kudos

why don't you try using templates available in Hebrew or Arabic which has right to left Tab ordering?

nikhiL

Former Member
0 Kudos

Where can I find such templates?

Answers (0)