Professional Documents
Culture Documents
events", {
/** Specifies the Controller belonging to this View.
* In the case that it is not implemented, or that "null" is returned, th
is View does not have a Controller.
* @memberOf sapfiestadubaara.events
*/
getControllerName : function() {
return "sapfiestadubaara.events";
},
/** Is initially called once after the Controller has been instantiated.
It is the place where the UI is constructed.
* Since the Controller is given to this method, its event handlers can b
e attached right away.
* @memberOf sapfiestadubaara.events
*/
createContent : function(oController) {
var oRowTemplate_NoViews = new sap.ui.commons.layout.VerticalLay
out({
width:
{
path:"following",
formatter: function(v)
{
if(v>0){this.addStyleClass("following");return "
150px";}
else {this.addStyleClass("notfollowing");return
"150px";}
}
}
});
oRowTemplate_NoViews.addStyleClass("following");
var control,control_event_name,control_event_image,control_eve
nt_location,control_event_time;
//eventname Label
control_event_name = new sap.ui.commons.Label();
control_event_name.bindProperty("text","eventName");
//image
control_event_image = new sap.ui.commons.Image({src:"{eventImgPath}"});
control_event_image.setHeight("100px");
control_event_image.setWidth("100px");
control_event_image.addStyleClass("image");
icon:
{
path:"following",
formatter: function(v)
{
if(v>0){this.addStyleClass("followinglnt");return a;}
else {this.addStyleClass("notfollowinglnt");return a;}
}
}
});
control_event_location.bindProperty("text","location");
//control_event_location.addStyleClass("followinglnt");
var x="images/FiestaIcon_addsmall.png";
var y="images/FiestaIcon_tick.png";
var oButton2 = new sap.ui.commons.Button({
icon : {
path:"following",
formatter: function(v)
{
if(v>0){
this.addStyleClass("follimg");return y;}
else {th
is.addStyleClass("notfollimg");return x;}
}
},
styled:false,
});
/*x="follimg";y="notfollimg";
oButton2.addStyleClass({
path:"following",
formatter: function(v)
{
if(v>0)r
eturn y;
else ret
urn x;
}
});*/
oRowTemplate_NoViews.addContent(control_event_name);
oRowTemplate_NoViews.addContent(control_event_image);
oRowTemplate_NoViews.addContent(control_event_location);
oRowTemplate_NoViews.addContent(control_event_time);
//oRowTemplate_NoViews.addContent(control);
oRowTemplate_NoViews.addContent(oButton2);
var first_Tile= new sap.ui.commons.layout.VerticalLayout();
first_Tile.addStyleClass("following");
var add_label= new sap.ui.commons.Label({text:"ADD"});
first_Tile.addContent(add_label);
//
//create view repeater title (optional)
// create the row repeater control
var oViewRepeater_NoViews = new sap.suite.ui.commons.ViewRepeater({
});
/*{
path:"/following",
formatter: function(v)
{
if(v==-1){return first_Tile;}
else {return oRowTemplate_NoViews;}
}
}*/
/*rows:
{
path: "/allEventsInfo",
template: oRowTemplate_NoViews
}
*/
/*
*
*/
/*{path:"/following",
formatter: function(v)
{
if(v=="-1")
{
this.rows.path: "/allEventsInfo",
this.rows.template: first_Tile
}
else
{
path: "/allEventsInfo",
template: oRowTemplate_NoViews
}
}
}*/