So I found this jQuery solution:
currentIndex = $(this).parent().prevAll().length;
But I need to call that from within a JS function.
I'm pretty sure I can't use <rich:jQuery> tag to solve this.
So when I do this:
I get this JS error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)
Timestamp: Fri, 5 Feb 2010 22:42:59 UTC
Message: 'style' is null or not an object
I am using this solution so I can skip certain non-input elements (<span>, <div>) when user tabs into them. Once I know the current element's
position, I will find the next inputtable elelement's position and set the focus there. We are basically avoiding the setting of focus
on rich:togglePanel components as the user tabs thru the input fields in the form.
Looks like conflict between jQuery 1.4.1 & Prototype.js used in modal panel component. Try loading jQuery that comes with RichFaces and check with it.