0
votes

I have a view panel with a categorized view as it source. The data I am viewing can have various statuses (Status='Submitted' , Status = 'Approved') etc.

I have a combo box on my page that lets me to select the status to display in the view. That all works great with the exception that the xPages view does the same annoying thing as in the client when displaying a categorized view. And that is, it does not display the categorized columns then a full text index search filter is in place.

Other than creating a view and a corresponding xpage for each status, is there any way to filter by status and still display the categorized field?

3

3 Answers

1
votes

I don't think you need 2 views or 2 view panels on XPage.In the view that was categorized by Status, put the below formula for the categorized Status column :

Status : "All"

The above formula will add category 'All', and shows all documents irrespective of status.

0
votes

If I understand right: You want to use "single category" to select by "Status" (e.g. "Draft") and still want to show the column with "Draft"? .... besides that you probably would be better off to just show it at a header above the view, since it saves you a full column, you simply add another column to your view (unsorted) that repeats the field "Status". If you don't want to add a view column, you can create a computed column that uses the status field.

0
votes

I went with two view panels / views. If "All" is selected then the view that is categorized by client is displayed. Otherwise the view categorized by status then client is displayed. The category filter is then used for that view.

<xp:viewPanel rows="30" id="viewPanel1">
    <xp:this.facets>
        <xp:pager partialRefresh="true" layout="Previous Group Next"
            xp:key="headerPager" id="pager1">
        </xp:pager>
    </xp:this.facets>
    <xp:this.data>
        <xp:dominoView var="view1"
            viewName="vwRequestsAllByClientsName">
        </xp:dominoView>
    </xp:this.data>
    <xp:this.rendered><![CDATA[#{javascript:var v = getComponent("comboBoxFilterBy").getValue();
 return (v=="All" || v==null);
}]]></xp:this.rendered>
    <xp:viewColumn columnName="ClientName" id="viewColumn1">
        <xp:viewColumnHeader value="ClientName"
            id="viewColumnHeader1">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="RequestNum" id="viewColumn2">
        <xp:viewColumnHeader value="Request #"
            id="viewColumnHeader2">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="APPSNo" id="viewColumn3">
        <xp:viewColumnHeader value="APPS Number"
            id="viewColumnHeader3">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="LoanType" id="viewColumn4">
        <xp:viewColumnHeader value="Loan Type"
            id="viewColumnHeader4">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="LoanAmount" id="viewColumn5">
        <xp:viewColumnHeader value="Loan Amount"
            id="viewColumnHeader5">
        </xp:viewColumnHeader>
    </xp:viewColumn>
    <xp:viewColumn columnName="Term" id="viewColumn6">
        <xp:viewColumnHeader value="Term" id="viewColumnHeader6">
        </xp:viewColumnHeader>
    </xp:viewColumn>

</xp:viewPanel>
<xp:viewPanel rows="30" id="viewPanel2">
    <xp:this.facets>
        <xp:pager partialRefresh="true" layout="Previous Group Next"
            xp:key="headerPager" id="pager2">
        </xp:pager>
    </xp:this.facets>
    <xp:this.data>
        <xp:dominoView var="view2"
            viewName="vwRequestsAllByStatusClientsName">
            <xp:this.categoryFilter><![CDATA[#{javascript:var v = getComponent("comboBoxFilterBy").getValue();

v}]]>