cancel
Showing results for 
Search instead for 
Did you mean: 

SUP Workflow - Add MenuItem Programmically

Former Member
0 Kudos

Hi,

I am trying to add new menuitem programmically, by following code:-

addMenuItem("Approve", "", "", "ExpensePage", "Approve");

The menu should be show up after user click on a button, however, the page didn't refresh and show the menuitem until I navigate from one view to another, then back to previous view.

I tried .page() function and .trigger( "create" ); funtion to refreshing the view, didn't work

Any suggestions on this?

Thousand thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member228049
Participant
0 Kudos

what version of the workflow you were using , if you have sy.ui.iphone.menuBars.js, you could call

$('div.[data-role="header"]',$.mobile.activePage[0] ).menuHeaderBar("positionButtons");

$('div.[data-role="footer"]',$.mobile.activePage[0]).menuFooterBar("positionButtons");