joins with x-applicatio

X-Application Version: 3.1.2, 3.1.1
Tamino Version : 3.1.1
Platform : win 2k SE
WebContainer : Tomcat 3.3
JDK Version : 1.3.1

Hi, I’ve got a problem with joins.
I need to display a list of products on an invoice, but on the invoice document there are stored only the product’s ids so I need to retrieve all the fields of the product and displaying them while i browse the invoice document.
I’ve defined an object-ref node (dereference=true) on the product id on the invoice document and I’ve tested the joins on Interactive Interface… it works fine
The point is: inside the browse tag I put a loop tag to show all the products, but when I use the display tag using the select field to execute the join all I succeed in having printed is the whole product element using rawcontent =“true”. This way I am compelled to show fields which should not be shown on that page… If i try to address the fields of the product specifying the exact path I have no result.
i.e. invoice(…,products,…)
products(product,quantity)
<bdm:loop … iterate=“products” select="/invoice"…>
<bdm:display select="/invoice/product" “rawcontent=true”>

this gives me the whole content of product (name,descriptio,costs…).

if I try:
<bdm:display select="/invoice/product/product/name">
I have a warning from tomcat which says I’m addressing a not existing path…
The same resul for
<bdm:display select="/invoice/product/name">

Anybody knows if this a limitation of X-application of if it’s me who’s making some mistakes?
Any other way to implement this is obviously appreciated.
Thank you
Paolo

Hello,

your problem could be,


  • that your loop expression is not correct. I don?t know your schema. Based on the description of your problem it may look like this (DTD notation):





    In this case your loop tag should be
    <bdm:loop … iterate=“product” select="/invoice/products"…>

  • that you are using absolute paths for the select expressions of the display tags. Within a loop context, you should use relative paths.

    <bdm:loop … iterate=“product” select="/invoice/ products"…>
    <bdm:display select="./name"/>

    </bdm:loop>

    Within a loop context, the path expression for display and edit tags starts from the node which is iterated. In this case the product node.


If this does not solve your problems with the loop tag, post your schema to the community. Then, we will try to reproduce and analyze your problem for giving you a better description who solve it.

Bye,
Christian.