Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

how to get focus in table and verify if the current row not empty

$
0
0

in a table, there are 4 columns, several rows.

The tab cursor navigates from column 1 to 4 of any row, and when it reaches the next row, all fields are empty, then it'll alert error to remind user to fill in this row.

To know whether it's in current or next row, I'm thinking of using getFocus() (as opposite to xfa.host.setFocus(param)). But as for LiveCycle development, that's too simply thinking...

Existing (maybe) solution:

mouseEnter/mouseExit event is triggering a screen jump ONLY when zoomed in? 

Header 1
  1. function resetFocus (obj) { 
  2.   var focussed = xfa.host.getFocus(); 
  3.   if (focussed !== null) { 
  4.   if (focussed.somExpression !== obj.somExpression) { 
  5.   xfa.host.setFocus(null); 
  6.   } 
  7.   } 

I've tried to put debug point on this, var focussed is Null, or am I using it wrong?

 

Get the last focus This sets a global variable to store the current node path, I haven't tried, but I'm still looking for an easier way.

 

Second way:

use flags to flag whether all fields are visited, and whether it has reached the end of this row. If so, alert error?

 

Or do you happen to come with some more elegant workaround, any ideas to verify the value of current row?


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>