BPM, Workflow, and Case

  • 1.  Acessing inputs inside table

    Posted Mon August 23, 2021 09:31 AM
    Good day,

    I would like to know how do i acess input fields inside table? As long as i work within table, for example, i create button with onClick event like this: ${FirstName}.getData()  then it works properly, however, if im trying to acess this input outside table - somewhere in root element, then console says exactly that error : View 'FirstName' from view <root> is not found (if it is not loaded yet, this is not an error)



    ------------------------------
    Vladislav Tishchenko
    ------------------------------


  • 2.  RE: Acessing inputs inside table

    Posted Mon August 23, 2021 11:29 AM
    You would need to include the Table control in the address path. Assuming you are on a coach and you have "Table1" as the control Id, it would be something like ${Table1/FirstName[0]} to address the table's first row firstName control.

    If you have additional questions about control addressing, I would encourage you to take a look at Deliver Modern UI for IBM BPM with the Coach Framework and Other Approaches. Eric Ducos wrote a chapter on the SPARK UI Toolkit, which is now the out of the box BPM UI toolkit. There is an excellent section on addressing, 4.3.2, Control referencing that should help answer anything else you might run into.

    ------------------------------
    Rackley Boren
    ------------------------------



  • 3.  RE: Acessing inputs inside table

    Posted Tue August 24, 2021 05:05 AM
    Thank you for the reply, however while i have tried to do something with forloop in my code: ${Table1/FirstName[i]} it is throwing me error such 

    View 'Table1/FirstName[i]' from view <root> is not found like it is not interpreting i variable at all


    ------------------------------
    Vladislav Tishchenko
    ------------------------------



  • 4.  RE: Acessing inputs inside table

    Posted Tue August 24, 2021 01:58 PM
    Instead of using the shorthand ${Table1/FirstName[i]}.getData(), try using page.ui.get("Table1/FirstName[" + i + "]").getData().

    The issue you observed is because the framework takes everything between the braces as the control-id and does not treat anything inside those braces as a variable value when using the short hand notation.

    ------------------------------
    Rackley Boren
    ------------------------------