• Neil Kolban
    May 21, 2016 at 2:30 pm #1835

    Small stuff, but was reading the bpmext.ui.forEachViewSibling API and it is documented as having one parameter (view) where it appears to have two parameters (view and a callback function).

    See:

    https://support.salientprocess.com/docs/enterprise/bpmext.ui.html

    In addition, the example shows:
    <pre class=”prettyprint”><span class="pln">bpmext</span><span class="pun">.</span><span class="pln">ui</span><span class="pun">.</span><span class="pln">forEachViewSibling</span><span class="pun">(</span><span class="pln">currentView</span><span class="pun">,</span> <span class="kwd">function</span><span class="pun">(</span><span class="pln">v</span><span class="pun">){</span><span class="pln">alert</span><span class="pun">(</span><span class="str">"View: "</span> <span class="pun">+</span><span class="pln"> v</span><span class="pun">.</span><span class="pln">getName</span><span class="pun">())});

    </span>However, there does not appear to be a method called “getName()” defined on a view.

    Rackley Boren
    May 22, 2016 at 9:49 pm #1845

    Hi Neil,

    Based on your observation and a quick check it does  looks like the JSDoc is out of sync there. The example and the method itself both show another input of function. I will let the team know. Thanks!

     

    In regards to the second part around the “getName()” method…To the best of my knowledge… The reason you are not seeing a .getName() method defined on a view is because there is not. We have other private functions being used under the covers in the bpmext JavaScript code. In the example, the v does not represent a view, but another type that we do not publicly have documented as it is part of the underlying bpmext API.

    I will make a suggestion that we update the example to prevent future confusion.

     

    Regards,

    Rackley Boren

    jmac
    May 23, 2016 at 9:55 am #1860

    The doc for this is a bit misleading.  The view must be a repeating view.  The doc will be changed in an upcoming release and will look something like this:

    /**
    * @instance
    * @memberof bpmext.ui
    * @function forEachViewSibling
    * @param {com.ibm.bpm.coach.CoachView} view A reference to an SPARK view/control
    * @param {function} callback function to be executed for each identically named sibling view
    * @desc Convenience iterator function. Calls the callback function for each of the view’s identically named siblings
    * in a repeating view such as a Table, or Horizontal/Vertical layout. Each call to the callback function is
    * passed a reference to the view being iterated over, NOTE that this includes the specified view.
    * @example bpmext.ui.forEachViewSibling(repeatingItemView, function(v){{console.log(bpmext.ui.getViewPath(v) + ” has value ” + v.getData())});
    */

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search