(community) Grid Store Binder, beanshell

Confluence User - 16 Jun, 2016

I have tried to implement something very similar to Load and Store Form Grid Data (found in Form How-To's). In that example, immediately following the includes, a function is declared:

public FormRowSet getGridRows() {
    return rows ; // this will return the grid rows
}
Following that, the implementation 
public saveGridRows(FormRowSet rows) 
{
...
}
and finally
FormRowSet rows = getGridRows(); // getting the grid rows
saveGridRows(rows); // processing & storing the grid rows
When I implement this, an error in the getGridRows() function occurs because rows is untyped. Efforts to work around this have ended in errors about rows being undefined.
I have also looked at FormUtils for a way to get the grid element, perhaps through FormDao. But the more I look, the worse this approach looks.
I am wondering if anyone has gotten this to work.
Thanks for reading.
forms

4


16 Jun, 2016
confluenceUser
confluenceUser

do u refer to the sample in Bean Shell Programming Guide?

17 Jun, 2016
confluenceUser
confluenceUser

The example that I began with is on this path on the joget website.

Joget V5 Documentation/How-To's/Form How To's/Add a Grid/Load and Store Data using a Bean Shell Form Binder.

In my experience with open source software, I've found that on some occasions, examples are drawn from larger pieces of working code and something is missed. I have wondered if that is the case here because the example includes org.apache.commons.collections.SequencedHashMap and I don't see it used in the code.

17 Jun, 2016
confluenceUser
confluenceUser

the page seem to contributed by community member like us. may be u can post ur full script here. i see what i can help u.

please remember to use the {} in the tool bar to format ur code. (big grin)

18 Jun, 2016
confluenceUser
confluenceUser

Thanks Panda. At the moment I've been experimenting with JDBC binders for subforms. As soon as I get it back in shape, I will post it along with explanations. Essentially, I am trying to create a form with a Date picker and two grids to display/edit information from two different tables. Both grids have 'account' and 'amount' fields where not all amounts are filled in. I've been trying to use an outer join to populate them in both bean shell and JBDC versions. I am going to go back to the Bean Shell versions.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print