0

I've been following Dave's Notesin9 video on full text searching.

My source code is:

    <?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
    defaultLinkTarget="_blank">
    <xp:br></xp:br>
    <xp:inputText id="inputText1" value="#{requestScope.variant}"></xp:inputText>
    <xp:br></xp:br>

    <xp:br></xp:br>
    <xp:text escape="true" id="computedField1" value="#{javascript:requestScope.variant}"></xp:text>
    <xp:br></xp:br>


    <xp:br></xp:br>
    <xp:button id="button3" value="Search"><xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true"></xp:eventHandler></xp:button>
    <xp:br></xp:br>





    <xp:viewPanel id="viewPanel1" pageName="/p_form.xsp" rows="20">
        <xp:this.facets>
            <xp:pager partialRefresh="true" layout="Previous Group Next"
                xp:key="headerPager" id="pager1" style="width:40.0px">
            </xp:pager>
            <xp:viewTitle xp:key="viewTitle" id="viewTitle1"
                value="List of documents"
                style="width:153.0px;background-color:rgb(64,128,128);color:rgb(255,255,0)">
            </xp:viewTitle>
        </xp:this.facets>
        <xp:this.data>
            <xp:dominoView var="view1" viewName="vijay"
                search="#{javascript:requestScope.variant}">
            </xp:dominoView>
        </xp:this.data>
        <xp:viewColumn columnName="name" id="viewColumn1"
            showCheckbox="true" displayAs="link">
            <xp:viewColumnHeader value="name" id="viewColumnHeader1"
                style="background-color:rgb(192,192,192)">
            </xp:viewColumnHeader>
        </xp:viewColumn>
        <xp:viewColumn columnName="age" id="viewColumn2">
            <xp:viewColumnHeader value="age" id="viewColumnHeader2"
                style="background-color:rgb(192,192,192)">
            </xp:viewColumnHeader>
        </xp:viewColumn>

        <xp:viewColumn columnName="email" id="viewColumn3">
            <xp:viewColumnHeader value="email" id="viewColumnHeader3"
                style="background-color:rgb(192,192,192)">
            </xp:viewColumnHeader>
        </xp:viewColumn>

        <xp:viewColumn id="viewColumn4" style="width:89.0px"
            displayAs="link" columnName="$6">
            <xp:this.facets>
                <xp:viewColumnHeader xp:key="header"
                    id="viewColumnHeader4" value="Attch">
                </xp:viewColumnHeader>
            </xp:this.facets>
        </xp:viewColumn>
    </xp:viewPanel>
    <xp:button value="New Topic" id="button1">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action>
                <xp:openPage target="newDocument" name="/p_form.xsp"></xp:openPage>
            </xp:this.action>
        </xp:eventHandler>
    </xp:button>
    <xp:button value="Delete selected" id="button2">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action>
                <xp:deleteSelectedDocuments view="viewPanel1"
                    message="Are you sure to delete it('em)?">
                </xp:deleteSelectedDocuments>
            </xp:this.action>
        </xp:eventHandler>
    </xp:button>
</xp:view>

here, included a textfield to input the search term, computed field to view the queried term, a button labelled search as a submit button. Entered value in the textfield and when i press the search button, i get error 500.

Where lies the mistake? Pls help.

vijay
  • 51
  • 1
  • 9
  • 1
    Open your database in Domino Designer. Go to "Application Properties > XPages (tab)". There in "Errors and Timeouts" check the option of "Display XPage runtime error page". This would give you exact cause of error. That would give us something to help. You may also want to check if your database is full text indexed. – Naveen Jun 10 '13 at 11:43
  • 1
    how to make the db full text indexed? – vijay Jun 17 '13 at 09:16
  • In the Notes client open database properties. There go to Full Text (second last) tab. Click on "Create Index" button. – Naveen Jun 17 '13 at 09:29
  • 1
    Thanks naveen. Where did you learn xpages from? – vijay Jun 17 '13 at 09:52

1 Answers1

1

Naveen's almost certainly spot on, that the database is not full text indexed. Check the \data\IBM_TECHNICAL_SUPPORT folder on the server, for the latest modified file starting xpages_exc_###. This will give the full detailed error, including the stack trace. The XPages Log Reader project on OpenNTF can be used to view those files from a browser.

I'd recommend using sessionScope instead of requestScope for the search value. If you use requestScope, it's only available during that partial refresh. So when the user uses a pager or opens a document and goes back to the view, the requestScope variable is null again, so the search criteria are lost.

Paul Stephen Withers
  • 15,699
  • 1
  • 15
  • 33