User Guide
  • Introduction
  • Overview
    • About 4WS.Platform
      • Architecture
      • Enterprise Edition
      • Tech specs and requirements
      • Warp SDK
    • Creating a web application
  • Core features
    • Tables
    • SqlTool
    • Definition of Data models and Relations
      • Relations
      • Reverse Engineering
      • Custom Fields
    • Defining business components
      • What are business components
      • Business components to fill-in panels
      • Creating business components
        • By a datastore entity
        • By a MongoDB collection
      • Defining Custom Java Business component
    • Defining the UI
      • App Designer
        • App Designer Menu
        • Definition of additional data sources
        • Panel containers and layouts
          • Tab panel
          • Alternative panel
          • Accordion panel
          • Vertical orientation panel
          • Horizontal orientation panel
          • Columns panel
          • Table panel
          • Generic panel
          • Responsive panel
        • Window content
          • Grid Panel
          • Form Panel
          • Filter Panel
          • Tree Panel
          • Google Map Panel
          • Preview Panel (old Image panel)
          • Tree + Grid Panel
          • Image Gallery
        • Windows list
        • Panel definition
          • Columns properties
          • Controls properties
          • Filter properties
          • Supported components
        • Variables
        • Code selectors
          • When not to use a dynamic combo-box
        • Smart Filter and Advanced Filter
        • Multi Value Combobox Filter
        • Multi Value Tree Filter
        • Buttons
        • Translations
          • Translations about GUI components and internationalization settings
          • Data coming from database
          • Custom code and translations
        • Application Menu
        • Bulk import binded to a grid
        • Range Date Filter
      • Web Interpreter
        • Grid components
        • Detail forms
        • Other components
        • Other features
          • Chat
        • Global variables
          • Client-side global variables
          • Server global variables
        • Forgot Password
    • Working with users and roles
      • Rule for roles
      • Permissions Administrator
    • Wizard
      • How to add a checkbox grid to select one or more rows
      • How to load a second grid when clicking on a row from the first grid
      • How to load a form when clicking on a row of the grid
      • How to open a window when double clicking on a row of the grid
      • How to open a window with right click on the popup menu
      • How to open a window when pressing a button on the grid toolbar
      • How to load a grid after loading a form
      • How to open a window when pressing a button on the form toolbar
      • How to load a grid when clicking on a tree node
      • How to load a form when clicking on a tree node
    • Defining events
      • Panel events
      • Column events
      • Control events
      • Filter events
      • Timer events
      • Start-End event
    • Server-side Javascript & Web Service
      • Server-side Javascript
      • Grid component filled by a server-side JS
      • Detail component filled by a server-side JS
      • How to define a server-side JavaScript action
      • Web service
  • Setting up the environment
    • How to install
    • Application parameters
    • Global parameters
  • Modules
    • Reports & Charts
      • Jasper Report + iReport
      • Online report
      • Docx templating
      • Charts
      • Pivot Grid
      • Multidimensional pivot grid
      • Data Export from SQL query
    • SSO
      • Identity management in Platform
        • Identity management on the internal Platform database
        • Identity management based on Google SSO
      • LDAP
        • LDAP support
        • Identity management based on LDAP and database
        • Identity management based on an embedded LDAP server used by Alfresco and or Activiti
        • Identity management based on a remote LDAP server to connect to Platform on the cloud
        • Connecting an LDAP server to Activiti BPM
        • Connecting an LDAP server to Alfresco ECM
      • Google SSO
        • Google SSO
        • Google OAuth2
        • Identity management based on Google SSO
      • Custom SSO
      • Firebase
    • Mobile
      • Mobile introduction
      • Offline vs Online
        • Server side features
        • Server side functionalities
        • Server side Platform features
        • Mobile app features
      • Mobile side specifics
        • Customizations
          • Custom theme editor
        • App Menu
        • Window content
          • Detail scrollable form
          • Scrollable paginated grid
          • Constraint layout
          • Constraint panel
          • Collection grid view
          • Preview panel (mobile)
        • Form Controls
      • Reference guide
      • Cleaning up data
      • How to
      • App deployment
        • App deployment for the iOS platform
        • App deployment for the Android platform
      • Style properties
      • Appendix : Synchronization flow
      • Translations
    • GSuite
      • Introduction
      • Client-side integration
      • GMail
      • Calendar
      • Drive
      • Contacts
    • Google Cloud Platform
      • Datastore
        • Google Datastore Introduction
        • How to create Datastore entities
      • Google Cloud Storage
    • Scheduler
      • Scheduler Introduction
      • Process settings
        • How to define a sequence of consecutive processes
        • How to define a Custom Java Business component
        • How to define a Grid Data Import
        • How to define a server-side Javascript action
      • Email notifications
      • Process executions
      • Manually start a scheduled process
      • Process input parameters
    • Queue Manager
    • Log & Analysis
      • Application Log
      • Log statistics
      • App analyzer
      • Table log
      • Threads
      • Sessions and heap memory
      • Heap memory analysis
      • Access Log
      • Datastore statistics
      • Total monthly costs with Google Datastore
      • Service Monitoring
        • Introduction
        • Defining a service to monitor
        • Notifications setup
        • Events automatically managed by Platform
        • Remote Platform servers
        • Knowledge base
        • Adding log programatically
        • Searching for logged data
        • Use cases
    • File Management
    • Export and Import of Metadata
      • Application Metadata Management
    • Trigger writing operations
    • Audit
    • BPM
      • BPMN Introduction
      • BPMN main parts
      • Activiti Setup
      • Platform integration
        • Processes
        • Models
        • Process instances
        • To-do list
        • Process history
      • Process Web Modeler
        • Model Creation
          • Start-End Event
          • Gateways
        • Supported objects
        • Start tasks and user tasks
        • Form properties
          • Important notes
          • Property types
        • Service tasks
          • Web service
          • SQL Query
          • SQL statement
        • Mail task
        • Script task
          • Example : how to get a value previously read from a SQL query
          • Example : how to get the current process instance id
        • Timer events
        • Subprocess and Call Activiti
      • Utility methods available in Platform
        • How to start a process from a JavaScript action
        • How to complete a user task from a JavaScript action
      • An example
        • Processes
        • Instances
        • Activities
        • History
    • Embedded CMS
    • ECM
      • Alfresco
        • Alfresco Introduction
        • Integration between 4WS.Platform and Alfresco
          • Integration at GUI level
          • Integration at model level
          • Integration at authentication and authorizations level
          • Additional features
        • How to use 4WS.Platform and Alfresco together
          • Set the same Identity Management system
          • Define document types and aspects in Alfresco
          • Import the document types and aspects definitions in 4WS.Platform
          • Define document types and aspects in 4WS.Platform
          • Reverse engineering of document types or aspects
          • Definition of business components to fill-in panels
          • Definition of the GUI
          • Additional server-side services
        • Requirements
        • Current limits in 4WS.Platform - Alfresco integration
      • Archiflow
        • Setup
        • Archiflow artifacts
        • How to
    • Lotus Notes Migration Tool
    • NoSQL databases
      • MongoDB
        • MongoDB Introduction
        • Setting up the environment
        • How to create collections
        • How to create business components
        • How to create windows filled with data coming from MongoDB collections
        • Design rules
      • Google Datastore
        • Google Datastore Introduction
        • Setting up the environment
        • How to create entities
        • How to create business components
        • How to create windows filled with data coming from Datastore entities
        • Design rules
    • TensorFlow
    • Web Page Development
      • Pure Web Page Development
      • Google Material Design development
      • Appendix A - a complete example without any lib
      • Appendix B - a complete example with Google MD
    • Jira Integration
    • Platform for GAE
    • SQL errors management
    • Multidimensional pivot grid
    • Quality
      • Automated Web Service Testing
      • Automated unit testing
      • Source code static analysis using ESlint
      • Source code static analysis using SonarQube
  • Troubleshootings
  • Best practises
    • Database design
    • Database maintenance
    • Creating a Web app : common use cases
    • Creating a mobile app : common use cases
Powered by GitBook
On this page
  • Business components for a list of documents
  • Business component for a detail form
  • Filtering conditions on database connected grids
  • Filtering conditions on Alfresco connected grids

Was this helpful?

  1. Core features
  2. Defining business components

Business components to fill-in panels

For every imported object (described in the previous section), two business components are automatically created during the importing stage:

  • a business component to read a list of documents

  • a business component to read a single document

Business components for a list of documents

The first component is basically web service: each time a grid has to show a list of documents by invoking this component, it will call the Alfresco web service layer to get the required data and it will pass back that content to the Platform’s grid. The data flow is as follow:

Platform’s Grid (browser) -> Platform’s business component (Platform server) -> Alfresco CMS Web service layer You are free to change the URL automatically set in that bsiness component, and add additional filter conditions, in order to define exactly the filtering logic to apply to that grid. See the "Examples of filtering conditions" seciton to get more details about how to set additional filters, according to the Alfresco web service syntax.

Business component for a detail form

The second component is used to feed a detail form by invoking the Alfresco API: it will get from Alfresco the metadata related to the specified document (identified by a uuid) it will pass back that content to the Platform’s detail form. The data flow is as follow:

Platform’s Form (browser) -> Platform’s business component (Platform server) -> Alfresco CMS API layer

Both grids and forms could required input parameters to use when fetching data: a grid could require parameters to dinamically filter the grid content, the form has to pass the uuid to get a specific document. In both cases, a parameter is defined using the Platform syntax: :XXX, dove XXX is the parameter name.

Please do not change the business component content for a detail form: it must always contain the ID and it should never be changed.

Filtering conditions on database connected grids

In case of a grid connected to a business components for Reports on line or components for lists generated automatically, filtering and sorting conditions are applied automatically by the grid component and passed forward to the server layer through the HTTP request parameters.

Optionally, you can define additional filtering conditions to the business component through the Additional Filters tab folder, available in the business component definition window.

You can define any number of filtering conditions in this list: the only requirement is to include at least one binding variable in a filtering condition.

Example:

AND (FIELD1 = :MY_VAR OR FIELD2 = :MY_VAR )

In this example, the variable name is MY_VAR and such condition will be automatically appended to the WHERE condition defined for the business component as long as the variable value is passed to the HTTP request. The corresponding request parameter must be expressed in camel-case format. So that for the example above, the request parameter name must be myVar.

On the UI layer, such parameter is passed forward in a client-side javascript action in this way:

gridxxx.store.baseParams.myVar = "...";

Note that every filter condition is appended to the base WHERE clause so it must start with a logical operation, which should be AND.

Suppose you need to define a condition in an IN, where you don't know in advance if 1, 2 or 3 values will be passed forward. You can manage this scenario by defining multiple filtering conditions, each one with different variable names:

AND FIELD IN ( :VAR1 )
AND FIELD IN ( :VAR2_1 , :VAR2_2 )
AND FIELD IN ( :VAR3_1 , :VAR3_2 , :VAR3_3 )

In this way, each filter condition will be applied alternatively. As a consequence. on the client side, you need to manage different variable names, according to the amount of values to pass forward.

Filtering conditions on Alfresco connected grids

A typical setting of a business component for grids is as the follow:

service/getList?format=json&type=...&model=...&prefix=...
  • the model and prefix are automatically set by Platform, when importing an object, since all the objects retrieved inherit the same model (and prefix).

  • the parameter type is used to define which document type to filter.

Consequently, such a kind of URL would retrieve all the documents stored in Alfresco having the specified document type (and related to the specified model). This is typically the starting point when retrieving list of documents from Alfresco. It is likely to add further filters to that base request. In order to do that, it is needed to include in the URL a parameter named filterBy , used to add filter conditions. These conditions must be expressed according to the Alfresco Query Syntax. For instance, this is an URL including a filtering condition:

service/getList?format=json&filterBy=zig:Flag_Stato:"C"&type=...

zig:Flag_Stato represents the model prefix + property name related to the specified document type, whereas the : symbol represents the " starts with " comparison operator and "…" is the value to compare. So prefix:property:"value" means the property must start with the specified value.

Another common comparison operator is the one where a property is between a specified interval, which is expressed in this way:

prefix:property:[minValue TO maxValue]

You can filter documents belonging to a specified aspect :

ASPECT:"cm:aspectName"

To filter documents stored in a specified path :

+PATH:"/cm:generalclassifiable/cm:Software_x0020_Document_x0020_Classification/member"

You can also combine multiple expressions using the logical operators** AND, OR and NOT.

You can have a deep look at the Alfresco syntax through these two links:

PreviousWhat are business componentsNextCreating business components

Last updated 5 years ago

Was this helpful?

http://wiki.alfresco.com/wiki/Search
http://wiki.alfresco.com/wiki/Full_Text_Search_Query_Syntax