cancel
Showing results for 
Search instead for 
Did you mean: 

Add URL content in page

Raghu9t2
Participant
0 Kudos

Hi,

          i have a sap.m.page in this how can i load a url path.can anyone help me out in fixing this problem?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182650
Contributor
0 Kudos

You could add this control (mixed with iframe) to your page:

var html = new sap.ui.core.HTML({

  content: "<iframe style='width:100%;height:100%' src='"+YOUR_URL+"'></iframe>",

  preferDOM : false

  });

King regards

Former Member
0 Kudos

You're right! This is also a good solution!

Former Member
0 Kudos

Hi Raghu,

if you just want to place rendered content in your page, you can use jQuery load().

Official description: Load data from the server and place the returned HTML into the matched element.


$( "#result" ).load( "ajax/test.html" );

Hope, that helps.

Regards

Michael

Raghu9t2
Participant
0 Kudos

Hi Micheal,

          consider i have page1=new sap.m.Page(one,{

title: "title",

          showNavButton: true,});

in this how can i add a url path to this control?

Former Member
0 Kudos

Hi Raghu,

try to add a HTML-Container-Control to your page-control. You can use it to define a div-Container, where you can put your loaded HTML.


var html = new sap.ui.core.HTML({ content: '<div id="result"></div>' });

Here is an example.

Regards

Michael

surendra_pamidi
Contributor
0 Kudos

Hi Raghu,

I didn't understand totally what you are looking for. But I can suggest you some methods, that may help you.

Try following methods,

*var landingPageUrlInput = new sap.m.Input(

'landingPageUrlInputId',

{

type: sap.m.InputType.Url,

placeholder: oDataServiceUrl

}

);

where 'oDataServiceUrl' is URL.

*var settings = {

oDataServiceUrl : ODataUrl,

mode : mode,

feedType : feedType,

groupIds: groupIds,

object:{

  id: objectId,

  type: objectType,

  data: []

  }

where 'oDataUrl' is URL.

These are some methods to add URL in sap.ui.m.

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Can you elaborate more on your requirement?

Regards,

Chandra