load( local!token, local!universities: null, local!pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 8, sort: a!sortInfo( field: "univ_name", ascending: true ) ), with( a!formLayout( label: "University Search Criteria", firstColumnContents: { a!textField( label: "Name", labelPosition: "ABOVE", value: ri!name, saveInto: ri!name, validations: {} ), a!textField( label: "City", labelPosition: "ABOVE", saveInto: {}, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "Country", labelPosition: "ABOVE", saveInto: {}, refreshAfter: "UNFOCUS", validations: {} ), a!buttonLayout( secondaryButtons: { a!buttonWidgetSubmit( label: "Cancel", style: "NORMAL", value: true, saveInto: ri!cancel, skipValidation: true ), a!buttonWidgetSubmit( label: "Apply", style: "NORMAL", value: true, saveInto: {ri!apply, a!save(local!universities, rule!University_getUniversitiesByName(ri!name))} ) } ), a!gridLayout( label: "Universities", headerCells: { a!gridLayoutHeaderCell( label: "" ), a!gridLayoutHeaderCell( label: "Name" ), a!gridLayoutHeaderCell( label: "Country" ), a!gridLayoutHeaderCell( label: "City" ), a!gridLayoutHeaderCell( label: "Remove" ) }, rows: { a!applyComponents( function: rule!University_universityRow( university: local!universities, index: _, token: local!token ), array: if( or( isnull( local!universities ), count( local!universities ) < 1 ), {}, 1 + enumerate( count( local!universities ) ) ), arrayVariable: local!token ) } ) }, secondColumnContents: { /* Add components here for a two-column section */ }, validations: {} ) ))