View update (#648)

* view-update

* update view

* update
This commit is contained in:
oblomov 2023-11-16 18:20:41 +01:00 committed by GitHub
parent b0bb5e9a9f
commit 2ac649393c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 120 additions and 18 deletions

View File

@ -41,7 +41,7 @@ ENDCLASS.
CLASS z2ui5_cl_fw_app IMPLEMENTATION.
CLASS Z2UI5_CL_FW_APP IMPLEMENTATION.
METHOD factory_error.
@ -72,12 +72,12 @@ CLASS z2ui5_cl_fw_app IMPLEMENTATION.
lx_error = lx_error->previous.
ENDWHILE.
DATA(view) = z2ui5_cl_xml_view=>factory( client )->shell( )->illustrated_message(
DATA(view) = client->factory_view( )->_ns_m( )->shell( )->illustratedmessage(
enableformattedtext = abap_true
illustrationtype = `sapIllus-ErrorScreen`
title = `500 Internal Server Error`
description = lv_text
)->additional_content(
)->additionalcontent(
)->button(
text = `Home`
type = `Emphasized`
@ -86,26 +86,25 @@ CLASS z2ui5_cl_fw_app IMPLEMENTATION.
text = `Restart`
press = client->_event_client( val = client->cs_event-location_reload t_arg = VALUE #( ( lv_url_app ) ) ) ).
client->view_display( view->stringify( ) ).
client->view_display( view->_stringify( ) ).
ENDMETHOD.
METHOD view_display_start.
* DATA(lv_url) = z2ui5_cl_xml_view=>factory( client )->hlp_get_app_url( ms_home-classname ).
DATA(lv_url) = z2ui5_cl_fw_utility=>app_get_url(
client = client
classname = ms_home-classname
).
DATA(page) = z2ui5_cl_xml_view=>factory( client )->shell(
DATA(page) = client->factory_view( )->_ns_m( )->shell(
)->page( shownavbutton = abap_false ).
page->header_content(
page->headercontent(
)->title( `abap2UI5 - Developing UI5 Apps in Pure ABAP`
)->toolbar_spacer(
)->toolbarspacer(
)->link( text = `SCN`
target = `_blank`
href = `https://blogs.sap.com/tag/abap2ui5/`
@ -116,12 +115,12 @@ CLASS z2ui5_cl_fw_app IMPLEMENTATION.
target = `_blank`
href = `https://github.com/abap2ui5/abap2ui5` ).
DATA(grid) = page->grid( `XL7 L7 M12 S12`
)->content( `layout` ).
DATA(content) = grid->simple_form( title = `Quickstart`
DATA(grid) = page->_ns_ui( )->grid( `XL7 L7 M12 S12`
)->content( `sap.ui.layout` ).
DATA(content) = grid->simpleform( title = `Quickstart`
layout = `ResponsiveGridLayout`
editable = `true`
)->content( `form` ).
)->content( )->_ns_m( ).
content->label( `Step 1`
)->text( `Create a new class in your abap system`
@ -153,29 +152,29 @@ CLASS z2ui5_cl_fw_app IMPLEMENTATION.
href = lv_url
enabled = z2ui5_cl_fw_utility=>boolean_abap_2_json( xsdbool( ms_home-class_editable = abap_false ) ) ).
DATA(form) = grid->simple_form( title = `Samples`
DATA(form) = grid->simpleform( title = `Samples`
editable = abap_true
layout = `ResponsiveGridLayout` ).
IF mv_check_demo = abap_false.
form->message_strip( text = `Oops! You need to install abap2UI5 demos before continuing...`
form->_ns_m( )->messagestrip( text = `Oops! You need to install abap2UI5 demos before continuing...`
type = `Warning`
)->get( )->_generic( `link` )->link( text = `(HERE)`
)->_go_new( )->_add( `link` )->_ns_m( )->link( text = `(HERE)`
target = `_blank`
href = `https://github.com/abap2UI5/abap2UI5-samples` ).
ENDIF.
DATA(cont) = form->content( `form` ).
DATA(cont) = form->content( )->_ns_m( ).
cont->label( ).
cont->button(
text = `Continue...`
press = client->_event( val = `DEMOS` check_view_destroy = abap_true )
enabled = xsdbool( mv_check_demo = abap_true ) )->get( ).
enabled = xsdbool( mv_check_demo = abap_true ) )->_go_new( ).
cont->button( visible = abap_false )->link( text = `More on GitHub...`
target = `_blank`
href = `https://github.com/abap2UI5/abap2UI5-documentation/blob/main/docs/links.md` ).
client->view_display( form->stringify( ) ).
client->view_display( form->_stringify( ) ).
ENDMETHOD.

View File

@ -0,0 +1,34 @@
CLASS z2ui5_cl_ui5_html DEFINITION
PUBLIC
FINAL
CREATE PUBLIC INHERITING FROM z2ui5_cl_ui5.
PUBLIC SECTION.
METHODS script
IMPORTING src TYPE clike OPTIONAL
RETURNING VALUE(result) TYPE REF TO z2ui5_cl_ui5_html.
METHODS style
RETURNING VALUE(result) TYPE REF TO z2ui5_cl_ui5_html.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS z2ui5_cl_ui5_html IMPLEMENTATION.
METHOD script.
result = me.
_add( n = `script`
ns = `http://www.w3.org/1999/xhtml`
t_p = VALUE #( ( n = `src` v = src ) ) ).
ENDMETHOD.
METHOD style.
result = me.
_add( n = `style`
ns = `http://www.w3.org/1999/xhtml` ).
ENDMETHOD.
ENDCLASS.

View File

@ -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_UI5_HTML</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>ns - html</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>

View File

@ -138,6 +138,28 @@ CLASS z2ui5_cl_ui5_m DEFINITION
METHODS headercontent
RETURNING VALUE(result) TYPE REF TO z2ui5_cl_ui5_m.
METHODS illustratedmessage
IMPORTING
!enableverticalresponsiveness TYPE clike OPTIONAL
!enableformattedtext TYPE clike OPTIONAL
!illustrationtype TYPE clike OPTIONAL
!title TYPE clike OPTIONAL
!description TYPE clike OPTIONAL
!illustrationsize TYPE clike OPTIONAL
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_ui5_m.
METHODS messagestrip
IMPORTING
!text TYPE clike OPTIONAL
!type TYPE clike OPTIONAL
!showicon TYPE clike OPTIONAL
!class TYPE clike OPTIONAL
PREFERRED PARAMETER text
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_ui5_m.
METHODS text
IMPORTING text TYPE clike OPTIONAL
class TYPE clike OPTIONAL
@ -209,6 +231,10 @@ CLASS z2ui5_cl_ui5_m DEFINITION
defaultaction TYPE clike OPTIONAL
RETURNING VALUE(result) TYPE REF TO z2ui5_cl_ui5_m.
METHODS additionalcontent
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_ui5_m.
PROTECTED SECTION.
PRIVATE SECTION.
@ -216,6 +242,24 @@ ENDCLASS.
CLASS z2ui5_cl_ui5_m IMPLEMENTATION.
METHOD additionalcontent.
result = _add( ns = `sap.m` n = `additionalContent` )->_ns_m( ).
ENDMETHOD.
METHOD illustratedmessage.
result = _add( ns = `sap.m`
n = `IllustratedMessage`
t_p = VALUE #( ( n = `enableVerticalResponsiveness` v = enableverticalresponsiveness )
( n = `illustrationType` v = illustrationtype )
( n = `enableFormattedText` v = z2ui5_cl_fw_utility=>boolean_abap_2_json( enableformattedtext ) )
( n = `illustrationSize` v = illustrationsize )
( n = `description` v = description )
( n = `title` v = title )
) )->_ns_m( ).
ENDMETHOD.
METHOD toolbarspacer.
result = me.
_add( n = `ToolbarSpacer`
@ -293,6 +337,15 @@ CLASS z2ui5_cl_ui5_m IMPLEMENTATION.
( n = `visible` v = visible ) ) )->_ns_m( ).
ENDMETHOD.
METHOD messagestrip.
result = me.
_add( n = `MessageStrip`
t_p = VALUE #( ( n = `text` v = text )
( n = `type` v = type )
( n = `showIcon` v = z2ui5_cl_fw_utility=>boolean_abap_2_json( showicon ) )
( n = `class` v = class ) ) ).
ENDMETHOD.
METHOD text.
result = me.
_add( n = `Text`