You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joe Andolina <jo...@andomation.com> on 2004/06/01 01:08:23 UTC
DirectLink and InheritedBindings
Hello,
I have a direct link that takes two params. One is the index from a
loop and the other is a parameter passed to the component. Both values have
corresponding attributes in the components java class, but the value that I
am expecting to be passed in is not mapping to the passed value when the
link is drawn.
<parameter name="media" required="yes" />
<component id="link" type="DirectLink">
<inherited-binding name="listener" parameter-name="handler" />
<binding name="parameters" expression="{media,currLink}" />
<binding name="disabled" expression="itemLinkDisabled" />
</component>
'media' is always 0 in the link. I can output it to the page and it has the
passed value. Why is it that when I try to use media in my direct think it
is always 0? Is my syntax for 'parameters' wrong?
Joe
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: DirectLink and InheritedBindings
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
You are not specifying a direction for your media property, therefore it is not connected. That is
the root of your problems; make the property abstract and use direction="in".
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: Joe Andolina [mailto:joe@andomation.com]
> Sent: Monday, May 31, 2004 7:08 PM
> To: 'Tapestry users'
> Subject: DirectLink and InheritedBindings
>
>
> Hello,
> I have a direct link that takes two params. One is the
> index from a
> loop and the other is a parameter passed to the component.
> Both values have
> corresponding attributes in the components java class, but
> the value that I
> am expecting to be passed in is not mapping to the passed
> value when the
> link is drawn.
>
> <parameter name="media" required="yes" />
>
> <component id="link" type="DirectLink">
> <inherited-binding name="listener" parameter-name="handler" />
> <binding name="parameters" expression="{media,currLink}" />
> <binding name="disabled" expression="itemLinkDisabled" />
> </component>
>
> 'media' is always 0 in the link. I can output it to the page
> and it has the
> passed value. Why is it that when I try to use media in my
> direct think it
> is always 0? Is my syntax for 'parameters' wrong?
>
> Joe
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Parameter Passing and Accessing
Posted by Joe Andolina <jo...@andomation.com>.
Okay okay,
Forget all my posts about images and the like. Its my poor knowledge
of haw parameters are passed that is the problem. For a given component I am
passing a value 'media'. When I try to output the value as:
<span jwcid="@Insert" value="ognl:media"/>
I get the default value specified in the class. When I output the value via
a named component I get the proper passed value.
<span jwcid="tester"/>
This poses me with a problem because whenever I try to access the value
inside my class I am getting the default value. Is there any way to sync up
these two values?
Joe
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org