cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MDK Form Cell Header reference

sk_ramkumar
Participant
0 Kudos

Hi Experts,

I want to set enabled/disabled my FormCell header items ( button) based on some actions.

I am trying to get reference of the header using clientApi proxy, but I am not able to navigate to that level.

How to get reference to the Header of form cell container ? If it is not possible how do I get the button using name ?

cc : @bill_froelich , @Jitendra_Kansal 

Thanks,

Ram

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos
@sk_ramkumar Could you share the page definition to understand how you have defined the controls on the page?
View Entire Topic
sk_ramkumar
Participant
0 Kudos

Hi @Jitendra_Kansal ,

Here is my page metadata,

{
	"Controls": [
		{
			"FilterFeedbackBar": {
				"ShowAllFilters": false,
				"_Type": "Control.Type.FilterFeedbackBar"
			},
			"_Type": "Control.Type.SectionedTable",
			"_Name": "SectionedTable0",
			"Sections": [
				{
					"ObjectHeader": {
						"DetailImageIsCircular": false,
						"HeadlineText": "Hours",
						"StatusPosition": "Stacked",
						"StatusImagePosition": "Leading",
						"SubstatusImagePosition": "Leading"
					},
					"_Type": "Section.Type.ObjectHeader",
					"_Name": "SectionObjectHeader0",
					"Visible": true
				},
				{
					"Separators": {
						"TopSectionSeparator": false,
						"BottomSectionSeparator": true,
						"HeaderSeparator": false,
						"FooterSeparator": true,
						"ControlSeparator": true
					},
					"Controls": [						
						{
							"Value": "",
							"_Type": "Control.Type.FormCell.DatePicker",
							"_Name": "Allocation1StartTimePicker",
							"IsVisible": true,
							"Separator": true,
							"Caption": "$(L,'startTime')",
							"IsEditable": true,
							"Mode": "Time"
						}
					],
					"Header": {
						"_Name": "Allocation1SectionHeader",
						"AccessoryType": "None",
						"UseTopPadding": true,
						"Items": [
							{
								"_Type": "SectionHeaderItem.Type.Label",
								"_Name": "Allocation1SectionHeaderItemLabel",
								"Visible": true,
								"Position": "Left",
								"Title": "$(L,'allocation_1')"
							},
							{
								"_Name": "Allocation1SectionHeaderItemTypeButton",
								"Title": "$(L,'button_save')",
								"ButtonType": "Text",
								"Semantic": "Tint",
								"ImagePosition": "Leading",
								"Visible": true,
								"Enabled": true,
								"Position": "Right",
								"_Type": "SectionHeaderItem.Type.Button"
							}
						]
					},
					"Visible": true,
					"EmptySection": {
						"FooterVisible": false
					},
					"_Type": "Section.Type.FormCell",
					"_Name": "Allocation1FormCell"
				}
			]
		}
	],
	"DesignTimeTarget": {
		"Service": "",
		"EntitySet": ""
	},
	"_Type": "Page",
	"_Name": "DetailView",
	"Caption": "DetailView",
	"PrefersLargeCaption": true
}
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos
What is your logic that will determine when to enable / disable the save button in the section header?
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos
@sk_ramkumar Could you open a feature request on influence site to track your requirement? https://influence.sap.com/sap/ino/#/campaign/2279