Skip to main content
Skip table of contents

Conversation

Overview

Custom defined control for showing conversations. Configurations of this control is dependent on the Conversation.meta metaclass.

Example

This example has been taken from the EntityConversations portlet. 

XML
      <CustomView head="true" name="ctrlConversations" type="md:Conversation">
         <Models>
            <Collection attributes="(recipients entityFullNameFirstLast) (activeParticipants entity)" name="conversations" order="(((conversationContext lastMessageSentTime) . #f) ((@) . #f))" value="(@)">
               <Bind name="active" value="currentUserParticipation conversationUser isParticipantActive"/>
               <Bind name="private" value="isPrivate"/>
            </Collection>
            <Instance name="conversation" value="(@)">
               <Bind converter="image" name="icon" value="(image . (from image))(data . mimeData)(type . mimeType)(icon . (from icon))(default . "businessman")"/>
               <Bind converter="message" name="participants" pattern="ids.conversationsTo" value="`(vector ,(@ from fullNameFirstLast) ,(@ recipients))"/>
               <Bind name="subject" value="subject"/>
               <Bind name="context" value="context caption"/>
               <Bind name="leavable" value="currentUserParticipation leavable"/>
               <Bind name="isRead" value="currentUserParticipation conversationUser isRead"/>
            </Instance>
            <Collection name="messages" order="((sentTime . #f) ((@) . #f))" value="(@ conversationMessages)" where="`(client-return-where (@ model where))">
               <Bind name="body" value="formattedMessage"/>
               <Bind name="sender" value="senderFullNameFirstLast"/>
               <Bind name="sentTime" pattern="datetime.m.f" value="sentTime"/>
               <Bind name="event" value="isEventMessage"/>
            </Collection>
            <Collection name="userMessages" order="((sentTime . #f) ((@) . #f))" value="(@ conversationUser conversationUser conversationMessageUsers)">
               <Bind name="read" value="isRead"/>
            </Collection>
         </Models>
         <Configuration>
            <Properties actives="conversations active" context="conversation context" icon="conversation icon" inviteEvent=""sysPick"" items="conversations" leavable="conversation leavable" leaveEvent=""leaveConversation"" markReadEvent=""markRead"" marked="conversation isRead" messageBodies="messages body" messageEvents="messages event" messageReads="userMessages read" messageSenders="messages sender" messageTimes="messages sentTime" messages="messages" participants="conversation participants" privates="conversations private" replyEvent=""reply"" subject="conversation subject" userMessages="userMessages"/>
         </Configuration>
      </CustomView>

Explanation

For further details on the Conversation control, see the custom control definition "md:Converstion" in the finance-md project.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.