Git Product home page Git Product logo

samples-java-cuba-sample-drag-drop's Introduction

Drag & Drop

This project demonstrates the following concepts of the CUBA platform:

  • Extending functionality of screens defined in the platform.
  • Using screen companions.
  • Adding drag-n-drop functionality to standard CUBA UI components.

Objective

A user should be able to move users between groups in the Access Groups screen using drag-n-drop.

Solution

  • Open the project in CUBA Studio, execute Run > Create database, then Run > Start application server and open the application at http://localhost:8080/app.

  • Open the Administration > Access Groups screen.

  • You can drag a user from the table and drop it to a group to move it to this group.

Implementation Details

  • The com/company/dd/gui/group/group-browse-ext.xml screen in the GUI module extends the group-browse.xml screen of the platform. The screen is registered in the screens.xml with the same identifier as the base screen (sec$Group.browse), so it will replace the base screen in the application.

  • The group-browse-ext.xml screen descriptor defines a companion class for the web client: com.company.dd.web.group.GroupBrowseCompanion.

  • The GroupBrowseExt screen controller defines the interface for the companion and delegates initialization of the drag-n-drop functionality to the companion implementation.

  • The GroupBrowseCompanion.initDragAndDrop() method obtains Vaadin components from CUBA table and tree and initializes their drag-n-drop parameters.

Based on CUBA Platform 6.3.5

samples-java-cuba-sample-drag-drop's People

Contributors

natfirst avatar knstvk avatar comru avatar

Watchers

James Cloos avatar PKCodeBox avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.