Skip to Content
0
5 days ago

Trying to change style of dialog using jQuery

38 Views Last edit 5 days ago 5 rev

Hi

I am trying to change the style of header of the dialog using jQuery.

The onAfterRendering is not fired when executed.

Could anyone help me?

Code:

onValueHelpRequest : function(oEvent) {
			var sInputValue = oEvent.getSource().getValue(), 
			oView = this.getView();
			var dialog = this.getView().byId("selectDialog");
			if (!this._pValueHelpDialog) {

				this._pValueHelpDialog = sap.ui.xmlfragment(
						"zpractice.fragment.ValueHelp", this);
				this._pValueHelpDialog.addEventDelegate({
					
					onAfterRendering : function(oEvent) {
						$("#selectDialog-dialog-header-BarPH").css({
							"background-color" : "white"
						});
						
					}
				
				})
				var oDialog = this._pValueHelpDialog; 
				this.oView.addDependent(oDialog);
				oDialog.getBinding("items").filter(
						[ new Filter("name", FilterOperator.Contains,
								sInputValue) ]);
			}
			this._pValueHelpDialog.open(sInputValue);
		},