You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com> on 2002/10/04 19:42:38 UTC
How to synchronize combos ...
Hi!. I continue with this.... :) One of the problems is already solved.
I have a table called "clientsproducts" with 3 keys:
cli_id (Client)
cat_id (Category)
pro_id (Product)
In this example, the pro_id and cat_id are a complex key from the table
"products", because every product has a category. And one category can have
many products.
When I need to create a relation between a client and his products. I need to
know the category of this product. If the cli_id is fixed (the user already
selected a client in the last page then comes to this pages), then I need to
make the following behavior:
A) If the user select a product, then I need to select the category in the
combobox.
B) If the user selects a category, I need to refresh the combo of products, to
show only the products of this category.
As you can see I have two combos.
The point (B) Is done:
I made a "refresh" botton. When the user press this botton, the page send a
parameter called cat_id with the "cat_id" value from the combo "category".
When the same page is redone, it catch this parameter "category" and filter
the query of the "product's combo" based on the parameter "cat_id".
But, in the case (A), I cannot get the "cat_id" based on the "pro_id"
parameter of the request without make a query before all the procedure B
based on the parameter "pro_id" (This is what I dont want to do. If there is
another way to do that, please help me.
The queries runs with XSP.
Antonio Gallardo
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>