Tag: entity

Attaching methods to VirtualSpace entities

Attaching methods to VirtualSpace entities

You can attach a Java method to react to any changes in a VirtualSpace entity’s instance value, as well as any changes to its state, by specifying a method name for OnVSChange. To listen to focus changes, use OnVSFocus. The method name specified must be present in the class that is attached to the VirtualSpace. You chose the method name, but your custom method must have the respective Java Method Signatures:

The method name editor has a more “…” button that drops down a menu to help you to create a new method, to select an existing method, or to define or fix the method annotation with the correct componentPath.

What does it mean?

What does it mean?

If your web application includes Java code from a previous project or has been partially developed in another IDE, you can paste your Java code and folder structure into iiziGo after creating a new iizi Quickstart project. During deployment for distribution, all directories and libraries are packed into your iiziApp.

Having started with Quickstart, a main Java class is created for you in the src package. This has been named with your iizi project’s name, and contains the minimal iizi Annotations necessary for integrating your Java code into your iiziApp; you can connect your Java project through this class. At present – version 1.0 – only one Java class can serve as the annotated entry point for a VirtualSpace or a UI Panel.

A Java class annotation and three annotated Java methods

All references to iizi elements are made using a reference path name in the following format: “module:/path/name”. Java code is updated and changed using Eclipse refactoring mechanisms whenever required.

Your Java classes can be annotated to a VirtualSpace directly while your Java methods will have annotations to VirtualSpace entities. In the iizi Platform you do not normally add the ‘listeners’ that are common in UI programming; instead, you connect a method to the place requiring the specific functionality.

Data-oriented components

Data-oriented components

Upon creation of components that require data connections, you will be guided to connect the component to an existing VirtualSpace, and to create a vsField, vsTable or vsAction entity for that VirtualSpace.

Name your VirtualSpace entities as you would variables and fields in Java code (for e.g. vsMyAction); a “vs” prefix will help keep your application organized and make VirtualSpace entities easily distinguishable from Java fields and UI Component names.

VirtualSpace connections

VirtualSpace connections

Whether you have started working on your new iiziApp through the UI, data-source or Java code, you have already made some connections to a VirtualSpace. It is recommended that you create the four possible VirtualSpace entities inside of vsGroups; these entities can then be updated and controlled individually or simultaneously by updating the vsGroup. This means that the VirtualSpace is likely to be a representation of the data model at a specific application instance.

To connect the UI components to VirtualSpace entities, the Panel must first be connected to a VirtualSpace. In this way, you will connect UI components that handle data to a VirtualSpace entity. UI components which handle actions, such as buttons, are likely to have a vsAction property.

  • Click the more “…” button in the value field of the VirtualSpace property of the Panel.
Connect a panel to VirtualSpace from the property editor.
  • Select to connect to a VirtualSpace by either creating one or selecting a VirtualSpace.
  • Create a vsField in the VirtualSpace Editor.
Connect a component to a VirtualSpace entity from the property editor.
  • Connect the component to the vsField.
  • Click the more “…” menu in the value field of the vsAction property to create a vsAction or connect to an already existing.
The vsAction property under Actions in a button component’s properties.

The VirtualSpace supports drag and drop of itself and its components using the Link operation. You can create a connection between the drag-dropped elements and the destination; the destination can be a Panel or its components, a Data Connector or its data input or output.

Edit values for VirtualSpace entities

Edit values for VirtualSpace entities

The vsField has a Value editor that better shows all the value settings:

  • Type: the datatype of the value,
  • Null: if the value is Nullable or not (clicking on ‘Null’ hyperlink will set the value to null,
  • Value: entry field to enter the value in a string that can be parsed by the value type in question without pattern, e.g. 0 for a Double, P2DT3H4M for a Duration of 2 days, 3 hours and 4 minutes, 12:45:56 for a LocalTime value,
  • Pattern: the pattern to use for the formatter of the value type, e.g. #,##0.00;(#,##0.00) for a number with 2 decimals displayed as (123.45) when negative, hh’o”clock’ a, zzzz for a date as 12 o’clock PM, Pacific Daylight Time,
  • Use tag processing: use this option to enable the plain string entered as pattern to accept tags to reference a text table for special localized patterns depending on the language used for the client session.
  • Locale: combobox used for testing purposes to see how a value would look like in a specific locale. The tooltip of the Value entry field shows a preview of the value with the pattern in the specified locale; you can also toggle the preview to always be shown.
VirtualSpace Editor and tools

VirtualSpace Editor and tools

The properties shown in the VirtualSpace Editor depend on the selected VirtualSpace entity type – all VirtualSpace entities have the states Enabled, Read-only, Visible and Selected. By default, they are all Enabled and Visible, not Read-only and not Selected. The value of each VirtualSpace entities can be changed depending on the type of data in the editing pane at the bottom right – specialized for each component.

The VirtualSpace Editor
Social media & sharing icons powered by UltimatelySocial

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close