jmix-framework / jmix-docs Goto Github PK
View Code? Open in Web Editor NEWDocumentation for Jmix framework
Home Page: https://www.jmix.io
License: Creative Commons Attribution 4.0 International
Documentation for Jmix framework
Home Page: https://www.jmix.io
License: Creative Commons Attribution 4.0 International
Replace Groovy-string expressions with Java, e.g. in the description of SuggestionField.
See jmix-projects/jmix-ui#20
Copied from cuba-platform/cuba#2947
We get feedback from some users that they don't understand what event they should listen to if they want to perform some screen initialization based on loaded data (collection containers, or edited entity graph in entity editor).
e.g.
https://www.cuba-platform.com/discuss/t/for-looping-through-child-entity-to-set-edit-ability-of-screen-components/8237/2
or
https://www.cuba-platform.com/discuss/t/geteditedentity-in-edit-screen/12785In topics above users tried to use InitEvent.
But for most users the most "safe" event to use when you need a fully initialized screen - is "BeforeShow" (until you read the JavaDocs).Because "BeforeShow" intuitively feels like "after all initialization is fully completed, right before showing the screen in the UI (attaching it to the main layout)".
Unfortunately BeforeShow event doesn't work this way. It is fired somewhere in the middle of the screen initialization process:Event sent right before the screen is shown, i.e. it is not added to the application UI yet. ... Saved component settings are not yet applied to UI components. Data is not loaded yet for screens annotated with @LoadDataBeforeShow.
Contradictory description, isn't it? How it can be "right before" while settings weren't applied yet, and data wasn't loaded yet?
The proper event at the moment is the AfterShowEvent. However for some users it may feel intuitively wrong, because they tend to think that "UI is going to blink if I change something after the screen is shown". It is a false concern, but people have this feeling.
Seems that we need to update the Screen.BeforeShowEvent
and Screen.AfterShowEvent
description so that users will understand what event to use in what case.
Part of the documentation: quick start
Existing page: https://docs.jmix.io/jmix/0.x/quick-start/index.html
§Creating Calculated Attribute
Code:
@InstanceName
@DependsOnProperties({"firstName", "lastName", "username"})
public String getDisplayName() {
return String.format("%s %s [%s]", (firstName != null ? firstName : ""),
(lastName != null ? lastName : ""), username);
}
AR: different names of function
ER: function should have one name in text and in example
package com.company.jmixpr.entity;
@JmixEntity
@Table(name = "JMIXPR_SPEAKER")
@Entity(name = "jmixpr_Speaker")
public class Speaker {
@JmixGeneratedValue
@Column(name = "ID", nullable = false)
@Id
private UUID id;
@Column(name = "FIRST_NAME", nullable = false)
@NotNull
private String firstName;
@Column(name = "LAST_NAME")
private String lastName;
@Email
@Column(name = "EMAIL", nullable = false, length = 1024)
@NotNull
private String email;
}
AR: non-existing field in function
ER: function should use only existing fields
https://docs.jmix.io/jmix/0.x/deployment/index.html
Wait until AWS Amazon account will be created
Part of the documentation: quick start
Existing page: https://docs.jmix.io/jmix/0.x/quick-start/index.html
§Creating Data Model
AR: length of field is 1024
ER: length of field should be equal or less than 256 symbols
We need to add a code on all the pages of documentation for statistics collection. The code is the following:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MH3DTWV');</script>
<!-- End Google Tag Manager -->
See cuba-platform/cuba#2114
This functionality was ported to jmix
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.