CommentsView Options

From Lianjapedia
Jump to: navigation, search

See Also

CommentsView Section Attributes

Overview

CommentsView Section in Lianja Web Client



CommentsView Sections are used for social interaction within business Apps. Users can collaborate directly inside the App with access to the entire conversation history.

A CommentsView Section is related to the main Section on the Page and handles threaded comments related to the currently displayed record.

Bm-noteicon.png
Pro Tip

From v4.1 multi-line comments are supported. The text will word-wrap as you type.
Use Shift + Return to start a new line.


Lianja CommentsView Demo

example_commentsview App



The 'Lianja CommentsView Demo' (example_commentsview) is included in the Lianja App Builder distribution to demonstrate the use of a CommentsView Section.


example_commentsview App



This single Page App has a main Form Section for the southwind!customers table and a related CommentsView Section for comments about each customer.


Using a CommentsView Section

New Comment



To add a new comment, just type in the Comments box, then press return.



Reply



To reply to an existing comment, click on the comment's Reply link then type in the Comments box and press return. Your reply will be added to the thread of the original comment.



Like



To 'like' a comment, click on its Like link.



Remove


You can remove a comment you have added. To remove one of your comments, click on its Remove link.



Topics



Comment Topics can be specified. These are displayed as right-aligned buttons in the CommentsView Section header.

They are used to filter the comments displayed. Click a Topic's button to display only the comments that belong to that Topic.

Click the All Comments button to redisplay all comments.


Comments Table

The example_commentsview App uses the southwind!comments table. This table has the required structure for use in CommentsView Sections and should be copied or used as a template for comments tables in your own databases.


Field Field Name Type Width
1 CATEGORY Character 20
2 NODEID Integer 11
3 PARENTNODEID Integer 11
4 CHILDKEY Character 100
5 DATETIME DateTime 8
6 USERNAME Character 80
7 TOPIC Character 80
8 COMMENT Memo 8
9 NUMLIKES Integer 1
10 LIKEDBY Memo 8
11 DEPTH Integer 1

Note: See here for more information on adding a table to a database.

Indexes

On creating a CommentsView Section and setting the Table attribute, the following required indexes will be built for the specified table:

   Master Index TAG: CHILDKEY  
       Key: childkey+strzero(nodeid,10)
       Type: Character
       Len: 118
   Index TAG: PARENTNODEID
       Key: strzero(parentnodeid,10)+strzero(nodeid)
       Type: Character
       Len: 28
   Index TAG: NODEID    
       Key: nodeid
       Type: Numeric
       Len: 8

CommentsView Section options

CommentsView Section options



In the Section Attributes for a CommentsView Section, the Database and Table Attributes define its data source. The required data structure for the table is shown above.

The following CommentsView Section section-specific options are available:



Caption

The Caption Attribute defines the caption to be displayed at the top of the Section. As shown in the example_commentsview App, this can contain '{}' macros.

Comments for {customers.companyname}

Topics

The Topics Attribute contains a comma-separated list of topics. These will be displayed in the header allowing the comments to be filtered.

When a topic is selected, new comments added in the CommentsView Section will be assigned to the current topic. If 'All Comments' is active, new comments do not have an assigned topic.

Sales,Admin,Marketing,Support

Category

With a Category specified, new comments added in the CommentsView Section will be assigned to that category. This is not used in the display of comments, but can be accessed from the category field of the comments table for user-defined requirements.

Notes on Client Support

Attribute Notes
Caption -
Topics -
Category -