on 09-11-2013 1:33 PM
Hi All,
How to display the value of MBO attribute on Button or Menu Item in HWC app.
This is just like displaying Notification on button/Menu item.
Help will be really appreciated.
Regards
saket
Hi Saket,
I am not sure what approach you are using either hybrid web designer or hybrid API apporach.
chck this
Rgrds,
Jitendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For menuitem;
Once you create menuitem in designer it creates a html tag called "sup_menuitems" in jquerymobilelookandfeel.html file. So go to the html file and try find the sup_menuitems tag for corresponding screen div for example;
login screen for my case
<div data-role="page" data-theme='a' id="LoginScreenDiv" sup_screen_title="Login" style="" sup_menuitems="Back,Back,Login,Login,Logout,Logout" sup_okaction="doSaveActionWithoutReturn()">
In above if you change name of the first item of a action it will change menuitem name,
<div data-role="page" data-theme='a' id="LoginScreenDiv" sup_screen_title="Login" style="" sup_menuitems="<Nameofbutton>,Back,<Nameofbutton>,Login,<Nameofbutton>,Logout" sup_okaction="doSaveActionWithoutReturn()">
Once you deploy application uncheck the generate files if you dont do this it will re-generate html
Hope this helps
Regards
Tahir
Hey Tahir,
You are a life saver....it works.
Now, i have one question:
the below code is working for me, now if i have four buttons so how should i mapped other field values of MBO to other buttons.
if(destScreenKey=="Count")
{
var message = getCurrentMessageValueCollection();
var itemList = message.getData("MBOName");// MBO name
var items = itemList.getValue();
var currItem= items[0];
var MBOVal = currItem.getData("ArkanPendingcount_FieldOne").getValue();
alert(MBOVal);
$('#CountScreenDiv .ui-btn-text').text(MBOVal);
}
eg:
I have One MBO = with four fields: F1, F2, F3, F4.
And on screen i have four buttons: b1, b2, b3, b4.
I the code suggested by you there we didnot mentioned button name, so how to set f1 on b1 and so on....
Your help always a life saver.
Regards
Saket
Message was edited by: saket amraotkar
Hi Saket,
I just wrote the below code but didnt tried there might some syntax errors but logic is as you need.
var message = getCurrentMessageValueCollection();
var itemlist = message.getData("MBOName");
for(var i = 0; i < itemlist.value.length;i++){
var F1 = itemlist.value[i].getData("FieldOne");
var F2 = itemlist.value[i].getData("Fieldtwo");
var F3 = itemlist.value[i].getData("Fieldthree");
var F4 = itemlist.value[i].getData("Fieldfour");
$("span > span", $("#<FirstBtnID>").parent()).html("F1.value");
$("span > span", $("#<SecondBtnID>").parent()).html("F2.value");
$("span > span", $("#<ThreeBtnID>").parent()).html("F3.value");
$("span > span", $("#<FourBtnID>").parent()).html("F4.value");
}
Hope this helps
Regards
Tahir
Message was edited by: Tahir Öz
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.