Hello Bob. I resolved this calling the populate method in the oninit, thank you very much for the help. It was better to use the FormTable in this case, it's note a master/detail, it's just a confirmation grid where the user can change some values before persist to database.
About the Master/detail pattern, do you have any example page who implements that ? Thanks again 2008/12/19 Bob Schellink <[email protected]> > Hi Marcelo, > > From the FormTable javadoc: > > "When using the FormTable control its rowList property must be populated > before the control > is processed so that any submitted data values can be applied to the > rowList objects." > > Thus in order for the FormTable to process the Field values and apply it to > the Table rows, the rows must be available during the onProcess phase. > The only way is to populate the FormTable during the onInit phase. > > There are ways around it for example you could manually invoke > FormTable#onProcess() in the listener after you set the FormTable rows. > > Why do you need to populate the FormTable from the listener? Are there > certain conditions you need to check? > > If there is you could check for the conditions in the onInit method: > > public void onInit() { > //manually process the button to see if it was clicked > myButton.onProcess() > > if(myButton.isClicked()) { > // specify conditions > // populate FormTable > } > } > > Alternatively instead of using the bulk edit FormTable pattern instead look > at using a Master/Detail pattern? > > > kind regards > > bob > > > > On Fri, Dec 19, 2008 at 12:38 PM, Marcelo Grassi Franco Melgaço < > [email protected]> wrote: > >> Hi, i resolved the problem. >> Now i have another. >> The Formtable.getRowList() is empty in my submit method. >> The formtable is populated when the user click on a button. >> I saw in the examples that the formtable must be populated in the onInit >> method. >> How can i can populate the formtable when the user click on a button? >> >> Thanks >> >> >> 2008/12/19 Marcelo Grassi Franco Melgaço <[email protected]> >> >> Hello, >>> i have a page with a FormTable. >>> The problem is that the submit button doesn't call the method in my page. >>> Here is the declaration of the submit on the constructor of the page: >>> >>> this.tableEvolucao.getForm().add(new Submit("gravar", "Gravar", this, >>> "onGravarClick")); >>> >>> when i click on the button the page reloads, but the method onGravarClick >>> is not called. >>> Anyone know what can be the problem? >>> I'm using click-1.5 >>> >>> Thanks >>> >> >> >> >> -- >> Marcelo Grassi >> www.rumotecnologia.com.br >> (31) 9307-1268 >> > > > > -- > http://incubator.apache.org/click/ > -- Marcelo Grassi www.rumotecnologia.com.br (31) 9307-1268
