* bugfix serialization

* update

* add new error message for binding errors

* binding and url fix
This commit is contained in:
oblomov 2023-09-07 08:57:56 +02:00 committed by GitHub
parent eb97edf946
commit 7f5e3ec0d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -179,9 +179,9 @@ CLASS z2ui5_cl_fw_db IMPLEMENTATION.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
IF <deref_attri> IS NOT INITIAL.
* IF <deref_attri> IS NOT INITIAL.
lr_attri->data_rtti = z2ui5_cl_fw_utility=>rtti_xml_get_by_data( <deref_attri> ).
ENDIF.
* ENDIF.
CLEAR <deref_attri>.
CLEAR <attri>.
ENDLOOP.

View File

@ -107,8 +107,6 @@ CLASS z2ui5_cl_fw_model IMPLEMENTATION.
DATA(lr_view_model) = z2ui5_cl_fw_utility_json=>factory( ).
DATA(lo_update) = lr_view_model->add_attribute_object( z2ui5_cl_fw_binding=>cv_model_edit_name ).
* DATA(lt_binds) = VALUE z2ui5_if_client=>ty_t_name_value( ).
LOOP AT mt_attri REFERENCE INTO DATA(lr_attri) WHERE bind_type <> ``.
IF lr_attri->bind_type = z2ui5_cl_fw_binding=>cs_bind_type-one_time.
@ -127,7 +125,7 @@ CLASS z2ui5_cl_fw_model IMPLEMENTATION.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE z2ui5_cx_fw_error
EXPORTING
val = `BINDING_ERROR - No attribute found with name: ` && lr_attri->name.
val = `Error while creating the response, seems that some app data is not available anymore. <p>BINDING_ERROR - No attribute found with name: ` && lr_attri->name && `</p>`.
ENDIF.
CASE lr_attri->type_kind.

View File

@ -166,8 +166,9 @@ CLASS z2ui5_cl_fw_http_handler IMPLEMENTATION.
` let method = sap.z2ui5.oResponse.PARAMS.S_TIMER.EVENT_FINISHED.split( '(' )[ 0 ];` && |\n| &&
` let oArgs = [];` && |\n| &&
` oArgs.push( JSON.parse( (sap.z2ui5.oResponse.PARAMS.S_TIMER.EVENT_FINISHED.split( '(' )[ 1 ].split( ')' )[ 0 ].split( '}' )[ 0 ] + '}').replaceAll( "'" , '"' ) ) );` && |\n| &&
` let oArgsPara = sap.z2ui5.oResponse.PARAMS.S_TIMER.EVENT_FINISHED.split( '(' )[ 1 ].split( ')' )[ 0 ].split( '}' )[ 1 ].split( ',' ).slice(1);` && |\n| &&
` oArgsPara.forEach( ( item, index, arr ) => { arr[index] = item.replace( '"' , '' ); } );;` && |\n| &&
` // let oArgsPara = sap.z2ui5.oResponse.PARAMS.S_TIMER.EVENT_FINISHED.split( '(' )[ 1 ].split( ')' )[ 0 ].split( '}' )[ 1 ].split( ',' ).slice(1);` && |\n| &&
` let oArgsPara = sap.z2ui5.oResponse.PARAMS.S_TIMER.EVENT_FINISHED.split( '(' )[ 1 ].split( ')' )[ 0 ].split( '}' )[ 1 ].split( '"' ).slice(1);` && |\n| &&
` // oArgsPara.forEach( ( item, index, arr ) => { arr[index] = item.replace( '"' , '' ); } );;` && |\n| &&
` oArgs = oArgs.concat( oArgsPara );` && |\n| &&
` if (method == 'onEvent'){ sap.z2ui5.oController.onEvent(...oArgs); }else{ sap.z2ui5.oController.onEventFrontend(...oArgs); }` && |\n| &&
` }` && |\n| &&