Hi folks,
I've learned a lot from this list as I've tried to get the hang of
Tapestry. Thank you very much!
I'm afraid I've got another rank beginner question. I want to use the
contrib library component FormConditional. When I include it with
<div jwcid="FormConditional" condition="ognl: productTypeChosen">
I get the following error:
Could not parse template context:/BenefitPlans.html.
Tag <div> on line 44 references unknown component id 'FormConditional'.
If I try
<div jwcid="@FormConditional" condition="ognl: productTypeChosen">
I get
Component 'FormConditional' not found in application namespace.
As a guess I've tried
<div jwcid="contrib:FormConditional" condition="ognl:
productTypeChosen">
but get this:
Could not parse template context:/BenefitPlans.html.
<div> on line 44 contains an invalid jwcid 'contrib:FormConditional'.
In my application file I have this:
<library id="contrib"
specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
But I just don't know how to use it. I'm sure this is something simple,
but I'm banging my head against the wall, and the online documentation
seems to be in flux while the 4.0 docs supplant the 3.0.3 ones, so
Google is less helpful than usual.
That's the immediate question, and I would appreciate any help. Below I
describe what I'm doing; if there is a better way to do this than with
FormConditional, please let me know.
This page lets the user choose to download documents related to products
sold by vendors. The screen should work as follows: on first entering
the screen, the user is presented with a drop-down list of product
types. On selecting one of these, the user is sent back to the page
with that choice selected and another dropdown listing the companies
that offer products of that type. When that is selected, there is
another dropdown for specific products and finally a list of documents
related to that product. Each choice already made is kept visible in a
dropdown list (and stored in the Visit for subsequent views of the
page.) The user can always change anything higher up the hierarchy and
see the next choice re-filtered.
I would like to do this on a single page to avoid repetition, but I
don't want to display lower-level dropdowns until higher-level choices
are made. I tried to do this with simple @Conditional elements, but I
got a Stale Link error because the new dropdown wasn't bound in the
first view of the page. It looks as though FormConditional should bind
these items to hidden field elements until the condition is satisfied.
Is this an appropriate way to do this with Tapestry? I suppose I could
maintain my own hidden value inside a @Conditional, but I would think
that the conrib component would be a better idea.
Thanks for any suggestions,
-- Scott Sauyet
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]