Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3116

marquee effect for sap.m.MessageStrip

$
0
0

Hi @Dennis

I am trying to extend sap.m.MessageStrip to give moving/marquee effect .

 

here is the code :

 

sap.m.MessageStrip.extend("MovingMessageStrip",{

  metadata: {

     properties: {

       text: {type: 'string', defaultValue: 'Example'},

       showIcon: {type: 'boolean' ,defaultValue:true},

       type:{type:'sap.ui.core.MessageType', defaultValue: 'Error'},

  

     }

   },

 

 

   renderer: function(oRm, oCtrl) {

     oRm.write('<div');

     oRm.writeControlData(oCtrl);

     oRm.write('>');

     oRm.write('<marquee >' + oCtrl.getText()+'</marquee>');

     oRm.write('</div>');

   }

});

 

var myStrip1=new MovingMessageStrip({

  text : "hi messagestrip", // string

  type : sap.ui.core.MessageType.Error, // sap.ui.core.MessageType

  showIcon : true, // boolean

  showCloseButton : true, // boolean

 

  });

myStrip1.placeAt('content');

 

Issue is text is moving but I am not able to see its type and Icon being reflected.i.e I am not seeing the text in red color with error icon

 

What is the wrong with the code..??

 

Thanks and Regards,

Sagar M Patil


Viewing all articles
Browse latest Browse all 3116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>