Typically, if you want to add a dynamic number of components or the type of
component is based on some data and you're not talking about the @If and
@For situations, you use @Blocks for that.  In Trails, we have "editor
blocks" defined on another page.  Then, based on the property type, we
choose which block to display (show the checkboxEditor for boolean
properties).

-----Original Message-----
From: Rudolf Baloun [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 02, 2006 5:22 AM
To: Tapestry users
Subject: Re: Dynamic pages

Hi Peter,

here is the easiest solution:
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/If.html

put in your page something like this:

<span jwcid="@If"  condition="ognl:theCondition">
    ....
</span>
Now you got to implement the "isTheConditon()" in your java-code (in the 
Page).



Dynamic number of components:
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/For.html



I dont know if it is what you want to know.
Look in the componentreference.....


Rudolf B.



Peter Verhoye wrote:
> Hi all,
>
> It happens sometimes that I'm starting to think of new interesting
> projects to create myself. Since I've recently discovered Tapestry, I
> wanted to do something with it. However, I have a problem for which I
> haven't found a solution yet.
>
> Let's say you have a page on which you want to display a non-predefined
> number of components and that the location for them on that page is not
> defined also.
>
> I guess the later you could do by somehow changing the css style of the
> page at runtime.
>
> But how would you do the former? Is it possible to dynamically add
> components to a page?
>
> Any help or discussion would be greatly appreciated :-)
>
> BB
> Peter
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to