hi guys i'm try to add a form in an AbstractView
this is a snippet of code from my abstract view
the table is correct rendered but the form is not visible. TableForm is thisCode:protected JComponent createControl() { JPanel view = new JPanel(new BorderLayout()); //crate table myTable = new MyTable(); JComponent table = myTable.getControl(); //create scroll bal per tabella JScrollPane sp = getComponentFactory().createScrollPane(table); //create a form TableForm tableForm = new TableForm(new Persona()); view.add(tableForm.getControl(), BorderLayout.CENTER); view.add(sp, BorderLayout.CENTER);
i'm try to develop a classic form with table results.Code:public class TableForm extends AbstractForm{ public TableForm(Persona persona){ super(FormModelHelper.createFormModel(persona, "personaForm")); } @Override protected JComponent createFormControl() { TableFormBuilder builder = new TableFormBuilder(getBindingFactory()); builder.add("firstName"); builder.row(); builder.add("lastName"); builder.row(); builder.add("address.street"); builder.row(); builder.add("address.city"); builder.row(); builder.add("address.state"); builder.row(); builder.add("address.zip"); JPanel panel = (JPanel) builder.getForm(); panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); return panel; } }
I mean in the top of the page input fields with button
and in the bottom page tables result
thanks for any help


Reply With Quote
.

