W dniu 02.07.2012 22:37, Daniel Gonzalez pisze:
On Monday, July 2, 2012 10:25:29 PM UTC+2, peter.bittner wrote: 2012/7/2 Daniel Gonzalez <[email protected] <mailto:[email protected]>>: > I am preparing a form with some data collected from the server. Most fields > have some pre-set values, but they can be changed using a drop-down. > Moreover, the user must also have the option to enter free text for those > fields. For this I need an editable drop-down. Could you give me any hints > on how to implement this in pyjamas? Editable drop-down. With Pyjs this is probably tricky, you'd have to implement this from scratch, I would guess. The ListBox widget doesn't support being editable, http://pyjs.org/examples/Showcase.html <http://pyjs.org/examples/Showcase.html> Are you looking for something like this here? http://ivaynberg.github.com/select2/ <http://ivaynberg.github.com/select2/> PeterExactly Peter. How easy would be to integrate this with pyjs? My experience with jQuery is very limited.What my editable drop-downs must do is: * it must be initialized with an active value. * it must have several available options. Typing should suggest one of those options. * if the user has typed something new, it must be accepted as is. * it should be possible to select one option via the dropdown, replacing the active text. * once the form (containing all my drop-downs) is submitted, it must read the active value in the drop-down and send it via JSONRPCI am currently doing this with a TextBox, and it is not very nice. Having the Select2 component would be great, but I am worried about the complexity of having some extra jQuery code within my pyjs base.
I would suggest doing it with pyjs. You should be able to compose it from PopupPanel, ListBox and TextBox.
-- pozdrawiam Łukasz Mach - [email protected]
