Disabling the Management Bar

When there’s no content in the app, you should disable all the Management Bar’s buttons, except the info button.

You can disable the Management Bar by adding the disabled attribute to the liferay-frontend:management-bar tag:

        disabled="<%= total == 0 %>"
        includeCheckBox="<%= true %>"
        searchContainerId="<%= searchContainerId %>"

You can also disable individual buttons by adding the disabled attribute to the corresponding tag. The example configuration below disables the display buttons when the search container displays 0 results:

        disabled="<%= total == 0 %>"
        displayViews='<%= new String[] {"descriptive", "icon", "list"} %>'
        portletURL="<%= changeDisplayStyleURL %>"
        selectedDisplayStyle="<%= trashDisplayContext.getDisplayStyle() %>"

Now you know how to disable the Management Bar!

Implementing a Management Bar Sort Filter

Setting Search Container Animations

« Implementing a Management Bar Sort FilterConfiguring Your Admin App's Actions Menu »
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0