Hi Lukasz,
I have a jsonrpc function named "getProjectCodes" defined in Pyramid that
returns a python list of strings.
And have classes like this:
from pyjamas.ui.AutoComplete import AutoCompleteTextBox
from pyjamas.JSONService import JSONProxy
from pyjamas.ui import SimplePanel
class myJSONService(JSONProxy):
def __init__(self):
JSONProxy.__init__(self, "/apis/rpc", ["getProjectCodes",])
class myClass:
def _init_(self):
self.panel=SimplePanel()
self.projectcodeInput=AutoCompleteTextBox()
self.panel.add(self.projectcodeInput)
self.myJSONService.getProjectCodes(self)
def onRemoteResponse(self, response, request_info):
if request_info.method == 'getProjectCodes':
self.projectcodeInput.setCompletionItems(response)
Istvan
On Mon, Nov 28, 2011 at 6:20 PM, Lukasz Mach <[email protected]> wrote:
> Hi,
>
> Has anybody seen any example of
> http://pyjs.org/api/pyjamas.ui.AutoComplete.AutoCompleteTextBox-class.html
> usage in jsonrpc/async way?
>
> It would be nice to see how someone used it. I think I know how to use
> it with entries computed on client side, but not when I want to ask
> server for them.
>
> --
> pozdrawiam
>
> Łukasz Mach
> Pagema (http://www.pagema.net)
>