Mercurial > libervia-backend
diff frontends/primitivus/xmlui.py @ 157:13888bdb72b6
primitivus: button are now working with XMLUI
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 04 Aug 2010 12:01:07 +0800 |
parents | b1f1955d96b3 |
children | ae50b53ff868 |
line wrap: on
line diff
--- a/frontends/primitivus/xmlui.py Wed Aug 04 12:00:25 2010 +0800 +++ b/frontends/primitivus/xmlui.py Wed Aug 04 12:01:07 2010 +0800 @@ -175,7 +175,17 @@ ##EVENTS## def onButtonPress(self, button): - self.host.debug() + callback_id, fields = button.param_id + data = {"callback_id":callback_id} + for field in fields: + ctrl = self.ctrl_list[field] + if isinstance(ctrl['control'],custom_widgets.List): + data[field] = '\t'.join(ctrl['control'].getSelectedValues()) + else: + data[field] = ctrl['control'].getValue() + + id = self.host.bridge.launchAction("button", data, profile_key = self.host.profile) + self.host.current_action_ids.add(id) def onFormSubmitted(self, button): data = []