cancel
Showing results for 
Search instead for 
Did you mean: 

Changing .js to .xml view

former_member122649
Participant
0 Kudos

Hi Experts,

I have some of the SAP UI5 apps in .js view, and some of them are in .xml view.

I am extending the apps and developing. As per the suggestion, I am proceeding with .xml view

But how can i convert a existing .js view to .xml its confusing me to proceed with my development.

(I am creating a Material order view),

How the layout can be achieved, ? shall i use Web IDE >> Layout pane?? . (only for the view to check the layout design??)

(Note : we are using Eclipse IDE as client suggested)

Veera P,

Accepted Solutions (1)

Accepted Solutions (1)

former_member182374
Active Contributor
0 Kudos

Hi,

You can open the SAPUI5 Diagnostics screen (Ctrl-Alt-Shift S), select the relevant UI and then Export to xml

Regards,

Omri

former_member122649
Participant
0 Kudos

Hi Omri,

I am using Eclipse IDE, I tried ctrl+shitf+Alt +s

SAPUI5 Diagnostics screen is not opened?


Is it in web IDE or Eclipse?


Veera P,


former_member182374
Active Contributor
0 Kudos

Hi,

ctrl+shitf+Alt +s is part of the runtime (open it from browser when your applications runs) it's not IDE related.

Regards,

Omri

former_member122649
Participant
0 Kudos

Hi,

I am not looking some thing that renders at run time.

I have a view1.view.js now i need to change it to view1.view.xml

.js is full of script coding. Now i need to change it xml tags.

Veera P,

former_member182374
Active Contributor
0 Kudos

I understand your need.

Do what I've written, export the xml and then copy it to your Eclipse...

Regards,
Omri

former_member122649
Participant
0 Kudos

No, I have the coding in .js and not in Xml so i cannot export to eclipse.

1. i need to convert the coding from .js to .xml

2. i need to export to eclipse.

I am confused in point 1.

For Eg:

.js coding. (Date picker)

var oDatePicker1 = new sap.ui.commons.DatePicker('date1');

  oDatePicker1.setYyyymmdd("20160401");

  oDatePicker1.setLocale("en-US"); // Try with "de" or "fr" instead!

  oDatePicker1.attachChange(

  function(oEvent){

  if(oEvent.getParameter("invalidValue")){

  oEvent.oSource.setValueState(sap.ui.core.ValueState.Error);

  }else{

  oEvent.oSource.setValueState(sap.ui.core.ValueState.None);

  }

  }

  );

This above coding i need to change it to .xml. similarly i have so many codings, Any short cut to convert .js to .xml ???

This is my question..

Veera,

former_member182374
Active Contributor
0 Kudos

As I wrote before...

Try this link:

https://help.sap.com/saphelp_uiaddon10/helpdata/en/6e/c18e80b0ce47f290bc2645b0cc86e6/content.htm

At the end of the page there is a section: "XML View Conversion"

Regards,

Omri

Answers (1)

Answers (1)

former_member122649
Participant
0 Kudos

Omri,

thanks for your reply. I done the changes.

Veera P

former_member182374
Active Contributor
0 Kudos

You should reward points for helpful answers (-: