- Android SDK 4.0 (API Level 15) or above
- Liferay Portal 6.2 (CE or EE), Liferay 7.0 CE, Liferay DXP
- Liferay Screens Compatibility plugin (for Liferay Portal CE or Liferay Portal EE).
- Android SDK 4.0 (API Level 15) and above
- Visual Studio 7.2
- Mono .NET framework 184.108.40.206
Comment Add Screenlet can add a comment to an asset in a Liferay instance.
Screenlets in Liferay Screens call JSON web services in the portal. This Screenlet calls the following services and methods.
The Default View uses Android’s
Button elements to show an add
comment dialog. Other Views may use different components to show this dialog.
This Screenlet supports offline mode so it can function without a network connection. For more information on how offline mode works, see the tutorial on its architecture. Here are the offline mode policies that you can use with this Screenlet:
|Policy||What happens||When to use|
|The Screenlet sends the data to the Liferay instance. If a connection issue occurs, the Screenlet uses the listener to notify the developer about the error. If the Screenlet successfully sends the data, it also stores it in the local cache.||Use this policy when you always need to send updated data, and send nothing when there’s no connection.|
|The Screenlet sends the data to the local cache. If an error occurs, the Screenlet uses the listener to notify the developer.||Use this policy when you always need to store local data without sending remote information under any circumstance.|
|The Screenlet sends the data to the Liferay instance. If this succeeds, the Screenlet also stores the data in the local cache. If a connection issue occurs, the Screenlet stores the data to the local cache and sends it to the Liferay instance when the connection is restored. If an error occurs, the Screenlet uses the listener to notify the developer.||Use this policy to send the most recent version of the data when connected, and store the data for later synchronization when there’s no connection.|
|The Screenlet sends the data to the local cache, then sends it to the Liferay instance. If sending the data to the Liferay instance fails, the Screenlet still stores the data locally and then notifies the developer about any errors that occur (including connectivity errors).||Use this policy to save bandwidth and store local (but possibly outdated) data.|
|The layout to use to show the View.|
|The asset’s fully qualified class name. For example, a blog entry’s |
|The asset’s unique identifier. The |
|The offline mode setting. See the Offline section for details.|
Comment Add Screenlet delegates some events to a class that implements
CommentAddListener. This interface lets you implement the following methods:
onAddCommentSuccess(CommentEntry commentEntry): Called when the Screenlet successfully adds a comment to the asset.
error(Exception e, String userAction): Called when an error occurs in the process. The
userActionargument distinguishes the specific action in which the error occurred.