THANKS!
Yea that works... That gives me a lot of new material to study.
> What's with the "ifTextField" component ... will it actually be conditional in the future?
This DynamicProperty component actually will display the property value using different methods: plain edit text box, option list box, or check box. Each property can specify with an attribute which way is preferred.
Thanks a lot
Jean
P.S. I find this platform to be a real great achievement.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: mardi, 8. octobre 2002 18:32
To: Tremblay, Jean
Cc: [EMAIL PROTECTED]
Subject: Re: [Tapestry-developer] Newbe question concerning Component
Parameters
You are very close.
What you are trying to do is get the value property of
your instance of mypack.DynamicProperty, passed in as
parameter "property".
However, "property.value" is not the exact name of a
parameter, simply "property" is ... but that's the
instance, not the instance's value property.
Switch to
<binding name="text"
expression="bindings.property.object.value"/>
The means, go to the bindings Map, extract the IBinding
for "property", get the IBinding's object property (the
mypack.DynamicProperty instance), and the value of the
instance.
P.S. I would have named the component "inputValue"
since that's what it does. What's with
the "ifTextField" component ... will it actually be
conditional in the future?
--
[EMAIL PROTECTED]
http://tapestry.sf.net
> Hi,
>
> I am developping my first component and I am struggling to pass a parameter
> to it.
>
> I am using something like this in my jwc file
>
> ...
> <component-specification class="net.sf.tapestry.BaseComponent"
> allow-informal-parameters="no">
> <parameter name="property" java-type="mypack.DynamicProperty"
> required="yes"/>
>
> <component id="ifTextField" type="Conditional">
> <field-binding name="condition" field-name="Boolean.TRUE"/>
> </component>
>
> <component id="insertTextField" type="TextField">
> <inherited-binding name="text" parameter-name="property.value"/>
> </component>
> ...
>
> In my class DynamicProperty I have defined a method " public String
> getValue()"
>
> I always receive this error!
>
> net.sf.tapestry.PageLoaderException Required parameter text of
> component DynamicPropertyPage/valueField.insertTextField is not bound.
> component:
> net.sf.tapestry.form.TextField@f4e6d[DynamicPropertyPage/valueField.insertTe
> xtField] pageName: DynamicPropertyPage Stack Trace:
> * net.sf.tapestry.pageload.PageLoader.bind(PageLoader.java:241)
> * net.sf.tapestry.pageload.PageLoader.setBindings(PageLoader.java:543)
> -------------------------------
> I have been trying to do like the examples do, but they are all using String
> or boolean as parameters.
> Can you please help me to figure out what I am doing false?
> Thanks a lot
>
> Jean
>
>
>
>
