App Action Contribution Reference

Version 28

    When creating a Jive App, you may want to wire up some aspect of its functionality to an action from one of many locations within the Jive UI. This can be done using "app actions". With app actions, you can wire up your app to various menus and tabs and sidebars throughout the Jive product. This document describes all the different ways you can add app actions to your app. For a tutorial on creating your first app using the Jive Node SDK, refer to Getting Started > Creating an App with the Jive Node SDK.

     

     

    Instructions

     

    To create an app action, add a Require element (within the ModulePrefs element) of your app.xml file. If there is already a Require element for the feature="actions" attribute, simply make sure you add a new action element between the start and end tags. Here is an example action for connecting your app to the sidebar menu when viewing content:

     

    <Require feature="actions">
      <Param name="action-contributions">
      <![CDATA[
                <action id="com.jivesoftware.contentaction"
                  path="jive/actions/content/*"
                  label="My Content Action"
                  view="contentview"/>
        ]]>
        </Param>
    </Require>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Note that the action elements must be specified within a CDATA section.

     

    • The id attribute must be unique to this app action. NOTE: If you have a duplicate ID, the action will not appear in the UI.
    • The path attribute describes the type of app action (the possible types of actions are specified throughout this document). The path can optionally contain a conditional filter to control when the action is visible (see Conditional Display of App Actions below for more information).
    • The label attribute contains the text that is displayed in the UI.
    • The view attribute contains the name of the view specified within a Content element in this same file. Note that the "URL actions" use a url attribute instead of a view attribute.
    • The icon attribute contains the URL for the associated icon.

     

    If you have a view attribute, you must also specify a Content element (after the ModulePrefs element) in the same app.xml file using the view name as specified above. For example:

     

    <Content type="html" view="contentview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    This element tells Jive what page to launch when the user executes the action. This page has access to Jive's Open Social API.

     

    Once you've added your application action, launch the app from within Jive to make the new action visible.

     

    View App Actions

     

    View actions allow you to display another page when a user clicks the action.

     

    Content Action

     

    Where does it show up?

    In the sidebar when viewing content.

    content-action.png

    Path values:

    • jive/actions/content/* (for all content)
    • jive/actions/content/document
    • jive/actions/content/discussion
    • jive/actions/content/question
    • jive/actions/content/document/binary/*
    • jive/actions/content/blog_post
    • jive/actions/content/poll
    • jive/actions/content/video

     

    Coming in a future release of Jive (Winter 2015): jive/actions/content/idea, jive/actions/content/event, jive/actions/content/video.

     

    Example:

    <action id="com.jivesoftware.contentaction"
      path="jive/actions/content/*"
      label="My Content Action"
      view="contentview"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    <Content type="html" view="contentview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Create Menu Action

     

    Where does it show up?

    In the create menu from the top navigation bar.

    create-action.png

    Path value:

    jive/actions/navmenu

     

    Example:

    <action id="com.jivesoftware.createmenu"
      path="jive/actions/navmenu"
      label="My Create Action"
      view="createview"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    <Content type="html" view="createview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Launcherless App Action

     

    Where does it show up?

    Unlike other app actions, this feature can actually remove the app from the Apps menu at the top. This mechanism can be useful for apps that are intended to be used exclusively for their other app actions without a need to display anything from the Apps menu.

    launcherless.png

    Path value:

    • jive/apps/launcher?filter=false()

     

    Available in the Winter 2015 Jive Cloud Release (8c5) and later.

     

    Example:

    <action id="com.jivesoftware.launcherlessapp"
      path="jive/apps/launcher?filter=false()"/>
    
    
    
    
    
    

     

    Place Action

     

    Where does it show up?

    In the Actions menu when viewing a Purposeful Place.

    places-action.png

    Path values:

    • jive/actions/places/* (all places)
    • jive/actions/places/space
    • jive/actions/places/group
    • jive/actions/places/project

     

    Example:

    <action id="com.jivesoftware.placeaction"
      path="jive/actions/places/*"
      label="My Places Action"
      view="placesview"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    <Content type="html" view="placesview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Notes:

    Developers can make use of gadgets.actions.updateAction to register a callback function. On launch of the app, this callback will receive the current container object (space, group, or project object).

     

    !app Action

     

    Where does it show up?

    Within the text editor while editing content.

    bangapp-action.png

    Path value:

    jive/actions/rte

     

    Example:

    <action id="com.jivesoftware.bangapp"
      path="jive/actions/rte"
      label="My !app Action"
      view="bangappview"
      icon="images/icon16.png"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    <Content type="html" view="bangappview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Place Tab Action

     

    Where does it show up?

    As a new tab in a Purposeful Place.

    project-tab-action.png

    Path values:

    • jive/tabs/places/space
    • jive/tabs/places/group
    • jive/tabs/places/project

     

    Example:

    <action id="com.jivesoftware.projecttab"
      path="jive/tabs/places/project"
      label="My Project Tab"
      view="projecttabview"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    <Content type="html" view="projecttabview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Notes:

    Developers can make use of osapi.jive.core.container.getLaunchContext(function(resp){}); to retrieve the container information (space, group, or project information).

     

    Action Tab Action

     

    Where does it show up?

    As a new tab in the Action area.

    action-tab-action.png

    Path values:

    jive/tabs/actions

     

    Example:

    <action id="com.jivesoftware.actiontab"
        path="jive/tabs/actions"
        label="My Action Tab"
        view="actionview"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    <Content type="html" view="actiontabview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Place Configuration Action

     

    Where does it show up?

    When configuring the content for a Purposeful Place. It can be accessed by selecting Manage > Settings from the navigation bar, or by editing the "Project Features and Activity" tile.

    place-config-cation.png

    Path values:

    jive/settings/places/space

    jive/settings/places/group

    jive/settings/places/project

     

    Example:

    <action id="com.jivesoftware.configproject"
      path="jive/settings/places/project"
      label="My Project Config Action"
      view="configprojectview" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    <Content type="html" view="configprojectview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Notes:

    Developers can make use of gadgets.actions.updateAction to register a callback function. On launch of the app, this callback will receive the current container object (space, group, or project object).

     

    User Profile Action

     

    Where does it show up?

    As an action menu item in a user profile.

    profile-action.png

    Path values:

    jive/tabs/profile (available in Spring 2014 release of Jive Cloud)

     

    Example:

    <action id="com.jivesoftware.profile"
        path="jive/tabs/profile"
        label="My Profile Action"
        view="profileview"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    <Content type="html" view="profileview" href="view.html" preferred_height="400" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Notes:

    Developers can make use of osapi.jive.core.container.getLaunchContext(function(resp){}); to retrieve the container information (user information).

     

    URL App Actions (including XMPP and tel)

     

    URL actions (available with the Summer 2014 release of Jive Cloud) allow you to launch a URL when a user clicks the action. These actions require a url attribute within the action element instead of a view attribute. For example:

     

    <Require feature="actions">
        <Param name="action-contributions">
            <![CDATA[
                <action id="com.jivesoftware.profile.rtc"
                        path="jive/actions/profile"
                        label="Profile Action Bar Popup"
                        url="https://developer.jivesoftware.com/"
                        icon="images/icon16.png" />
            ]]>
        </Param>
    </Require>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    The url attribute can also be used for "XMPP" URLs for Jabber communication or "tel" URLs for telephone numbers.


    In addition to using hard-coded information for the URL, you can access properties based on what the user is viewing ("context" properties) or based on the currently logged in user ("user" properties). For example, you can create a button to call the user whose profile you are viewing. These properties are the same properties defined in the property table for the Conditional Display of App Actions. For example, the below URL attribute will attempt to initiate Jabber communication using the email address of the user whose profile you are viewing:

     

    url="xmpp:{context.email}"
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    You can also access AppData information from within the url attribute. This can be useful when you don't know the specific name of a profile field in a particular community. For instance, since the phone number is not a standard profile field, we can inspect AppData information in order to get the correct profile field name. In order for this functionality to work, you will also need to create an App configuration page where the community manager could save AppData in the first place. The following URL will attempt to call the user whose profile you are viewing (by inspecting the value for the AppData key named "phoneNumber", which you should pre-populate with the name of the community's telephone profile field).

     

    url="tel:{context.profileFields.__AP_phoneNumber__}"
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    The conditional display feature can be very useful in the path attribute for this action because you can conditionally show this action when a field exists. The below example only shows the telephone icon if a telephone number exists for this user:

     

    path="jive/actions/profile?filter=exists(context.profileFields.__AP_phoneNumber__)" 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Profile / Hovercard Action Button

     

    Where does it show up?

    On the User Profile Action Bar & Profile Hovercard.

    Screen Shot 2014-06-05 at 3.04.58 PM.png  profile-page.png

    Path values:

    jive/actions/profile

     

    Example 1 (Launch a Website):

    <action id="com.jivesoftware.profile.rtc"
            path="jive/actions/profile"
            label="Profile Action Bar Popup"
            url="https://developer.jivesoftware.com/"
            icon="images/icon16.png" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Example 2 (Initiate Jabber Communication using Email Address):

    <action id="com.jivesoftware.profile.rtc"
            path="jive/actions/profile"
            label="Chat"
            url="xmpp:{context.email}"
            icon="images/icon16.png" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Example 3 (Call a Phone Number If AppData Value "phoneNumber" Contains Profile Field Name):

    <action id="com.jivesoftware.profile.rtc"
            path="jive/actions/profile?filter=exists(context.profileFields.__AP_phoneNumber__)
            label="Call"
            url="tel:{context.profileFields.__AP_phoneNumber__}"
            icon="images/icon16.png" />
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Content Action

     

    Where does it show up?

    In the sidebar when viewing content.

    content-action.png

    Path values:

    • jive/actions/content/* (for all content)
    • jive/actions/content/document
    • jive/actions/content/discussion
    • jive/actions/content/question
    • jive/actions/content/document/binary/*
    • jive/actions/content/blog_post
    • jive/actions/content/poll
    • jive/actions/content/video

     

    Example:

    <action id="com.jivesoftware.contentaction"
      path="jive/actions/content/*"
      label="My Content Action"
      url="https://developer.jivesoftware.com/"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

     

    Place Action

     

    Where does it show up?

    In the Actions menu when viewing a Purposeful Place.

    places-action.png

    Path values:

    • jive/actions/places/* (all places)
    • jive/actions/places/space
    • jive/actions/places/group
    • jive/actions/places/project

     

    Example:

    <action id="com.jivesoftware.placeaction"
      path="jive/actions/places/*"
      label="My Places Action"
      url="https://developer.jivesoftware.com/"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

     

    Create Menu Action

     

    Where does it show up?

    In the create menu from the top navigation bar.

    create-action.png

    Path value:

    jive/actions/navmenu

     

    Example:

    <action id="com.jivesoftware.createmenu"
      path="jive/actions/navmenu"
      label="My Create Action"
      url="https://developer.jivesoftware.com/"/>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Conditional Display of App Actions

     

    Jive (version 7 and later) allows you to conditionally display app actions. To do this, the action path within app.xml should include a filter condition. Jive evaluates this condition prior to displaying the action link. The can be used for the following types of scenarios:

    • App action only available to internal users
    • App action tab only available to certain groups
    • App action only available to selected users

     

    Syntax:

    path="<pathtype>?filter=<operator>(<type>.<property>[,val])"
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    pathtype is the path value, as described previously in this document (e.g. jive/actions/content/*, jive/actions/rte).

     

    operator can be one of the following:

    Operator ValueDescription
    equalsWhether the value matches the property for the specified type.
    existsWhether the property for the specified type exists.
    notexistsWhether the property for the specified type does not exist.
    securityGroupMemberTo limit this app action's visibility to a specific security group. Available with the Winter 2015 Cloud Release (8c5) and later. Refer to App Actions Filtered by Security Group for details.

     

    type can be one of the following:

    Type ValueDescription
    userThe current logged in user.
    contextThe currently viewed place, piece of content, or profile.


    property can be one of the following:

    Property ValueValid For The Following Type(s)Relevant For The Following PagesDescription
    IDuser, contextprofile, place, contentJive ID of the user or Place browser ID or content ID
    externaluser, contextprofileBoolean value (true/false) indicating whether user is an external user
    usernameuser, contextprofileValue of the username field
    nameuser, contextprofileDisplay name of the user
    partneruser, contextprofileBoolean value indicating whether user is a partner user
    federateduser, contextprofileBoolean value indicating whether user is a federated user
    firstNameuser, contextprofileFirst name of the user
    lastNameuser, contextprofileLast name of the user
    emailuser, contextprofileUser's email address
    profileFieldsuser, contextprofileContents of an AppData key; must include the key using the following syntax: context.profileFields.__AP_APPDATAKEY__ where APPDATAKEY is the name of the AppData key. For example, "context.profileFields.__AP_phoneNumber__" extracts the value of the AppData key named "phoneNumber".
    parentObjectTypecontextplaceType of place
    parentObjectIDcontextplacePlace ID
    descriptioncontextplaceDescription of place
    namecontextplaceName of place
    statuscontextplaceStatus of place
    extpropscontextplaceExtended properties for place; must include the extended property using the following syntax: context.extprops.NAME-OF-EXTPROP
    subjectcontextcontentThe subject of the piece of content.
    creationDatecontextcontentThe creation date for that content.
    modificationDatecontextcontentThe modification date for that content.
    objectTypecontextcontentThe value for the type of object being displayed. Discussion = 1; Message = 2; User = 3; Group = 4; Poll = 18; Private Message = 20; Blog = 37; Blog post = 38; Document = 102; Project = 600; Group = 700.
    plainBodycontextcontentThe body text for the content.
    userIDcontextcontentThe user ID for the primary author of this content.


    val is only applicable when the operator is "equals". It should be a string value denoting the value of the specified property.

     

    Examples:


    Display tab on the group if extended property with name testprop is associated with it.

    path="jive/tabs/places/group?filter=exists(context.extprops.testprop)"
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

     

    Display create action only to internal users (and not to partners).

    path="jive/actions/navmenu?filter=equals(user.partner,false)"