Skip to Content
0
Sep 09, 2016 at 10:00 AM

file not found - Fragment.xml

2542 Views

Hi,

I would like to open a fragment.xml when pressing a button. This is the code of the button in the "worklist.viem.xml".

<Button press="onTableSettings" id="Button_Filter" text="Filtro" activeIcon="sap-icon://filter" icon="sap-icon://filter"/>

So when I press this code should be execute; (in the worklist.controller.js)

onTableSettings: function(oEvent) {

// Open the Table Setting dialog

this._oDialog = sap.ui.xmlfragment("view.SettingsDialog", this);

this._oDialog.open();

},

The code of the fragment: (SettingsDialog.fragment.xml)

And finally this is the folder where is located:

So when I press the button I have this error in the concole. I Have seen samples with the same code working. I don't know what is the problem:

Uncaught Error: resource view/SettingsDialog.fragment.xml could not be loaded from ../resources/view/SettingsDialog.fragment.xml. Check for 'file not found' or parse errors. Reason: Not Found

If more code is requiered let me know.

Thanks in Advanced.

Marcos

Attachments

button.PNG (32.5 kB)
view.PNG (10.7 kB)