[email protected]
[Top] [All Lists]

Re: Accessing a component property from html page

Subject: Re: Accessing a component property from html page
From: Andreas Andreou
Date: Thu, 02 Jun 2005 16:42:28 +0300
Yes, it's null...
Do a

<span jwcid="@Insert" value="ognl:page.components"/>

to see which components are there...

Do you add these 2 components into the page directly?
or do you add a Border component into your page and then add those 2 components into the Border...

page.components only returns components directly added to the page

There's a getNestedComponent(String path) to get a nested component, i.e.

It should work...

Paul Woodward wrote:

I get no output from the insert at all - so it's null?

On 6/2/05, Andreas Andreou <[email protected]> wrote:
From the Exception thrown, it seems that

ognl: page.components.holdingQuantityPie

returns null, but I can't figure why, since your code seems correct.

Can you confirm this? i.e. instead of HoldingChart, add a
<span jwcid="@Insert" value="ognl:page.components.holdingQuantityPie"/>

Paul Woodward wrote:

Hi all,
I'm somewhat new to tapestry so apologies if this is obvious:
I have a squisher component which hides and shows its body. The squisher
has zoom buttons that adjust a member property called size:
<property-specification name="size" type="int" initial-value="200"
I want to be able to pass the size property to a subcomponent so that
affect the way it renders. This is what I have tried:
<div jwcid=*"[email protected]"* title="Holding Quantities

<span jwcid=*"@HoldingChart"* user="ognl:page.visit.user" chartType=
"holdingQuantityPie" title="Holding quantities" size="ognl:

Which gives the error:
org.apache.tapestry.BindingException Unable to resolve expression '
page.components.holdingQuantityPie.size' for
[email protected][Home]. binding:
page.components.holdingQuantityPie.size] location:
line 68
ognl.OgnlException source is null for getProperty(null, "size")
Can anyone tell me the correct way to do this?
(Using Tapestry 3.03)

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

[email protected]----
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>