Step 2: Add the "showFeed handler" to the GroupList Component
-
Go to the group sample application, navigate to webapp/components/grouplist/view/GroupList.view.xml
and add the properties press="showFeed"
and type="Navigation"
to the _StandardListItem_
.
<StandardListItem
title="{JamOData>Name}"
description="{JamOData>Description}"
press="showFeed"
type="Navigation"
icon="{path:'JamOData>GroupType', formatter:'.typeIconFormatter'}"
iconDensityAware="false" iconInset="false"
/>
-
Go to the controller under webapp/components/grouplist/controller/GroupList.controller.js
, and add the following implementation for "showFeed"
. This will trigger the groupFeed
route, passing in the ID of the currently-selected group:
showFeed: function(oEvent) {
var groupId = oEvent.getSource().getBindingContext("JamOData").getProperty("Id");
this.getRouter().navTo("groupFeed", {groupId : groupId});
},
Step 3: Copy the Feed component and hook it up to the "groupFeed" route
- Now navigate to your
sap.jam.ext.feedsample
application, and select the webapp/components/feed
folder. Make sure that the feed folder is selected, and select edit > copy from the menu (or the appropriate keyboard short-cut).

Figure 5: Copy the Feed Component
- Navigate back to the
webapp/components
folder of the group sample application and select edit > paste. This should copy the SAP Jam feed component into your project.

Figure 6: Paste the Feed Component
-
Open the feed controller under webapp/components/feed/controller/Feed.controller.js
, and change the "memberFeed"
route handler to a "groupFeed"
route handler in the onInit()
function:
onInit: function() {
// Attach route handlers
//this.getRouter().getRoute("memberFeed").attachPatternMatched(this.onMemberFeedMatched, this);
this.getRouter().getRoute("groupFeed").attachPatternMatched(this.onGroupFeedMatched, this);
}
-
To navigate from the group feed back to the group list, add a back button handler to Feed.controller.js
:
onNavBack: function() {
this.getRouter().navTo("groupList", {}, true);
},
Step 4: Configure the new UI5 route and target
Almost there. Navigate to the top-level (application) manifest.json
file, under sap.jam.ext.groupsample/webapp/manifest.json
. Ensure that you have it open in the Code Editor and not the Descriptor Editor (see tab controls at the bottom of the SAP Web IDE code editor screen).
-
Register the new "groupFeed"
route in the "routes"
sub-section of the "routing"
section, and add the new "groupFeed"
target to point to the Feed component view. The final JSON snippet should look like this:
"routes": [{
"name": "groupList",
"pattern": "",
"target": ["groupList"]
}, {
"name": "groupFeed",
"pattern": "/Groups/{groupId}/Feed",
"target": ["groupFeed"]
}],
"targets": {
"groupList": {
"viewName": "components/grouplist/view/GroupList",
"viewId": "groupList",
"viewLevel": 1
},
"groupFeed": {
"viewName": "components/feed/view/Feed",
"viewId": "groupFeed",
"viewLevel": 2
}
}
Step 5: Run the application in the Mobile Development Pane
You are done! Run your application! You should now be able to navigate from a group, to its feed, and back again.
- Select your project in the code editor and press Tools > Mobile Development Pane
Figure 7: Mobile Development Pane
- View your application in different responsive screen sizes.
Figure 8: Responsive screen sizes
Next Steps