Skip to content
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

Dynamic component #3

Closed
EdwinBetanc0urt opened this issue Dec 18, 2018 · 0 comments
Closed

Dynamic component #3

EdwinBetanc0urt opened this issue Dec 18, 2018 · 0 comments
Assignees

Comments

@EdwinBetanc0urt
Copy link
Collaborator

EdwinBetanc0urt commented Dec 18, 2018

Greetings, it is proposed to implement a dynamic component that calls using lazy load to field components based on ADempiere references. This component will be the one that communicates the fields with the views, taking the main validations as read only, visualization and obligatory and showing the reference of the appropriate field.

By loading the fields and their metadata from the application dictionary. There with the attribute 'displayType' is assigned the attribute 'componentPath'.
https://github.com/adempiere/adempiere-vue/blob/develop/src/utils/ADempiere/index.js#L336
Screenshot_20191118_110841

The path of the component to be displayed is stored in the 'REFERENCES' constant, which returns the path of the component (in the type attribute) according to the type of display (in the attribute alias or id of the reference).
https://github.com/adempiere/adempiere-vue/blob/develop/src/components/ADempiere/Field/references.js#L3
Screenshot_20191118_104923

With the generic label 'component' and the path of the component to import in the attribute 'is', it performs the rendering to visualize the reference of the appropriate field.
https://github.com/adempiere/adempiere-vue/blob/develop/src/components/ADempiere/Field/index.vue#L29
Screenshot_20191118_104820
Screenshot_20191118_104726

For more information: https://vuejs.org/v2/guide/components-dynamic-async.html

As a result it will show the different types of fields associated with the references.
Screenshot_20191118_112046

@EdwinBetanc0urt EdwinBetanc0urt changed the title Add dynamic component Dynamic component Dec 26, 2018
@yamelsenih yamelsenih added the (UILP) UI Lookups Lookups of Fields label Dec 28, 2018
@yamelsenih yamelsenih added this to the ADempiere UI 1.0 milestone Dec 28, 2018
@yamelsenih yamelsenih reopened this Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants