请参阅:External Object for Android with callback Event
如何发送参数并在GX中收到?
Class.java
mCoordinator.setValue('parametro1', 'valor1'); //Is this possible?
mCoordinator.setValue('parametro2', 'valor2');
mCoordinator.runAction("myEvent", null);
GX
Event UC.myevent
Composite
parametro1 = &sdt.parametro1
EndComposite
EndEvent
由于
答案 0 :(得分:2)
如果您尝试将参数发送到动作事件。您可以在上下文实体中发送它们。
取决于您的上下文,但是,例如,您需要获取实体,设置您的值并发送到上下文中的事件,例如:
Entity contextEntity = myActivity.getMainFragment().getContextEntity();
contextEntity.setProperty(name, value);
mCoordinator.runAction("myEvent", null);
或在参数中明确表示:
Entity contextEntity = myActivity.getMainFragment().getContextEntity();
contextEntity.setProperty(name, value);
myActivity.getController().runAction(myActivity.getUIContext(), actionDefinition, contextEntity);