Notifications
Announcements
No record found.
private FormGroupControl buildTabPageControl(){ FormGroupControl groupControl; FormTabPageControl tabPageControl; tabPageControl = callerTabControl.addControl(FormControlType::TabPage, 'TestTabPage' + enum2Str(FormControlType::TabPage), callerInsertAfterControl ? callerInsertAfterControl : callerTabControl.controlNum(callerTabControl.controlCount())); tabPageControl.caption('Test''); if (callerTabControl.style() == TabStyle::FastTabs) { tabPageControl.fastTabExpanded(FastTabExpanded::Always); } groupControl = tabPageControl.addControl(FormControlType::Group, 'TestGroup'' + /@SYS80404/); groupControl.arrangeMethod(FormArrangeMethod::HorizontalWrap); return groupControl;}
private FormGroupControl getFormGroupControl() { FormGroupControl groupControl; groupControl = this.buildTabPageControl(); return groupControl; } void updateDesign(boolean _isDynamicControl = false) { Map fieldsAdded; FormGroupControl formGroupControl; formGroupControl = this.getFormGroupControl(); fieldsAdded = this.getAvailableField(); if (_isDynamicControl) { this.addDynamicFieldsControl(formGroupControl, fieldsAdded); } else { this.addFieldsControl(formGroupControl, fieldsAdded); } }
private void addDynamicFieldsControl(FormGroupControl _formGroupControl, Map _fieldsAdded) { MapEnumerator fieldsEnumerator = _fieldsAdded.getEnumerator(); _formGroupControl.columns(_fieldsAdded.elements() ? _fieldsAdded.elements() : 1); while (fieldsEnumerator.moveNext()) { str fieldType = Table::getFieldType(fieldsEnumerator.currentKey()); switch (fieldType) { case enum2Str(FieldType::String): FormStringControl stringControl = _formGroupControl.addControl(FormControlType::String, fieldId2Name(tableNum(Table), fieldsEnumerator.currentKey())); stringControl.label(fieldsEnumerator.currentValue()); stringControl.text(formDataSource.cursor().(fieldsEnumerator.currentKey())); stringControl.lookupButton(Table::exist(fieldsEnumerator.currentValue()) ? FormLookupButton::Always : FormLookupButton::Never); stringControl.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(TestFormHelper, dynamicCtrlLookup), this); stringControl.registerOverrideMethod(methodStr(FormStringControl, modified), methodStr(TestFormHelper, dynamicCtrlModified), this); stringControl.cacheDataMethod(NoYes::Yes); break; case enum2Str(FieldType::Integer): FormIntControl intControl = _formGroupControl.addControl(FormControlType::Integer, fieldId2Name(tableNum(Table), fieldsEnumerator.currentKey())); intControl.label(fieldsEnumerator.currentValue()); intControl.value(formDataSource.cursor().(fieldsEnumerator.currentKey())); break; case enum2Str(FieldType::Real): FormRealControl realControl = _formGroupControl.addControl(FormControlType::Real, fieldId2Name(tableNum(Table), fieldsEnumerator.currentKey())); realControl.label(fieldsEnumerator.currentValue()); realControl.realValue(formDataSource.cursor().(fieldsEnumerator.currentKey())); break; case enum2Str(FieldType::Date): FormDateControl dateControl = _formGroupControl.addControl(FormControlType::Date, fieldId2Name(tableNum(Table), fieldsEnumerator.currentKey())); dateControl.label(fieldsEnumerator.currentValue()); dateControl.dateValue(formDataSource.cursor().(fieldsEnumerator.currentKey())); break; case enum2Str(FieldType::DateTime): FormDateTimeControl dateTimeControl = _formGroupControl.addControl(FormControlType::DateTime, fieldId2Name(tableNum(Table), fieldsEnumerator.currentKey())); dateTimeControl.label(fieldsEnumerator.currentValue()); dateTimeControl.dateTimeValue(formDataSource.cursor().(fieldsEnumerator.currentKey())); break; case enum2Str(FieldType::Checkbox): FormComboBoxControl comboBoxControl = _formGroupControl.addControl(FormControlType::ComboBox, fieldId2Name(tableNum(Table), fieldsEnumerator.currentKey())); comboBoxControl.label(fieldsEnumerator.currentValue()); comboBoxControl.enumType(enumNum(TestEnum)); comboBoxControl.selection(formDataSource.cursor().(fieldsEnumerator.currentKey())); break; default: //do nothing break; } } }
private FormGroupControl buildTabPageControl() { FormGroupControl groupControl; FormTabPageControl tabPageControl; tabPageControl = callerTabControl.addControl(FormControlType::TabPage, 'Test' + enum2Str(FormControlType::TabPage), callerInsertAfterControl ? callerInsertAfterControl : callerTabControl.controlNum(callerTabControl.controlCount())); tabPageControl.caption("TestTabPage"); groupControl = tabPageControl.addControl(FormControlType::Group, 'Test' + "@SYS80404"); groupControl.arrangeMethod(FormArrangeMethod::HorizontalWrap); return groupControl; }
private FormGroupControl buildTabPageControl() { FormGroupControl groupControl; FormTabPageControl tabPageControl; tabPageControl = callerTabControl.addControl(FormControlType::TabPage, 'Test' + enum2Str(FormControlType::TabPage), callerInsertAfterControl ? callerInsertAfterControl : callerTabControl.controlNum(callerTabControl.controlCount())); tabPageControl.caption("Test TabPage"); if (callerTabControl.style() == TabStyle::FastTabs) { tabPageControl.fastTabExpanded(FastTabExpanded::Always); } groupControl = tabPageControl.addControl(FormControlType::Group, 'Test' + "@SYS80404"); groupControl.arrangeMethod(FormArrangeMethod::HorizontalWrap); return groupControl; }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 559 Most Valuable Professional
André Arnaud de Cal... 464 Super User 2025 Season 2
Sohaib Cheema 250 User Group Leader