Chart Container - rendering bug
StandardListItem / press event does not work
Hi,
the press event for the standard list item in a splitapp does not work..
here is the view code:
<List>
<items>
<StandardListItem title="Allgemein" type="Navigation"
press="gotoAllgemein" />
<StandardListItem title="Produktion" type="Navigation"
press="gotoProduktion" />
<StandardListItem title="Einkauf" type="Navigation"
press="gotoEinkauf" />
<StandardListItem title="Einkauf Lohnbearbeitung"
type="Navigation" press="gotoEinkaufLohn" />
<StandardListItem title="Vertrieb" type="Navigation"
press="gotoVertrieb" />
</items>
</List>
In my controller I have such method:
gotoProduktion : function(oEvent) {
this.byId("splitApp").toDetail(this.createId("produktion"));
},
But the method is not called when I set a break point...
BR,
Christoph
Web Ide develop new service
HI,
Im using the WebIDE and I want to know if there is guide/examples how to create service?
Thanks,
Stephane
Change the label place in simple form
Hi
I've this JSBIN and I need to change the label to be on the left side of the textField (and having a space between them)
how should I do that in this simple form?
MessageToast old and not working anymore?
Hi,
I want to show a message via the message toast - is this not working anymore?
The class is unknown...
sap.m.MessageToast.show(msg);
Best regards,
Christoph
Add style class to inline css
HI
I use the following code which is add the css inline ,I want to use the add style class,
How should I adopt this code?
onAfterRendering: jQuery.proxy(function(oEvent) {
this.$().css({
"width": "20px",
"border-collapse": "separate"
});
}, self._getListBox())
Binding models together in sapui5 / mapping paths between models
Hi there,
is there a possibility to keep two models in sync or define a model which is just a view to some subset of information onto another model? Assume you have a model like this
var oModelA = new sap.ui.model.json.JSONModel({ "dataInA": [ { "name": "1st @ A" }, { "name": "2nd @ A" }]});
and you want to have a model with a layout like this:
var oModelB = new sap.ui.model.json.JSONModel({ "globalName": "?????"});
Can we link oModelB to oModelA such that
oModelB.getProperty("/globalName");
resolves to, e.g.,
oModelA.getProperty("/dataInA/0/name");
See this gist here.
You might argue: Why should we? Simply define the binding on the control such that it references "name" and use
oControl.bindElement("/dataInA/0").setModel(oModelA);
But I'm trying to write a control which consists of several sub-controls whose properties are named differently and which I want to address from the outside with only one property name -- and I thought doing it via an internal model would be the way.
Thanks,
M.
PS: To be more specific: I'm trying to write a control which yields a color field which on press yields a colorpicker which then changes the Color field -- pretty much exactly like the color picker in the DemoKit. But I would like to hide the two items (the picker and the color field indicating the selected color) within one control -- without writing all `bindProperty`, `setModel`, `unbindProperty`, `setProperty`, ... etc. myself and propagate them to the embedded controls. I was rather thinking about defining one model inside the control as CustomData and bind its properties from the outside and then use this control-local model to bind the Picker and the Color field to.
Views and Controllers Loading Confusion
Hello Everyone,
In my application, I have 2 views and 2 controllers for each view.
In my first view, I have an Input form and in my second view I have an output table bound to a model.
In my first controller, I am just forwarding my application to view2. And my model is in 2 nd controller.
Flow should be like this:
View1 (Input form) --> controller 1 (get inputs parmeters) --> controller2 (get those parameters and pass it to url using ajax call) --> view 2 (To display the final data)
Problem is that everything is loading simultaneously and as a result, I am getting nothing in 2 nd controller.
In my index file, I have created an app and have given the id of view1 to load first.
I just want to achieve the above flow which is written in bold.
Please help someone.
File Not found error
Hi Everyone,
I am trying to deploy the ui5 application from netweaver devloper studio 7.3 SP 13, i have created an enterprise application project and assigned my working Ui5 Application Development component inisde it. While trying to deploy, iam getting successfull message with warning. please see the message bleow
S U M M A R Y
~~~~~~~~~~~~~~~~~~~
Successfully deployed: 0
Deployed with warnings: 2
Failed deployments: 0
~~~~~~~~~~~~~~~~~~~
1. File:C:\Users\skrishnan\Desktop\eclipse\workspace\paychang\paychang.ear
Name:paychang
Vendor:sap.com
Location:localhost
Version:2015.11.19.16.49.20
Deploy status:Warning
Version:HIGHER
Description:
1. Warning occurred on server 633985051 during update of sap.com/paychang : Web Class Existence Test: com.sap.ASJ.webjlin.000006 filter class "com.sap.ui5.resource.AppCacheBusterFilter" cannot be found in the application class path. Possible reasons: 1) package or class name not correct; 2) missing referenced component (application or library); 3) missing reference to component (application or library)., file: NJD_HCMDev02_D~dc~paychang~demo.com.war#WEB-INF/web.xml, severity: warning
CSN component of deployment item is not available
2. File:C:\Users\skrishnan\Desktop\eclipse\workspace.jdi\1\DCs\demo.com\dc\mss\paychange\ear\_comp\gen\default\deploy\demo.com~dc~mss~paychange~ear.ear
Name:dc~mss~paychange~ear
Vendor:sap.com
Location:NJD_HCMDev02_D
Version:20151118125441
Deploy status:Warning
Version:SAME
Description:
1. Warning occurred on server 633985051 during update of demo.com/dc~mss~paychange~ear : Web Class Existence Test: com.sap.ASJ.webjlin.000064 Incompatible versions: web application with version 2.5 WEB-INF/web.xml and older version of JEE application (1.4 or less), meaning webservice annotations will not be detected., file: demo.com~dc~mss~paychange~ui5~webmod.war#WEB-INF/web.xml, severity: warning
CSN component of deployment item is not available
What could be the issue ?? please help me out on this.
Thanks,
Sivaganesh
SAP Hybrid App Toolkit Installation Problem (Mac)
Hi Experts,
I'm trying to install the SAP Hybrid App Toolkit, but I'm receiving an ERROR:
"Cordova search plugin failure: you must configure the the HTTP(S) proxy correctly."
I tried to configure the Plugman and it seems to be okay. But if check it again, it's still the same error.
Even after restarting my Mac.
Do you have any ideas?
how to download json to excel sheet in sap ui5
Hi,
I searched the many forums but there is no use of me
I did the download .csv format but I need to download .xls format only
can you any once please help me on this...
I did for CSV:
onClick: function() {
var json = <jsondata>
var csv = this.JSON2CSV(json);
var fileName = "<filename>";
var uri = 'data:text/csv;charset=utf-8,' + escape(csv);
var link = document.createElement("a");
link.href = uri;
link.style = "visibility:hidden";
link.download = fileName + ".csv";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
JSON2CSV: function(objArray) {
var array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray;
var str = '';
var line = '';
var head = array[0];
if ($("#quote").is(':checked')) {
for (var index in array[0]) {
var value = index + "";
line += '"' + value.replace(/"/g, '""') + '",';
}
} else {
for (var index in array[0]) {
line += index + ',';
}
}
line = line.slice(0, -1);
str += line + '\r\n';
for (var i = 0; i < array.length; i++) {
var line = '';
if ($("#quote").is(':checked')) {
for (var index in array[i]) {
var value = array[i][index] + "";
line += '"' + value.replace(/"/g, '""') + '",';
}
} else {
for (var index in array[i]) {
line += array[i][index] + ',';
}
}
line = line.slice(0, -1);
str += line + '\r\n';
}
return str;
},
Hybrid Extension App, how to fill the searchField with the ProductId from BarCode
Hi all,
i have a sales order Fiori App and i extended it to Hybrid Application.
I put the button and the .js file for BarCode scanning, but i can't modify or extend the search bar in order to be filled with the productId from BarCode scanning.
I searched all functions on controllers .js and i couldn't find anything about search bar or search field. Its like doing it with default functions and view.
When i open the Extensibility Pane, it lets me modify or extend all objects of the view EXCEPT the search bar which is what i want to modify.
Have you any idea for this? For example whats the ID of the view of searchbar by default, in order to access it? Or how could i fill the search bar manually?
Thanks in advance,
Konstantinos Vogiatzakis
Define view once - use often with parameters - possible?
HI experts,
I want to create a view and give to the view controller some parameters and use this view quiet often in my application and clal the view with some parameters...
is this possible?
1) how can i define such view?
2) how can i call the view with the parameters?
thanks for information.
br,
christoph
Split App not showing detail view in mobile on clicking master record
I am using sap.m.splitApp to display a master view and detail view. On clicking on a doc number in master view , it shows corresponding details in detail view. This functionality is working fine in desktop.
In mobile(normal android)) , it shows just the master view(as expected according to the functionality of splitapp). However when i click on the the document number , nothing happens. It doesnt show me detail view.
I have used selectionChange event .
PS: Its working fine in desktops
I even tried to emulate the output in mobile using chrome browser of desktop , and once i resize the screen to small size , then on clicking the document number in master view , nothing happens (Same behaviour as its happening in mobile)
Amber
serviceUrlParams for oData Model
Dear All,
i have giving serviceUrlParams as oConfig to oData model, it should append for all service calls from this model, But unable achieve this(serviceUrlParams is not showing in URL)
var oConfig = {
metadataUrlParams: {"sap-language" : "EN"},
serviceUrlParams: {"sap-language" : "EN"},
json: true,
loadMetadataAsync: true,
defaultBindingMode: "TwoWay",
defaultCountMode: "Inline",
useBatch: true
};
var oModel = new sap.ui.model.odata.v2.ODataModel(sServiceUrl, oConfig);
this.setModel(oModel);
How to correctly handle v2.ODataModel.createEntry ?
Hi,
I have a page for creating an entity in my SplitApp.
In the onRouteMatched function of the controller I create an entry with v2.ODataModel.createEntry which I bind to the view for filling the fields.
This entity will be POSTed with the next call to submitChanges then.
So far, so good, but if the page is left the created entry is still in there and will be submitted if another page of my app calls submitChanges.
One solution I can think of would be to do a resetChanges() in the onRouteMatched handler of every controller which belongs to a "create" view to avoid submitting entries which have been created before but have not been saved by the user.
What do u think about this approach? Is there a better one?
How to show/access data from child entity using smartTable xml view.
Hi ,
I am trying to create smartTable using XML view.
I can get it working for one entitySet. e.g. "RecruitingApplication"
There is one-to-one association between RecruitingApplication <-> RecruitingContact entity(reference recruitingContactNav).
There is one-to-one association between RecruitingContact <-> Person entity.
I want show fields from RecruitingApplication entity plus RecruitingContact enity plus Person entity.
I don't know how to get this using SmartTable,
I did write onBeforeRendering method whether I can get the required data
//odata/v2/internal/RecruitingApplication?$format=json&$expand=recruitingContactNav/typeNav,recruitingContactNav/statusNav,requisitionNav
onBeforeRebindTable: function (oEvent) {
var mBindingParams = oEvent.getParameter( "bindingParams" );
mBindingParams.parameters[ "expand" ] = "recruitingContactNav/typeNav,recruitingContactNav/statusNav,requisitionNav";
if (mBindingParams.parameters.select.search( "recruitingContactNav/person" ) < 0) {
mBindingParams.parameters.select += ",recruitingContactNav/person" ;
}
}
xml view:
<smartTable:SmartTable id="mySmartTable"
entitySet="RecruitingApplication" tableType="ResponsiveTable"
useExportToExcel="true" useVariantManagement="true"
useTablePersonalisation="true" header="Applications"
showRowCount="true"
beforeRebindTable="onBeforeRebindTable"
tableBindingPath="RecruitingApplication/recruitingContactNav"
ignoredFields="" toolbarStyleClass="" editable="false"
editTogglable="false" demandPopin="false" persistencyKey="SmartTableAnalytical1"
enableAutoBinding="true">
<Table minScreenWidth="Tablet" >
<columns >
<Column id="applicationId" name="applicationId"
demandPopin="true" minScreenWidth="Tablet">
<customData>
<core:CustomData key="p13nData"
value='\{"columnKey": "applicationId","leadingProperty": "applicationId","sortProperty":
"applicationId","filterProperty": "applicationId"}' />
</customData>
<Text text="Appplication Id" />
</Column>
<Column id="recruitingContactNav/person" name="recruitingContactNav/person"
demandPopin="true" minScreenWidth="Tablet">
<Text text="Person " />
</Column>
</columns>
<items >
<ColumnListItem>
<cells>
<Link text="{applicationId}" href="javascript:viewApplications('{applicationId}');" />
</cells>
<cells >
<Text text="recruitingContactNav/{person}" />
</cells>
</ColumnListItem>
</items>
</Table>
</smartTable:SmartTable>
Can someone help me how to get the data from association(child entity) showing up in smart table?
Thanks,
Kushal
Getting the following warning / error in UI5
A shared template must be marked with templateShareable:true in the binding info - .
My app was working well and still it is. However i seem to get the above warning / error message when i reload the application.
Is it a problem
Unable to install HAT 1.9.3
Hello,
I followed the steps and installed all the prerequisites for HAT installation everthing is fine at the start. The versions are as follows (windows 7):
Cordova: 5.1.1
HAT: 1.9.3
npm: 1.4.28
git: 2.6.1.windows 1
SDK: SP10
now when i execute setup.cmd in HAT folder to install it , it checks for the pre requisites, install bower, all ok but after that it closes.
When i tried to execute again it just checks the pre requisites, display bower version 1.6.3 and closes , nothing happens.
I verified with the admin for proxy but we are not using that.
I can't understand, what i am doing wrong?
Thanks & Regards,
Niketa
Tile container functionality : Tile container => Custom tile => Generic tile
Hi,
I'm trying to achieve a tile container functionality like in the the following js plugging ==> gridster.js
GRIDSTER - using 3rd party jquery plugin
I'm still struggling with the above so i decided to extend the tile container functionality by
using generic tile in custom tile so i can add it to the tile container as described in ==> Tile Container for GenericTile (NOT StandardTile)
My requirement is to present tiles with different sizes according to the tile content ( chart / text .. ) in a responsive container as displayed in the above GRIDSTER so the next thing i checked is how to change the tiles size .
The custom tile size is limited so i found 2 solutions with CSS / extension :
Tile Container for GenericTile (NOT StandardTile)
But, the behavior of tile container is not stable. when i insert different sizes the padding is not consistent along with other design properties,
Does any one have a suitable solution ? the ideal solution would be the GRIDSTER functionality ...
Thanks,
Arie.