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 .
, .