webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  mingled query results

    Posted Fri June 06, 2003 06:17 PM

    Hi,

    I have a setup in which the first query (Q1) is carried by the tamino form elements as below





    The results of this query are shown on another page R1, the number of results instances on page is 3 so there can be many pages, for which i have navigation using bdm:browsenavigation element.

    Clicking on any result carries out another search to display more details (detail result page R2) about the instance. This query is carried out using
    bdm:directcommand element ( I use a different module id here).

    The problem is that after doing the second query (to get result instance details), the next page (containing results 4to 6 )from orignal result page R1, shows the second query result.

    I am not sure how to tackle this, i have tried to open the second result page in a new window , how ever i think the query is bound by the session (rightly so).

    Any help will be appreciated.

    regards
    ~amit

    X-Application Version: 3.1.3
    Tamino Version : 3.1
    Platform : Solaris, Linux, …
    WebContainer : Tomcat 4.1.1
    JDK Version : 1.4.1


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: mingled query results

    Posted Tue June 10, 2003 08:24 AM

    Hello,

    Are you using the attribute ‘document’ within your action / directcommand tags?

    When you query the result set for the browse page (R1), you can define a name to register the result set.

    <input type="text" name="titleContent" />
    ...
    <xapp:action type="query" schema="entry" arg="entry[//title ~= '${titleContent$}']"
    document="docList">
    <input type="submit" value="SEARCH"/>
    </xapp:action>
    </pre><BR><BR>Using the action tag to define a query was a new feature of X-Application version 3.1.3.<BR><BR>For displaying the result use the reference to the document set '<B>docList</B>'.<BR><BR><pre class="ip-ubbcode-code-pre">
    ...
    <xapp:browse document="docList" targetdocument="selectedDoc">
    ...
    </xapp:browse>
    </pre><BR><BR>When a document is selected it is registered by the value of the <B>targetdocument</B> attribute.<BR><BR>You can define your second query (directcommand) referencing the document with the name 'selectedDoc'.<BR><BR><pre class="ip-ubbcode-code-pre">
    <xapp:form document="selectedDoc">
    <xapp:setvar name="detailQuery">
    <%-- define your query here --%>
    </xapp:setvar>
    <xapp:directcommand type="read" arg="${detailQuery$}" schema="entry"
    document="detailDoc" />
    <%-- via this directcommand you read another document that is registered
    with the name 'detailDoc' --%> 
    </xapp:form>
    <xapp:form document='detailDoc'>
    <%-- Since you used a 'read' command you can use a xapp:form tag to address the
    document; if you would use a 'query' command you had to use a browse
    tag.
    --%>
    <%-- display R2 here --%>
    </xapp:form>



    I hope, this helps you to solve your problem. For more details, I recommend the chapter ‘Defining and Processing Queries’ for X-Application’s documentation.

    Bye,
    Christian.


    #API-Management
    #webMethods
    #Tamino