AbstractPageField for creating sub-forms [message #1852406] |
Sat, 14 May 2022 14:05 |
J D Messages: 110 Registered: February 2021 |
Senior Member |
|
|
Hi there,
I have a user requirement that demands the creation of a sub-form (a form embedded in another form). On the database level, the link between the two forms is the employee ID.
I've tried to put the sub-form in a GroupBox with an AbstractPageField. I have used the AbstractPageField before elsewhere to display master tables and their detail forms. I figured that I could use it for this particular use case also by hiding the table and displaying only the form. But I have thus far being unsuccessful.
This is what I did:
This code is part of a group box on my EmployeeForm.java
/*
* the embedded Exit form
*/
@Order(500)
public class EmployeeExitPage extends AbstractPageField<ExitNodePage> {
@Override
protected void execInitField() {
setPage(new ExitNodePage());
((ExitForm) getPage().getDetailForm()).getExitFormBox().initializeExitForm();
}
}
This is the ExitNodePage.java class
public class ExitNodePage extends AbstractPageWithNodes {
/*
* No table is used on this page
*/
// @Override
// protected void execInitPage() {
// setTableVisible(false);
// }
// @Override
// protected boolean getConfiguredTableVisible() {
// return false;
// }
/*
* the embedded Exit form
*/
@Override
protected Class<? extends IForm> getConfiguredDetailForm() {
return ExitForm.class;
}
}
As is, the best I can get is an empty table with the ExitForm below it. If I try to setTableVisible(false) OR return false from getConfiguredTableVisible() in ExitNodePage.java, the Employee form does not display at al.
Is there anyway I can get around this problem? Or is there any other way this can be achieved?
Cheers,
JD
[Updated on: Sat, 14 May 2022 14:35] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03855 seconds