Details
-
Type:
Improvement
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.2 Final
-
Fix Version/s: 1.4 Beta
-
Component/s: Containers
-
Labels:None
-
Environment:ICEfaces 3.2
Description
The scanned QR code should be set in the bean after capturing it with <mobi:scan>. As it stands right now, the value is set as the component's submittedValue but isn't set in the bean until we manually trigger a full lifecycle via a commandButton. It would be nice to scan a QR code and have that value immediately rendered to the user. It's not possible to use <mobi:ajax> since it's nested in a parent that does not support ajax behaviors.
I started making all submits go through mobi.AjaxRequest anyways (support for mobi:ajax), so instead of ice.se, used created an options object for mobi:ajax as though it were a mobi:ajax call.
You will need to annotate your component for @ClientBehavior, etc (see CommandButtonMeta), then you can render the "options" object into the js call to be used once the device returns some notice of completion and call the function:-
mobi.AjaxRequest(options);
If the object requires some custom callbacks (eg: onSuccess or onError....), then you can use mobi.extendAjaxRequest(....) and that will clone create a union into one set of options.
Hope that helps.