Skip to content

validator demo #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions src/z2ui5_cl_demo_app_203.clas.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
CLASS z2ui5_cl_demo_app_203 DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .

PUBLIC SECTION.

INTERFACES if_serializable_object .
INTERFACES z2ui5_if_app .

DATA check_initialized TYPE abap_bool .
DATA ls_validation_schema TYPE z2ui5_cl_cc_validator=>ty_validation_schema .

Check failure on line 12 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Variable "LS_VALIDATION_SCHEMA" contains unknown: Could not resolve top Z2UI5_CL_CC_VALIDATOR, resolveTypeChain

https://rules.abaplint.org/unknown_types

Check failure on line 12 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Variable "LS_VALIDATION_SCHEMA" contains unknown: Could not resolve top Z2UI5_CL_CC_VALIDATOR, resolveTypeChain

https://rules.abaplint.org/unknown_types

Check failure on line 12 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Variable "LS_VALIDATION_SCHEMA" contains unknown: Could not resolve top Z2UI5_CL_CC_VALIDATOR, resolveTypeChain

https://rules.abaplint.org/unknown_types
DATA mv_email TYPE string .
DATA mv_number TYPE int4 .
PROTECTED SECTION.

DATA client TYPE REF TO z2ui5_if_client.

METHODS display_view.
PRIVATE SECTION.
ENDCLASS.



CLASS Z2UI5_CL_DEMO_APP_203 IMPLEMENTATION.


METHOD display_view.

DATA(view) = z2ui5_cl_xml_view=>factory( ).

view->_generic( ns = `html` name = `script` )->_cc_plain_xml( z2ui5_cl_cc_validator=>get_js( is_validation = ls_validation_schema iv_view = 'MAIN' ) )->get_parent( ).

Check failure on line 32 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax

Check failure on line 32 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax

Check failure on line 32 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax

DATA(page) = view->shell( )->page( showheader = abap_false ).
page->simple_form( title = 'Validator' editable = abap_true
)->content( 'form'
)->label( `email`
)->input( value = client->_bind_edit( mv_email ) width = `15rem` id = `email`
)->label( `number > 0`
)->input( value = client->_bind_edit( mv_number ) width = `15rem` id = `number`
)->button( text = `Submit` press = client->_event( 'CHECK_FORM' )
).


client->view_display( view->stringify( ) ).

ENDMETHOD.


METHOD z2ui5_if_app~main.

me->client = client.

IF check_initialized = abap_false.
check_initialized = abap_true.


ls_validation_schema-properties-number-type = `number`.

Check failure on line 58 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 58 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 58 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax
ls_validation_schema-properties-number-minimum = 1.

Check failure on line 59 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 59 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 59 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax
ls_validation_schema-properties-number-max_length = 999999.

Check failure on line 60 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 60 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 60 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

ls_validation_schema-properties-email-type = `string`.

Check failure on line 62 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 62 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 62 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax
ls_validation_schema-properties-email-format = `email`.

Check failure on line 63 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 63 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 63 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax
ls_validation_schema-properties-email-min_length = 0.

Check failure on line 64 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 64 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax

Check failure on line 64 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Not a structure, type unknown, target

https://rules.abaplint.org/check_syntax


client->view_display( z2ui5_cl_xml_view=>factory(

Check failure on line 67 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax

Check failure on line 67 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax

Check failure on line 67 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax
)->_z2ui5( )->timer( finished = client->_event( `START` ) delayms = `0`
)->_generic( ns = `html` name = `script` )->_cc_plain_xml( z2ui5_cl_cc_validator=>load_ajv( )
)->stringify( ) ).

RETURN.
ENDIF.


CASE client->get( )-event.
WHEN 'START'.
display_view( ).
WHEN 'BACK'.
client->nav_app_leave( ).
WHEN 'CHECK_FORM'.
client->follow_up_action( z2ui5_cl_cc_validator=>validate_fields( ) ).

Check failure on line 82 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax

Check failure on line 82 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax

Check failure on line 82 in src/z2ui5_cl_demo_app_203.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Class z2ui5_cl_cc_validator not found

https://rules.abaplint.org/check_syntax
ENDCASE.
client->view_model_update( ).
ENDMETHOD.
ENDCLASS.
16 changes: 16 additions & 0 deletions src/z2ui5_cl_demo_app_203.clas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>Z2UI5_CL_DEMO_APP_203</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>validator - demo</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>