Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Best way to refresh navigation bar?

User_IPNT8Dec 4 2019 — edited Dec 9 2019

Hi,

I have things working great where my navigation bar displays options based on the status of a work order, etc.

My one problem is I have a page that updates the order status. This all happens fine and the order status updates. However, because the navBar is controlled in appController/Index.html it does not update until I navigate to a different page. In the Index.html file for the navTemplate I am using something like:
<li data-bind="visible: ($root.showButton([[$data['id']]]))"><a href="#">

As a result, when the page loads it runs the showButton function passing in the listItem to detrmine if it should be visible or not. Works great, but it only runs when moving around, not if I am staying on the same page. This hasnt been an issue up until now. The problem is when they update the status they will still see a couple of buttons that shouldnt be available if the status was succesfully updated. Is there a way to somehow force the HTML element to reload (in the navbar case the footer?), or do I just force a full page reload?

This post has been answered by John JB Brock-Oracle on Dec 6 2019
Jump to Answer
Comments
Post Details
Added on Dec 4 2019
5 comments
2,313 views