found the answer.  The AutoCompleteField automatically comes with a
"hidden" value.  When you return your search results, return a tuple
like: (view, hidden):
    @expose(format="json")
    def search(self, searchString):
        vars = self._generateVariables(self.iceProjectID)
        varList = []
        searchString = searchString.lower()
        items = []
        for var in vars.values():
            if searchString in (var.tag+var.description).lower():
                items.append(("%s - %s"%(var.tag,var.description),
var.id))
        return dict(items=items)

Then you can get your results something like the following:
    @expose()
    def addParameter(self, areaID, parameters=None):
        if parameters!=None:
            parameter = parameters['hidden']
            variable = Parameter.get(int(parameter))
         return dict(parameter=variable)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to