From: Mark P. <ma...@ph...> - 2010-05-31 14:05:32
|
On Mon, May 31, 2010 at 1:43 AM, Yuri <yu...@al...> wrote: > Il 28/05/2010 16:30, Mark Phillips ha scritto: > > Yuri, > > > > Thanks for your reply. I think I figured it out.... > > > > In the controller script I used > > state.setKwargs(<a dictionary of name value pairs>) > > return state > > > > In the controller page template I used > > tal:define="formdata options/state/getKwargs" > > > > then use "formdata/<a key from the dictionary>" to get at the value > > for that key > > > > Funny, but I never found any documentation about this. I have seen > > lots of examples for sending errors back to a form with > > state.setErrors(<a dictionary of errorName and errorStrings>) > > > > and then in the page template > > tal:define="errors options/state/getErrors" > > > > Is the state object reserved for something else other than sending > > values back to a form? > > Mmm I don't know. Did you read the CMFFormController documentation? > Maybe, deep somewhere, there's the answer :) Please report back if you > find something useful :P > Yes, I read the documentation, and there is nothing that answers this question, or illustrates how to use the state object. Google didn't turn up anything either. But it is working so far. :-) Thanks! Mark > > > > > > Mark > > > > On Thu, May 27, 2010 at 11:41 PM, Yuri <yu...@al... > > <mailto:yu...@al...>> wrote: > > > > Il 28/05/2010 06:02, Mark Phillips ha scritto: > > > I have a controller page template and a controller script. The > > > template has a form with a couple of combo boxes. The form is > > > submitted to the controller script, and the values from the combo > > > boxes are used in a ZSQLMethod to get data from a mysql database. I > > > can get the data from the database, but I can't seem to figure > > out how > > > to get the data back to the page template to display it. > > > > > > use traverseto a template, putting the data in the request, I > > suppose. > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > Plone-Users mailing list > > Plo...@li... > > <mailto:Plo...@li...> > > https://lists.sourceforge.net/lists/listinfo/plone-users > > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Plone-Users mailing list > Plo...@li... > https://lists.sourceforge.net/lists/listinfo/plone-users > |