This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 15 - Pages: 2 [ Previous | 1 2 ] - Last Post: 27 Jul 26, 10:28 Last Post By: davidekholm
davidekholm

Posts: 4,028
Registered: 18-Oct-2002
Re: Relative indexing in ja:fileiterator not allowed in this scope
Posted: 27 Jul 26, 10:28   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Back from vacation. I peeked at the source code:
            if (relative) {
                if (!scope.containsKey("imageNum")) {
                    throw new ElementException("Relative indexing in ja:fileiterator not allowed in this scope", element.getContent());
                }
                int current = (Integer)scope.get("imageNum") - 1;
                start += current;
            }

In plain English, what produces this error is if you try a relative iteration without the presence of the "imageNum" variable. That can, for instance happen if you issue a relative iteration in a custom page or in index.htt, outside of a ja:fileiterator element.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums