Yes, it works. Thanks a ton.
I have another DirectLink component in the spec. But I just can't seem
to link it to the page containing the component. The exception report
indicates that it can't find the listener in the component. I know it
is not there because that's not what I want it to be; it should go and
look for the listener created in the page that called the component.
Would you show me how to do it again?
waimun
On 8/31/05, Robert Zeigler <[EMAIL PROTECTED]> wrote:
> So, your component needs to render something within an insert, right?
> But the value to render isn't known by the component; rather, it's
some
> property of the page. So, in your component, you'd do (tapestry
3.0.3):
>
> <parameter name="renderString" direction="in" required="yes"
> type="java.lang.String"/>
>
> In your component template you'd do:
> <span jwcid="@Insert" value="ognl:renderString"/>
>
> And in your page you'd do something like:
>
> <span jwcid="@MyCustomComponent" renderString="ognl:pageProperty"/>
>
> Where pageProperty is the property name to render on the page, and
> renderString can be whatever name makes sense for your component.
>
> Robert
>
> Waimun Yeow wrote:
> > I tried the page.<property> but did not work. Would you show me how
you
> > would accomplish it via component parameter?
> >
> > Tks.
> >
> > waimun
> >
> > On 8/30/05, Robert Zeigler <[EMAIL PROTECTED]> wrote:
> >> Hm. Well, this really sounds like a good candidate for a
> >> component-parameter. :)
> >> But... as long as you can guarantee that the property will exist...
> >> you can do something like:
> >>
> >> ognl:page.<property>
> >>
> >> getPage() returns the containing page. Note that if you use
complex
> >> block/render-block schemes (where the block is placed on one page
but
> >> contained within a different page), this can lead to unexpected
results
> >> (getPage() will return the page which contains the block, and NOT
the
> >> page currently doing the rendering). Again... /generally/
speaking,
> >> you'd be better off making this a component parameter.
> >>
> >> Robert
> >>
> >> Waimun Yeow wrote:
> >> > Hi folks,
> >> >
> >> > I have a component specification .jwc with a component of type
Insert.
> >> > The binding expression needs to reference to a page property
value that
> >> > called it. For example, by random, if page A include this
component,
> >> > then the Insert component will need to read page A property via
ognl
> >> > thru binding expression attribute.
> >> >
> >> > Any hints? Thanks a lot.
> >> >
> >> > --
> >> > waimun
> >> >
> >> >
> >> >
---------------------------------------------------------------------
> >> > To unsubscribe, e-mail:
[EMAIL PROTECTED]
> >> > For additional commands, e-mail:
[EMAIL PROTECTED]
> >>
> >>
> >>
---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> >> For additional commands, e-mail:
[EMAIL PROTECTED]
> >>
> >>
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
[EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]