Hi Ian,
> It might be better to use > Webware actions instead of another action system, but I don't know if > there's any conflict there. There isn't any conflict with webware actions and the fecomponent actions, fecomponent actions look like this: def someaction(self, fields): pass I don't know if I can merge it with the webware actions and still be a plug-in component. > Is there a default action? For instance, when the user hits Enter > without hitting a button, no submit button will be triggered. Is the > first action listed in actionList the default? Sorry, I doesn't documented it yet, I will do it tomorrow, the actions should use like this: class MyServlet(SitePage): actionList = ['ok', 'cancel'] def onOkClicked(self, fields): pass def onCancelClicked(self, fields): pass and the html code should have: <form> <input type="submit" name="action.ok" value="Ok"> <input type="submit" name="action.cancel" value="Cancel"> </form> I didn't do a way to specify the method name, maybe it is a TODO :), If you don't want to specify the actions, you can use: <form> <input type="submit" value="Ok"> </form> def processFormData(self, fields): pass # this is the default action handler > It looks like processForm() calls on*Click. So the flow typically goes: > > def writeHTML(self): > self.processForm() --> calls on*Click if form is submitted and valid > do stuff to write the form > > then in sleepEvent parseDocument loads the page that was written and > rewrites the form with htmlfill. You doesn't need to use self.processForm (unless a special case), the processForm is called automatically in the sleepEvent by the parseDocument. the special case is if you want to output some data from the on*Clicked, this way you may call processForm when you want your method called (like in FunFormKit). I send a example to the list with a site I doing, the "Contato" page (to Contact) made use of FEComponent... > But anyway, it looks pretty easy to use, and I like parseDocument is > very output-neutral. Yes, I use it with zptkit, but you can use another component compatible template system or you can write direct from scratch, I use a variant of fecomponent with cheetah, but it is a servlet while there isn't a way to use components with cheetah. > I can't remember if I ever set you up with svn access for > FormEncode? This could also go in svn.w4py.org. Where do you prefer? Sorry about anything I done wrong, the fecomponent make use of validator package, I didn't have time to update it, I will update it tomorrow... regards, -- Michel Thadeu Sabchuk Curitiba - Brasil ------------------------------------------------------- SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate online with coworkers and clients while avoiding the high cost of travel and communications. There is no equipment to buy and you can meet as often as you want. Try it free.http://ads.osdn.com/?ad_idt02&alloc_id135&op=click _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss