Hi Programoz�s,

what you are doing in the second case is correct. You access the page components via the Page components property. This returns a map, so to access the actual component you specify its name, then you access the property of the components.

page.components.[component name].[property name]

See IPage implements IComponent which has a getComponents() method.

Regards Malcolm

From: Programoz�s <[EMAIL PROTECTED]>
To: "Tapestry Developer" <[EMAIL PROTECTED]>
Subject: [Tapestry-developer] Conditional problem
Date: Sun, 17 Nov 2002 23:26:26 +0100

Hello!

I have a page with a component in it. The page has a persistent property 'openedFolderId' which I would like to use in the component definition. The component has a property named 'folder'.
If I write in the component definition:

<component id="ifFolderOpened" type="Conditional">
<binding name="condition" expression="page.openedFolderId == folder.id"/>
</component>

then I get an exception:

ognl.NoSuchPropertyException
folder


BUT if I write:

<component id="ifFolderOpened" type="Conditional">
<binding name="condition" expression="page.openedFolderId == page.components.categories.folder.id"/>
</component>

where 'categories' is the name of my component in the page definition then it works!

Help me, what am I doing wrong?
Thanks,
Norbi

_________________________________________________________________
Broadband?�Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to