How to delay opening a view on an Xpage

In my Xpage, I have search criteria at the top of the page and a view below. The user will select some search criteria, and then click “Search,” and I will do a FT search on the screen.

I want to avoid loading the view the first time I open xpage, as it takes a lot of time. How can i do this?

+4
source share
1 answer

Use the rendered property of your view control. Returns false for the displayed property if the search field is empty and returns true if it is filled.

Example:

<xp:inputText
    id="inputText1"
    value="#{viewScope.search}">
</xp:inputText>
<xp:button
    value="Search"
    id="button1">
    <xp:eventHandler
        event="onclick"
        submit="true"
        refreshMode="partial"
        refreshId="viewForSearch">
    </xp:eventHandler>
</xp:button>
<xp:panel
    id="viewForSearch">
    <xp:viewPanel
        rows="30"
        id="viewPanel1"
        rendered="#{javascript:viewScope.search}">
        ... pager ... view ... columns ...
    </xp:viewPanel>
</xp:panel>

"". , rendered="#{javascript:viewScope.search}" false, . #{javascript:viewScope.search}, true .

, .

+7

Source: https://habr.com/ru/post/1545699/


All Articles