- uistate paths are seeded from ui_app_trmap
- if path is not in appstate, then its not updated.
- decorate with @ojr.CfgLoopRunner
- return spath, svalue
The ojr framework will update appstate path spath
with svalue
add reactctx to stubs
oj.Span_("aspan", placeholder="dummy text",
reactctx = [ojr.Ctx("/cfgbase/type", ojr.isstr, ojr.UIOps.UPDATE_TEXT)]
)
checkout ./ofjustpy-react/unit_tests/td.py
modeling state and its transitions
owned by session_manager
owned by ojr.WebPage
defines changes to appstate for uistate changes
defines actions to be taken on appstate changes
defines transformation to ui-elements for changes to appstate changes. Transformations include enable, hide/unhide/ update the text, etc.
event_handler calls this to update uistate at spath with value
this is invoked after following sequence of events:
- user performs actions
- event_handler is fired
- uistate is updated
The update_loop does following
- update appstate (using ui_app_trmap and changes to uistate)
- invoke actions based on appstate changes and app_actions_trmap (this can introduce further appstate)
- update ui-components bases on appstate changes and appctx_uiupdate_map
Annotate an action. Registers the action to be invoked when appstate has changed at path
path.