!https://weblogs.sdn.sap.com/weblogs/images/972/sidebarCustomized.jpg|height=466|alt=Alloy sidebar in action|align=left|width=262|src=https://weblogs.sdn.sap.com/weblogs/images/972/sidebarCustomized.jpg|border=0!Most probably you already know that the context related Alloy sidebar holds further information for you depending on the document you've currently opened. But the data there seems to be static and not customizable. This is wrong.
In fact Alloy offers a lot of entry points (yet, again) for you to customize the sidebar pending on your projects needs. Often the sidebar can be perfectly used to display further (or additional) information to the end user. And the best, this information can be context related to the current document.
Take a look at the example screenshot given on the left. The Alloy sidebar contains the common My Approvals section and below some customized Budget section. The data shown there comes from the SAP Backend via the common Alloy mechanisms and get visualized at the Alloy sidebar.
Let's work this out.
!https://weblogs.sdn.sap.com/weblogs/images/972/NDERPpanel.jpg|height=194|alt=NDERP Sidebar Panel|align=right|width=275|src=https://weblogs.sdn.sap.com/weblogs/images/972/NDERPpanel.jpg|border=0!In the NDERPws application you can find a section called Sidebar Panel that contains two views. Open the Panel Data view and you'll see some predefined settings.
What do we have here?
Basically there're three kind of items here:
!https://weblogs.sdn.sap.com/weblogs/images/972/newPanelButton.jpg|height=27|alt=New Panel Data Button|align=left|width=122|src=https://weblogs.sdn.sap.com/weblogs/images/972/newPanelButton.jpg|border=0!Click the New Panel Data button in order to create an own Form item.
!https://weblogs.sdn.sap.com/weblogs/images/972/formDetails.jpg|height=268|alt=Sidebar Form|align=left|width=377|src=https://weblogs.sdn.sap.com/weblogs/images/972/formDetails.jpg|border=0!
Select Form from the Type field.
Press Save & Close Button at the top and create another item by pressing New Panel Data again.
!https://weblogs.sdn.sap.com/weblogs/images/972/htmlDetails.jpg|height=277|alt=Sidebar HTML|width=668|src=https://weblogs.sdn.sap.com/weblogs/images/972/htmlDetails.jpg|border=0!
Now we're going to specify the HTML item, to which we already referred to earlier.
The last item we need to create is the Fragment.!https://weblogs.sdn.sap.com/weblogs/images/972/fragmentDetails.jpg|height=283|alt=Sidebar Fragment|align=right|width=373|src=https://weblogs.sdn.sap.com/weblogs/images/972/fragmentDetails.jpg|border=0!
!https://weblogs.sdn.sap.com/weblogs/images/972/sidebarSectionName.jpg|height=118|alt=Sidebar Title|align=left|width=215|src=https://weblogs.sdn.sap.com/weblogs/images/972/sidebarSectionName.jpg|border=0!
The Property HTML field can now be filled with HTML tags in order to display the data in the sidebar. But this data would be static as it wouldn't have access to the current documents' data. In order to display document data in the sidebar, we've to dig a bit deeper.
The Alloy Sidebar allows us the display any HTML data contained in the current document, as long as the documents' fieldname equals a valid Fragment item name.
Knowing that, we can now use the full power of Lotus Domino Designer (Lotus Script, Java, ...) to enhance the Alloy sidebar with some additional data.
!https://weblogs.sdn.sap.com/weblogs/images/972/sidebarCodeIndesignerForm.jpg|height=500|alt=Sidebar coding in Designer|width=561|src=https://weblogs.sdn.sap.com/weblogs/images/972/sidebarCodeIndesignerForm.jpg|border=0!
Here we add some coding in the e.g. Queryopen section that will grab some data from the current document which was send out by SAP and create some nice HTML around it.
" '
Weigthed Pipeline: 3.5M
Pipeline # : 7
"
chartData = "chd=t:" + Cstr(budgetPercentageString) + "," + Cstr(budgetSpendPercentageString) + "," + Cstr(itemTotalPercentageString) + "&"
chartInitStr = chartInitStr + "
The result will look like this:
