Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81455-03

# <af:panelDashboardBehavior>

panelDashboardBehavior paneldashboardbehavior

The panelDashboardBehavior tag is a declarative way to have a command component (e.g. a button) apply visual changes to a panelDashboard before your application code modifies the component tree on the server. This behavior does not modify the component tree at all. Instead, it alters the visual appearance of the panelDashboard and allows you to make optimized changes without having to redraw the entire panelDashboard. This tag will be ignored for any server-rendered components, as it is only supported for the rich client.

This is a commandLink that you might use near a panelDashboard to provide a list of components that can be "inserted" in to the panelDashboard. When the link is clicked, the panelDashboard will start opening up some real estate at the specified indexed position. This link has an actionListener on a managed bean that will perform the appropriate changes to the component tree (e.g. setting rendered to true on a panelBox child of the dashboard) and will then invoke prepareOptimizedEncodingOfInsertedChild() on the dashboard component. This method will cause the dashboard to send just the inserted panelBox content. It is important to note that you are not required to use a behavior tag to do this. The benefit of using this behavior tag is that it will immediately start opening up space for the content before the server starts processing the action event and the managed bean makes the changes to send down the new panelBox content. If you decided to not use a behavior tag, the user may experience a delay while the server code is processing; the space within the dashboard will not open up until the new content is retrieved from the server.

Note: If EL is used in the EL supported attributes of this tag, this tag will not be stampable.

##

           <af:commandLink text="Add #{sideBarItem.title}"
                        partialSubmit="true"
                        actionListener="#{someBean.addChildAndKickOfOptimizedEncoding}"
                        rendered="#{sideBarItem.notShown}">
                <af:panelDashboardBehavior for="someDashboard"
                                           type="insert"
                                           index="#{sideBarItem.indexIfRendered}"/>
           </af:commandLink>
    Attributes

        Name
        Type
        Supports EL?
        Description

    for
    String
    yes

                The ID of the panelDashboard component being modified.
                An ID beginning with a colon will be treated as absolute (after
                trimming off the colon).   All other IDs will be resolved relative
                to the component which contains the panelDashboardBehavior.

    type
    String
    yes

                The type of visual change to apply to the panelDashboard.  Possible
                values are: "insert" (the default) - The body of the dashboard will be
                scrolled to the end.  Space will be opened up with a "loading" identifier,
                awaiting for your command to finish processing on the server while your
                action listener will process your necessary changes to the component
                structure and then invoke an optimized rendering on the panelDashboard.
                This optimized rendering will then swap out the "loading" placeholder with
                your new content in the browser.

    index
    int
    yes

                The index within the list of rendered dashboard children at which the insert
                (type="insert") will occur.  Since the insertion placeholder gets added
                before the insertion occurs on the server, you must specify the location
                where you are planning to insert the child so that if the user reloads the
                page, the children will continue to remain displayed in the same order.