I am going insane. What in the sweet name of anything that's holy am I doing wrong here?
This is what my logging tells me (sorry for the long paste): [Click] [debug] POST http://10.0.0.100:18080/WebClientV2/editObjects.htm <<snip>> [Click] [trace] request param: Whole lot of my params here <</snip>> [Click] [trace] request param: ascending= [Click] [trace] request param: column= [Click] [trace] request param: form_name=form6_form [Click] [trace] request param: page= [Click] [trace] request param: save=Save [Click] [trace] invoked: EditObjectsPage.<<init>> [Click] [trace] invoked: EditObjectsPage.onSecurityCheck() : true [Click] [trace] invoked: EditObjectsPage.onInit() [Click] [trace] invoked: 'logoffLink' ActionLink.onInit() [Click] [trace] invoked: 'closeModelLink' ActionLink.onInit() [Click] [trace] invoked: 'logoffLink' ActionLink.onProcess() : true [Click] [trace] invoked: 'closeModelLink' ActionLink.onProcess() : true [Click] [trace] invoked: Control listeners : true [Click] [trace] invoked: EditObjectsPage.onPost() [Click] [trace] invoked: EditObjectsPage.onRender() [Click] [trace] invoked: 'logoffLink' ActionLink.onRender() [Click] [trace] invoked: 'closeModelLink' ActionLink.onRender() [Click] [trace] invoked: 'form6' ObjectFormTable.onRender() [Click] [info ] renderTemplate: /editObjects.htm,/templates/base-template.htm - 16 ms [Click] [trace] invoked: 'logoffLink' ActionLink.onDestroy() [Click] [trace] invoked: 'closeModelLink' ActionLink.onDestroy() [Click] [trace] invoked: 'form6' ObjectFormTable.onDestroy() [Click] [trace] invoked: EditObjectsPage.onDestroy() [Click] [info ] handleRequest: /editObjects.htm - 2705 ms The line with "save=Save" tells me that the save button is clicked. I don't see any hint anywhere that it hits the onSave() code, no log-line (which I put there), no breakpoint, nothing. The ActionListener is non-existent. The method ControlRegistry#hasActionEvents even returns false. ControlRegistry#eventListenerList is null. Since my loginform works like a charm and is built the same way EXCEPT for the use of FormTable, I am slowly getting frustrated why this doesnt' work. Here's the line that adds the button to the form in the FormTable: getForm().add( new Submit("save", getMessage("button_submit"), this, "onSave")); "this" actually refers to the FormTable, and it DOES contain the method "boolean onSave(){}" Please shed some light on this, cuz I am going bald soon... Cheers, WarnerJan On Tue, 2009-04-21 at 11:44 +0200, Bob Schellink wrote: > One other thing, if you set the app in trace mode Click will print out > the events as they are processed. > > For example you should see something like: > > [Click] [trace] invoked: 'table' FormTable.onInit() > [Click] [trace] invoked: 'table' FormTable.onProcess() : true > > meaning the FormTable.onInit was called and then its onProcess event > was called. > > kind regards > > bob > > > Bob Schellink wrote: > > Hi WarnerJan, > > > > > > WarnerJan Veldhuis wrote: > >> > >> I am having a fight with the FormTable and theSubmit that is on it. This > >> is the code I am using in my class that extends FormTable: > >> > >> public ObjectFormTable () { > >> <snip> > >> setupColumns();//adding FieldColumns here > >> getForm().add( new Submit("save", getMessage("button_submit"), this, > >> "onSave")); > >> <snip> > >> } > >> > >> I also have the method onSave: > >> public boolean onSave() { > >> <snip> > >> } > > > > > > Is the onSave method declared on the ObjectFormTable or the Page? > > According to your ObjectFormTable declaration the onSave method should > > be declared on the ObjectFormTable itself. If you declare the onSave on > > the Page that would be one reason why your breakpoint isn't hit. > > > > I also assume you use the FormTable internal Form and don't associate it > > with an external Form? > > > > Let us know. > > > > kind regards > > > > bob > >
