A data binding framework for web based user interfaces with Vaadin.
Commonly applications consist of a variety of input elements that closely mirror objects and properties of a domain model. Creating such user interfaces and implementing the synchronization with the domain model is often a repetitive task. linkki automates most of the data binding tasks, enabling developers to focus on the domain- and UI logic.
-
Fast UI development
-
Declarative UI definition (with annotations)
-
UI logic implementation using the presentation model pattern (PMO)
-
Automatic data binding between (P)MO and UI elements
-
Dynamic binding of other UI properties, including
-
Visibility
-
Enabled-state
-
List of available values
-
@UITextArea(position = 10, label = "Description", modelAttribute = "description", required = RequiredType.REQUIRED, rows = 5, columns = 50)
public void description() {
/* Use description from report (model object) directly */
}
@UIComboBox(position = 20, label = "Type", modelAttribute = "type", required = RequiredType.REQUIRED)
public void type() {
/*
* - bind value to the property "type" from report - use enum constants from ReportType as
* available values
*/
}
@UIButton(position = 30, caption = "Send", icon = FontAwesome.SEND, showIcon = true, enabled = EnabledType.DYNAMIC)
public void send() {
report.save();
Notification.show(
String.format("Report with id %d filed!", report.getId()),
"Thank you for reporting!",
Notification.Type.TRAY_NOTIFICATION);
}
/**
* Enable button only if description and type is present.
*
* @return {@code true} if button is enabled otherwise {@code false}
*/
public boolean isSendEnabled() {
String description = report.getDescription();
return description != null && !description.isEmpty()
&& report.getType() != null;
}
}
Note
|
The complete example can be found at Getting Started - 'Error report' tutorial. |
linkki is available from Maven Central and can be included via Maven/Gradle:
<dependency>
<groupId>org.linkki-framework</groupId>
<artifactId>linkki-core</artifactId>
<version>${linkki.version}</version>
</dependency>
To compile linkki, first clone the project from GitHub. The used build tool is Apache Maven.
$> mvn clean install
-
Bug reports, new ideas and improvements can be created in the GitHub issue tracker
-
Collaboration on issues/tasks via pull requests
Documentation for linkki can be found at doc.linkki-framework.org.
Copyright Faktor Zehn AG.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.