Hi,
Been trying to use list builder for selection of a bunch of EUROSTAT Combined Nomenclature codes.
So far I am able to build hierachical lists that start at 2 digits, expand to 4 depths
e.g
01 LIVE ANIMALS
0101 LIVE HORSES, ASSES, MULES AND HINNIES
010110 PURE-BRED BREEDING HORSES AND ASSES
01011010 PURE-BRED BREEDING HORSES
010111 PURE-BRED BREEDING HORSES
0102 LIVE BOVINE ANIMALS
02 MEAT AND EDIBLE MEAT OFFAL
My problem is that only the last items selected are returned to the query page. What I would like to do is to be able
to traverse/expand and collapse the lists and when done, send all selections back to the query page.
I've tried using export_vars to the "/products/" page, but it doesnt work..
I've added actions/bulk_actions and I send the selections back to the originating query page, it only sends the last selection...
here's where I'm at
ad_page_contract {
} {
{product:multiple,optional ""}
{depth:optional "0"}
}
set title "<b><a href=\".\">MESSAGE KEY MISSING: 'products.title'</a></b>"
if {$product == ""} {
set depth [expr $depth + 2]
db_multirow nc_cats nc_cats_query {
select product,descr
from nc
where length(product)=:depth
order by product
}
} else {
append title " | <b>$product</b>"
set depth [expr $depth + 2]
db_multirow nc_cats nc_cats_query {
select product,descr
from nc
where length(product)=:depth
and
product ilike :product || '%'
order by product
}
}
set actions [list "Back to Query" "/balance/nc/yearly-data-multi/" "Add product and return to query" "Add product" "/products/" "Add product"]
template::list::create \
-name nc_cats \
-multirow nc_cats \
-key product \
-actions $actions \
-elements {
product {
label "NC code"
display_col product
link_url_col item_url
}
link {
sub_class narrow
display_template {
<img src="/shared/images/Open16.gif" height="16" width="16"
border="0">
}
link_url_col edit_item_url
link_html { title "MESSAGE KEY MISSING: 'db.step_in'" }
}
descr {
blah......
Would appreciated any help....
regards,
nikos