diff --git a/wwwroot/test_pricing_program.dspy b/wwwroot/test_pricing_program.dspy index 5687d70..7802605 100644 --- a/wwwroot/test_pricing_program.dspy +++ b/wwwroot/test_pricing_program.dspy @@ -16,19 +16,14 @@ try: "widgettype": "Text", "options": {"text": json.dumps(x, ensure_ascii=False), "width": "100%"} }) - return { - "status": "ok", - "data": { - "ppid": ppid, - "data": data, - "items": subwidgets - } - } + return json.dumps({ + "widgettype": "VScrollPanel", + "options": {"width": "100%", "height": "100%"}, + "subwidgets": subwidgets + }, ensure_ascii=False) except Exception as e: exception(f'{ppid=}, {data=}, {e}{format_exc()}') - return { - "status": "error", - "data": { - "message": f'{ppid=}, {data=}, {e}' - } - } + return json.dumps({ + "widgettype": "Text", + "options": {"width": "100%", "color": "red", "text": f'{ppid=}, {data=}, {e}'} + }, ensure_ascii=False) diff --git a/wwwroot/test_pricing_program.ui b/wwwroot/test_pricing_program.ui index 8410be2..a1fe98a 100644 --- a/wwwroot/test_pricing_program.ui +++ b/wwwroot/test_pricing_program.ui @@ -41,29 +41,11 @@ { "wid": "input_form", "event": "submit", - "actiontype": "urldata", + "actiontype": "bricks", "target": "result", "options": { "url": "{{entire_url('./test_pricing_program.dspy')}}", "params":{} - }, - "status_of": { - "ok": { - "widgettype": "VScrollPanel", - "options":{ - "width": "100%", - "height": "100%" - }, - "subwidgets": "${items}" - }, - "error": { - "widgettype": "Text", - "options":{ - "width": "100%", - "color": "red", - "text": "${message}" - } - } } } ]