<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="com.Innovation.ui5Project.controller.View1" xmlns:unified="sap.ui.unified" xmlns:dnd="sap.ui.core.dnd" displayBlock="true">
<Shell id="shell">
<SplitApp id="app" initialDetail="detail" initialMaster="master">
<detailPages>
<Page id="detail" title="Planning Calendar" backgroundDesign="Solid" class="sapUiStdPage">
</Page>
</detailPages>
<masterPages>
<Page id="master" title="List" backgroundDesign="List" icon="sap-icon://action" class="sapUiStdPage">
</Page>
</masterPages>
</SplitApp>
</Shell>
</mvc:View>
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="com.Innovation.ui5Project.controller.View1" xmlns:unified="sap.ui.unified" xmlns:dnd="sap.ui.core.dnd" displayBlock="true">
<Shell id="shell">
<SplitApp id="app" initialDetail="detail" initialMaster="master">
<detailPages>
<Page id="detail" title="Planning Calendar" backgroundDesign="Solid" class="sapUiStdPage">
<PlanningCalendar id="PC1" startDate="{path: 'calendarModel>/startDate'}" rows="{path: 'calendarModel>/people'}" appointmentsVisualization="Filled">
<rows>
<PlanningCalendarRow title="{calendarModel>name}" text="{calendarModel>role}" enableAppointmentsDragAndDrop="true" enableAppointmentsResize="true" enableAppointmentsCreate="true" appointmentDrop="handleAppointmentDrop" appointmentDragEnter="handleAppointmentDragEnter" appointmentResize="handleAppointmentResize" appointmentCreate="handleAppointmentCreate" appointments="{calendarModel>appointments}">
<appointments>
<unified:CalendarAppointment startDate="{calendarModel>start}" endDate="{calendarModel>end}" icon="{calendarModel>pic}" title="{calendarModel>title}" text="{calendarModel>info}" type="{calendarModel>type}" tentative="{tentative}"></unified:CalendarAppointment>
</appointments>
</PlanningCalendarRow>
</rows>
</PlanningCalendar>
</Page>
</detailPages>
<masterPages>
<Page id="master" title="List" backgroundDesign="List" icon="sap-icon://action" class="sapUiStdPage">
<List id="idList" items="{listModel>/}" growing="true" growingThreshold="50" includeItemInSelection="false">
<infoToolbar>
<OverflowToolbar visible="false" id="idInfoToolbar">
<Label id="idFilterLabel"/>
</OverflowToolbar>
</infoToolbar>
<StandardListItem id="listItem" title="{listModel>ProductName}" description="{listModel>ShipperName}" icon="{listModel>ProductPicUrl}" iconDensityAware="false" iconInset="false"/>
</List>
</Page>
</masterPages>
</SplitApp>
</Shell>
</mvc:View>
enableAppointmentsDragAndDrop="true"
<dragDropConfig>
<dnd:DragDropInfo sourceAggregation="items" targetElement="PC1-Table" targetAggregation="items" dragEnter="onListPlanningCalendardragEnter" dragStart="onListPlanningCalendardragStart" drop="onListPlanningCalendarDrop"/>
</dragDropConfig>
targetElement="PC1-Table"
PC1
PlanningCalendar with the internal table's ID. …………Yup we’re relying on internal inheritance — “I’ve warned you” onListPlanningCalendarDrop: function(oEvent) {
var oDroppedControl = oEvent.getParameter("droppedControl");
var oDragSession = oEvent.getParameter("dragSession");
var cliId = oDroppedControl.getId();
var rowId = cliId.replace("-CLI", "");
var pcRow = sap.ui.getCore().byId(rowId);
var oBindingContext = pcRow.getBindingContext("calendarModel");
var resourceObj = oBindingContext.getObject();
var oDraggedRowContext = oDragSession.getComplexData("onListDragContext");
},
onListPlanningCalendardragStart: function(oEvent) {
var oDragSession = oEvent.getParameter("dragSession");
var oDraggedRow = oEvent.getParameter("target");
var oContextBinding = oDraggedRow.getBindingContext("listModel").getObject();
oDragSession.setComplexData("onListDragContext", oDraggedRow);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |