Width of application header SAP-UI5
Hi All,
I am creating a login application using SAPUI5.
My questions are
1. If i am skipping height in AbsoluteLayout why is is not working ? how it will take full screen height irrespective of screen size
2. There is a gap between window and the AbsoluteLayout how to remove that
3. The application header i have attache is not taking complete width of the screen ? how to do that ?
Code for is in view.txt file
Screen shot of the UI is also attached
THANKS A LOT
Hi Arvind,
100% height in CSS is a difficult topic (you might google for it - basically the height of the parent element needs to be defined to make it work, which may mean you have to set the height of ALL parent elements to 100%).
First, you have to set the View height to 100%:
this.setHeight("100%");
(e.g. in createContent())
And second, you need to add this style:
body, html, #content {
height: 100%;
- where "#content" needs to be the ID(s) of the HTML elements between body and the AbsoluteLayout.
The gap around everything is the default margin of 8px which all browsers add to the page. Set
body {
margin: 0;
to get rid of it.
The third issue is caused by how AbsoluteLayout and ApplicationHeader interact. This seems like a bug and we will follow up internally on this.
You can work around the issue by setting the width of the parent of the ApplicationHeader to 100%. It does only have a generated ID, though, so setting the following will only work as long as the ApplicationHeader is the second element added to any AbsoluteLayout in the page - otherwise you need to look up and adjust the ID:
#__container1 {
width: 100%;
See
http://jsbin.com/aku_ApplicationHeader_AbsoluteLayout/1/edit
for a working example (only Firefox/Chrome/Safari)
Thanks and regards
Andreas
Similar Messages
-
How to call view of one application from another application in SAP UI5?
Hi,
I have a main shell application. inside the shell i have called a application project using iframe.
Now from this project i have to access the view from the shell application. I tried getParent() but it returns null.
How do i access view which is not in my project and in a different project?Yeah view cannot be called independently.
Here in the above post i am just saying call the interface view.
which will call the window and first view will be called.
in the wddoinit of the first view . we will check the interface node and if a particular attribute is set.
that means call is coming from the comp B then you can fire the plug to next view.
this will take the user directly to second view.
but the flow logic then will be as per by comp A only.
means after view 2 it will go to view 3 like that as you have defined in comp A.
so you cannot use it as an independent reusable entity.
thanks
sarbjeet singh -
Integrating SAP UI5 application in Portal through LPD_Cust gives error
Hi Team,
In our scenario we are calling sap UI5 application in portal through LPD_Cust . We receive error SAP UI5 mobile is not supported in your browser . When we call same application through portal directly it opens properly( In both cases we are using same page and iView).
We have set the property of iview in portal as open in header less window in standard mode.But in Lpd_cust we don't have option of open in standard window.
Is there any work around available which launches application properly.I think you are experiencing problems thru the document mode of your browser.
The Quirks of Browser Rendering
1) If you are running ldp_cust, you could open the page properties in a new window.
2) set the document mode for the portal: Ajax Framework Page - Portal - SAP Library
iView: Browser Document Mode ( com.sap.portal.BrowserDocumentMode )
This iView adds an X-UA-Compatible header into the framework page that affects the Browser Mode and the Document Mode in Microsoft Internet Explorer. The default value is IE=EmulateIE7 that sets the Browser Mode in Microsoft Internet Explorer to IE7 Compatibility View and the Document Mode toQuirks .
If you are supporting IE9 standards mode, use IE=Edge. Remember that ALL applications in your portal need to support this!
3) See if the problem is the document mode. When you open the SAP UI5 application, press F12 and change the browser mode to Standards. -
Hi All,
We are developing a SAP UI5 application and we deploy our components in Gateway System as BSP application.
The question now is:::
We have 3 screens.We need to use our application by share point portal.
we will be giving the respective URL's (i.e index.html) to portal team and they will be integrating it through URL iViews
At a glance users can only see a single screen once they login to application. through portal
This will be taken care by Portal Team.
Do we need to maintain the end users on Gateway system for accessing the application?
We have SSO feature.
Could you please let me know the possible ways?
Thanks in Advance
Regards,
SatyaAlthough I will not advise it, you can turn off authentication in SICF. Go to the service node for you application, and "hardcode" a service user.
Please check if this is compatible with your license agreement, because I seriously doubt it. -
SAP Fiori: Version Management for SAP Gateway Enhanced Services & SAP UI5 Application
Hello Experts,
Greetings!!
I would like to check how version control is achieved for SAP Fiori app extensions. Or while enhancing the SAP UI5 applciation or enhancing a SAP netweaver gateway backend service for Fiori App.
I would appreciate your inputs. Thanks in Advance.
Sudhanshu ~
Tags edited by: Michael ApplebyFor front end SAPUI5 CODE in Elipse or RIVER RDE you can use GIT which is pretty standard way of doing code management. Once you push the code to GW it is in BSP and then you dont have much control on the version management side. If there are multiple developers working on front end code then you can push to GW using ABAP Team Provider plugin in Eclipse that pushes the sapui5 code to BSP via workbench request and once 1 developer is done then he/she will submit the code. the next person then does the GET from GW into their Eclipse to get the latest version of source code. But if there are 10 changes to the sapui5 code then on front end side you should use GIT or BitBucket or MS Team Share kind of source code control tools that integrate with ECLIPSE.
For oData Service you can do version management in ABAP stacks. you can have multiple versions for your service and then deploy to prod the one that you are sure of. Std change management can be used for backend GW service development.
thanks
Ashish -
Developing mobile application (SAP Ui5) using UWL API
Hi,
I need to develop a mobile application using sap ui 5 which will fetch the work items from the logged in user's id and when the user clicks on the workitem another custom page should open which will have the details of the task selected.The entire applications needs to be accessed from a smart phone.
Basically I will be using a hybrid web container for this purpose.
Do you have sample code or informtaion in this regard.
Thanks,
Ranjan.Please see Kenichi Unnai in his blog "How to use UWL API for NetWeaver BPM Tasks"
How to use UWL API for NetWeaver BPM Tasks
The .sca-file can be found on the sap service marketplace, afterwards you need to import the .sca-file, add the SC to your "MyComponents" and then you can select your necessary DC's. -
Hi,
I am new at SAP UI5 and i am trying to create a table.
I used the code given on the sap ui5 demokit but when i am running the application the table is not displaying.
can anyone help me with this.
Thanks in advance.
var aData = [
{lastName: "Dente", name: "Al", gender : "male"},
{lastName: "Friese", name: "Andy", gender : "female"},
{lastName: "Mann", name: "Anita", gender : "female"}
//table creation
var oTable = new sap.ui.table.Table({
title: "Guest House list",
visibleRowCount: 3,
firstVisibleRow: 2,
selectionMode: sap.ui.table.SelectionMode.Single,
//column creation
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Last Name"}),
template: new sap.ui.commons.TextView().bindProperty("text", "lastName"),
sortProperty: "lastName",
filterProperty: "lastName",
width: "200px"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "First Name"}),
template: new sap.ui.commons.TextField().bindProperty("value", "name"),
sortProperty: "name",
filterProperty: "name",
width: "100px"
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Gender"}),
template: new sap.ui.commons.ComboBox({items: [
new sap.ui.core.ListItem({text: "female"}),
new sap.ui.core.ListItem({text: "male"})
]}).bindProperty("value","gender"),
sortProperty: "gender",
filterProperty: "gender"
//data collection
var oModel = new sap.ui.model.json.JSONModel();
oModel.setData({modelData: aData});
oTable.setModel(oModel);
oTable.bindRows("/modelData");
//Initially sort the table
oTable.sort(oTable.getColumns()[0]);
oTable.placeAt("table");Hi Anshul
it should be
press: function() {
oTable.setVisible(true); // or false
am I right?
-D -
SAP UI5 Overlay Container not working from MII
Hi,
I'm unable to use the overlay container control of SAPUI5 from MII Workbench.
My code is as below(copied from Demo Kit):
<!DOCTYPE HTML>
<html>
<HEAD>
<TITLE>Overlay Container Test</TITLE>
<META http-equiv="X-UA-Compatible" content="IE=edge">
<META http-equiv='cache-control' content='no-cache'>
<META http-equiv='expires' content='0'>
<META http-equiv='pragma' content='no-cache'>
<SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid"></SCRIPT>
<script id="sap-ui-bootstrap" type="text/javascript"
src="resources/sap-ui-core.js"
data-sap-ui-theme="sap_goldreflection"
data-sap-ui-libs="sap.ui.ux3, sap.ui.commons">
</script>
<script type="text/javascript">
function handler(oEvent) {
alert("Event '"+oEvent.getId()+"' triggered");
var oOverlayContainer = new sap.ui.ux3.OverlayContainer();
oOverlayContainer.addContent(new sap.ui.commons.TextView({text: "Some Content ..."}));
oOverlayContainer.attachClose(handler);
oOverlayContainer.attachOpen(handler);
oOverlayContainer.attachOpenNew(handler);
var oButton = new sap.ui.commons.Button({
text: "Open Overlay Container",
press: function(oEvent){
if(!oOverlayContainer.isOpen()){
oOverlayContainer.open();
oButton.placeAt("sample1");
</script>
</HEAD>
<body class='sapUiBody'>
<div id='sample1'></div>
</body>
</HTML>
On execution, it is not displaying the content. I'm using MII 14.0 SP0. The SAPUI5 SCA file is properly installed. The ux3 library is in sap.ui folder still the overlay container is not created.
Please share your valuable thoughts.
Regards,
PrashantHi Prashant,
I tried your above code and also added the part to add the overlay container on click of "Add" button.
It works fine.
Please find below the code that worked for me:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>UI5</TITLE>
<META http-equiv="X-UA-Compatible" content="IE=edge">
<META http-equiv='cache-control' content='no-cache'>
<META http-equiv='expires' content='0'>
<META http-equiv='pragma' content='no-cache'>
<!-- <SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid"></SCRIPT> -->
<script id="sap-ui-bootstrap" type="text/javascript"
src="/sapui5/resources/sap-ui-core.js"
data-sap-ui-theme="sap_goldreflection"
data-sap-ui-libs="sap.ui.ux3,sap.ui.commons,sap.ui.table">
</script>
<script type="text/javascript">
// Create a TabStrip instance
var oTabStrip1 = new sap.ui.commons.TabStrip("TabStrip1");
oTabStrip1.setWidth("100%");
oTabStrip1.setHeight("300px");
// 1. Tab1
var oLayout1 = new sap.ui.commons.layout.MatrixLayout("Matrix1", {columns: 1, width: "100%"});
oLayout1.setWidths(['150px']);
var Equipment_Rows;
var currData;
var Equip_ID = 0;
var Equip_Desc;
var Equip_Type;
var Last_Calib;
var Next_Calib;
var count = 0;
//Create a panel instance
var oPanel1 = new sap.ui.commons.Panel({
width : "100%",
showCollapseIcon: false,
//Set the title of the panel
oPanel1.setTitle(new sap.ui.core.Title({
text : "Equipment"
var i = 1;
function handler(oEvent) {
alert("Event '"+oEvent.getId()+"' triggered");
var oOverlayContainer = new sap.ui.ux3.OverlayContainer();
oOverlayContainer.addContent(new sap.ui.commons.TextView({text: "Some Content ..."}));
oOverlayContainer.attachClose(handler);
oOverlayContainer.attachOpen(handler);
oOverlayContainer.attachOpenNew(handler);
oPanel1.addButton(new sap.ui.commons.Button({
text : "Add",
tooltip: "Add equipment",
lite: true,
icon : "sap-icon://add-equipment",
id : 'add' + i,
press : function() {
alert("overlay container should open");
if(!oOverlayContainer.isOpen()){
oOverlayContainer.open();
//Table here
var oTable = new sap.ui.table.Table({
//title: "Dynamic Table",
id : 'equiptable',
visibleRowCount: 5,
firstVisibleRow: 1,
selectionMode: sap.ui.table.SelectionMode.Single,
navigationMode: sap.ui.table.NavigationMode.Paginator,
fixedColumnCount: 5,
editable:false
// define the Table columns
var oControl1 = new sap.ui.commons.TextView({text:"{EquipID}"}); // short binding notation
oTable.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text: "SAP Equipment ID"}), template: oControl1}));
var oControl2 = new sap.ui.commons.TextView({text:"{EquipDesc}"}); // short binding notation
oTable.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text: "Equipment Description"}), template: oControl2}));
// create a JSONModel, fill in the data and bind the Table to this model
var oEquipmentModel = new sap.ui.model.json.JSONModel();
oTable.setModel(oEquipmentModel);
oTable.bindRows("/modelData");
oPanel1.addContent(oTable);
oLayout1.createRow(oPanel1);
oTabStrip1.createTab("Equipment",oLayout1);
// Attach the TabStrip to the page
oTabStrip1.placeAt("sample1");
</script>
</HEAD>
<body class='sapUiBody'>
<div id='sample1'></div>
</body>
</HTML>
I have not referred to /XMII/JavaScript/bootstrap.js rather to the 2nd script tag which refers to "/sapui5/resources/sap-ui-core.js" and included "sap.ui.ux3" in the data-sap-ui-libs attribute of the script tag.
Do try and let me know if your issue is resolved.
Regards,
Ria -
SSO to non SAP Application using SAP Logon Ticket
Hi Experts,
I Have EP 7 SP 15 using SPNego Wizard to SSO with Active Directory and SSO between EP and ECC using SAP Certificates.
Now I have a demand to SSO some JAVA based applications (non SAP) to my portal using the SAP Logon Ticket.
I Have followed some blogs that directed me to use SAPSSOEXT (some libs) to read the MYSAPSSO2 cookie. The problem is that I didn't found this cookie, I even executed the command javascript:document to look for this cookie but the browser just show me the JSESSIONID info.
Does anybody knows where I can find this cookie or if there's a better way to set up this SSO? It´s necessary to say that I cannot SSO these application to the kerberos protocol because some security reasons on my company.
Thanks
ArmandoHi,
I dont have much info related but i can giv u hint
refer OSS Notes 442401 and 723896.
When using SAP logon tickets for non-SAP applications, two different implementation options are available. The difference lies in where the ticket verification takes place.
In the first case, the SAP logon ticket is submitted to the web server filter located on the web server. The web server filter verifies the portal serveru2019s public key
certificate using its local Personal Security Environment (PSE) and then populates the HTTP header field with the user ID for SSO to the non-sap web application.
In the second case, the SAP logon ticket is sent to the non-SAP application, which then verifies it using the ticket verification DLL and submits the user ID to the application for SSO.
You can refer following link :-
http://help.sap.com/saphelp_nw70/helpdata/EN/89/6eb8deaf2f11d5993700508b6b8b11/frameset.htm
user authentication and SSO
http://help.sap.com/saphelp_nw70/helpdata/EN/8f/ae29411ab3db2be10000000a1550b0/frameset.htm
Authentication Using a Directory with SSO Integration Using Logon Tickets
http://help.sap.com/saphelp_nw70/helpdata/EN/f8/3b514ca29011d5bdeb006094191908/frameset.htm
SSO
SAP Logon Ticket-based Single Sign-On
http://help.sap.com/saphelp_nwce10/helpdata/en/45/b6af743753003ae10000000a11466f/frameset.htm -
Unable to create a new view for SAP UI5 in NWDS
Hi UI5 Profis,
I'm just getting started with SAP UI5 and wanted to create and run my first application using the UI5 Tools wirh NWDS. After having installed NWDS and the UI5 Tools
I create new SAP ui5 project, but the wizard always run into error, when I want to create new view.
Did someone already have the same issue?
Thanks in advance,
BR,
BerengerHi Berenger,
Which is your NWDS version?
It seems there is a bug on view creation with 1.8.8 version:
1814417 - Patched version 1.8.8 of UI Development Toolkit for HTML5
http://service.sap.com/sap/support/notes/1814417
Kind regards -
Hi All,
I am trying to apply css styles to xml views in sap ui5.
I am successful in changing the font size of a text or changing the color of a label..
But i am not successful in changing the style of number and number unit in Object Header.
<html:style>
.myFont1 {
font-size : 15px;
</html:style>
<
<Page
title="{i18n>DetailTitle}"
showNavButton="{device>/isPhone}"
navButtonPress="handleNavButtonPress" >
<ObjectHeader class = "myFont1"
title="{SoId}"
number="LB0406S6GB 2.5 SLC 400GB Flash Drive"
numberUnit="SDLB6S-400G-3103" >
<attributes>
<Page
title="{i18n>DetailTitle}"
showNavButton="{device>/isPhone}"
navButtonPress="handleNavButtonPress" >
<ObjectHeader class = "myFont1"
title="{SoId}"
number="LB0406S6GB 2.5 SLC 400GB Flash Drive"
numberUnit="SDLB6S-400G-3103" >
<attributes>
<ObjectAttribute text="{BuyerName}" />
cc: Chandrashekhar MahajanHi Jose,
Thanks for your reply
I have declared my css style as you had suggested
<html:style>
.myFont1 .sapMOHNumber{
font-size : 15px;
</html:style
and have called the css class this way
<ObjectHeader
title="{SoId}"
class = "myFont1.sapMOHNumber" number="LB0406S6GB 2.5 SLC 400GB Flash Drive"
numberUnit="SDLB6S-400G-3103" >
<attributes>
<ObjectAttribute text="{BuyerName}" />
But I am getting an error like :resource sap/ui/demo/myFiori/view/Detail.view.xml could not be loaded from
./view/Detail.view.xml. Check for 'file not found' or parse errors.
Any clue pls? -
Creating a search help with SAP UI5 and js?
Hello com,
I am trying to create a search help, collecting data from a table.
Is there something similar to the typical ABAP search help in SAP UI 5?
ABAP:
PARAMETERS: lv_alias TYPE dsh_alias MATCHCODE OBJECT dashboard_alias_f4,
I found this in the Demo Kit:
// create a simple SearchField
var oSearch = new sap.ui.commons.SearchField("providerSearch", {
searchProvider: new sap.ui.core.search.OpenSearchProvider({
suggestType: "json",
suggestUrl: "/demokit/suggest?q={searchTerms}",
icon: jQuery.sap.getModulePath("sap.ui.core", '/') + "mimes/logo/txtonly_16x16.ico"
search: function(oEvent){
alert("Search triggered: " + oEvent.getParameter("query"));
//attach it to some element in the page
oSearch.placeAt("sample4");
But how can i connect it with the specifiy data table?
Thanks,
DomenikHi,
you need to create OData service which will retrieve (search) the required information and then need to create UI5 application to consume it.
you can refer this blog How to Implement Value Help (F4) with SAP UI5 which covers both parts.
if you are having SP08 version of SAP Gateway then creating search help is very simple. refer my blog Creating OData service based on Search Help
Regards,
Chandra -
Custom button icons in application header
Hi All,
I have a requirement, where I want to provide ability to end user to supply custom icons in application header.
For this I have created a class and extended from sap.m.Button.
and override setIcon method in my child class?
but could not get this to work? can someone help me out?
regardsAny pointers please help.
I am now able to display the icons.But how do I prevent expand/collapse on icon click? -
SAP UI5, MII, & JSON
I've been using jQuery ajax calls to fetch MII JSON data and display it in various ways for some time now when I want to display data in something other than an MII applet. My client wants to transition to using SAP UI5 in their web reports and so I've been doing some prototyping.
I've found that I cannot get a UI5 table to bind to an MII Rowsets result set when the content type is JSON.
Some example code...
// This works fine...
function buildTableAjax() {
"use strict";
var q = miiUtils.miiGet(queryTemplate, {}); // (wrapper function around $.ajax)
q.done(function (data, status, xhr) {
var model = new sap.ui.model.json.JSONModel();
// if I setData to the returned "Rowsets" object I can
// not figure out a bindRows expression that works so
// I use the 0th rowset instead
model.setData(data.Rowsets.Rowset[0]);
var str = model.getJSON();
var table = new sap.ui.table.Table({
title: "Water Samples",
visibleRowCount: 20
var cols = data.Rowsets.Rowset[0].Columns.Column;
$.each(cols, function (i, col) {
if ($.inArray(col.Name, hideColumns) === -1) {
table.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({
text: col.Name
template: new sap.ui.commons.TextView().bindProperty("text", col.SourceColumn),
sortProperty: col.SourceColumn,
filterProperty: col.SourceColumn,
width: "75px"
table.setModel(model);
table.bindRows("/Row");
table.placeAt("tableHolder");
I know that this isn't the preferred way to do this and I would like to use the whole UI5 stack sometime soon, so I came up with the following.
function buildTableUI5() {
"use strict";
var requestUrl = miiUtils.createRequestURL(queryTemplate, {
"Content-Type": "text/json"
var model = new sap.ui.model.json.JSONModel();
var table = new sap.ui.table.Table({
title: "Water Samples",
visibleRowCount: 20,
// maybe add columns based on result set later...
table.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({
text: "Description"
template: new sap.ui.commons.TextView().bindProperty("text", "Description"),
sortProperty: "Description",
filterProperty: "Description",
width: "75px"
model.attachRequestCompleted(function () {
// do something with data if required...
//var str = model.getJSON();
model.loadData(requestUrl);
table.setModel(model);
table.bindRows("/Rowset/Row");
table.placeAt("tableHolder");
buildTableUI5 will always display "No Data". If I simply change the url's Content-Type to text/xml and change the model type to XMLModel, the function works as expected and data is bound.
I would prefer to use JSON if possible, Can it be done through model.loadData()? What would I put in the bindRows call to get it to work? (The value of the commented out str variable in attachRequestCompleted is the expected json result, so the data is being returned just fine).
Thanks!Hi Allan,
The data structure changes when your content type is JSON hence you cannot map rowsets/rowset/row structure and get the desired output.
Generally, MII 14.0 onwards is capable of giving JSON result that can be directly mapped to ui5 components.
What is miiUtils.createRequestURL retur ning you here. I suspect a mapping issue here as everything else looks good.
See is below example helps you. This is referring to UI5 Charts but atleast can give you some idea on model and data binding.
Getting started with Viz Charts
Table - SAPUI5 Demo Kit
Best Regards,
Swaroop -
SAP UI5 App Integration with PhoneGap
Hi,
Can any one guide me in integrating SAP UI5 App with PhoneGap and deploy the app to iOS or Android,
Help me in sharing either blogs OR docs related to this topic.
Thanks,
JayaYou may check
Building awesome mobile apps with SAPUI5 and PhoneGap
Packaging sapui5 application using phoneGap for Android [ Command line Interface ]
Rgrds,
Jitendra
Maybe you are looking for
-
Hi, I'm trying to create a link column in a table by declaring one column as link type and set its linkColumnKey to another column which contains the actual text of the http URL. I'd like to hide the second column in the table. How do I do that? One
-
Hi to all. I am working in a Travel Management implementation and we need to have validations for Cost Centers, Profit Centers and WBS elements... The Travel and Accounting are in different systems but the client requires the Travel to have the same
-
Can anyone tell me if there are any whitepapers that breakdown when you store a document in a filesystem vs a database? We have a need to store up to millions of documents and search them (just like a search engine) I am hesitate to put that load on
-
Best Approach for Sharepoint/Office 365 Solution?
Hello there, I have been asked to develop a new solution involving SharePoint Online. I know a bit about SharePoint but have not done any development with it as of yet. I need to understand the best approach to take (e.g. WebPart, Separate Web Applic
-
When you open LP9 file you have option of - folder or package- Q: is the actual new file - song.logicx file exactly the same file whether I migrate the LP9 song as a 'FOLDER' OR 'PACKAGE'? or is the 'package' version somehow different in some way?