You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Moritz Gmelin <mo...@gmx.de> on 2006/11/01 22:06:48 UTC
Dynamic components from database
Hi,
I'd like to create a tapestry page that contains component based on
the user's settings that are stored in a database. So components
should be created dynamically.
There are many postings that suggest usage of RenderBody /
RenderBlock combinations or usage of @If conditions.
I don't like this Idea because this looks not very flexible.
Is this something that is not possible at all (or not suggested) with
tapestry?
Is the @Delegator component a way to go ?
How can I create a concrete instance of an abstract BaseComponent
subclass ?
Thanks for any clues.
Moritz Gmelin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic components from database
Posted by Moritz Gmelin <mo...@gmx.de>.
Found this
http://examples.mjhenderson.com/DynamicBlockT4/app
That's what I was looking for
M.
Am 02.11.2006 um 10:03 schrieb Moritz Gmelin:
> OK,
>
> it does work with the @Delegator component but you must have all
> possible components somewhere in your page (hidden inside a @Block
> component to prevent rendering).
>
> The @Delegator component can then call a method in your class to
> get the component (by name) that should appear at that position.
>
> But actually, I think this is just as good as using RenderBlock /
> Block components.
>
> M.
>
> Am 01.11.2006 um 22:39 schrieb Matt Kerr:
>
>> In WebObjects, I think this is the WOSwitchComponent -
>> where you can specify the component name to be rendered/
>> substituted as a binding.
>>
>> I don't believe such a dynamic component exists in Tapestry.
>>
>> (In 3.x) I've resorted to @If / @If / @If .. to implement solution
>> (bleh).
>>
>> I didn't try @Delegator.
>>
>> Please share if you find a smoother solution.
>>
>> Thanks-Matt
>>
>>
>> On Nov 1, 2006, at 16:06 , Moritz Gmelin wrote:
>>
>>> Hi,
>>>
>>> I'd like to create a tapestry page that contains component based
>>> on the user's settings that are stored in a database. So
>>> components should be created dynamically.
>>> There are many postings that suggest usage of RenderBody /
>>> RenderBlock combinations or usage of @If conditions.
>>> I don't like this Idea because this looks not very flexible.
>>> Is this something that is not possible at all (or not suggested)
>>> with tapestry?
>>> Is the @Delegator component a way to go ?
>>>
>>> How can I create a concrete instance of an abstract BaseComponent
>>> subclass ?
>>>
>>> Thanks for any clues.
>>>
>>> Moritz Gmelin
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic components from database
Posted by Moritz Gmelin <mo...@gmx.de>.
OK,
it does work with the @Delegator component but you must have all
possible components somewhere in your page (hidden inside a @Block
component to prevent rendering).
The @Delegator component can then call a method in your class to get
the component (by name) that should appear at that position.
But actually, I think this is just as good as using RenderBlock /
Block components.
M.
Am 01.11.2006 um 22:39 schrieb Matt Kerr:
> In WebObjects, I think this is the WOSwitchComponent -
> where you can specify the component name to be rendered/substituted
> as a binding.
>
> I don't believe such a dynamic component exists in Tapestry.
>
> (In 3.x) I've resorted to @If / @If / @If .. to implement solution
> (bleh).
>
> I didn't try @Delegator.
>
> Please share if you find a smoother solution.
>
> Thanks-Matt
>
>
> On Nov 1, 2006, at 16:06 , Moritz Gmelin wrote:
>
>> Hi,
>>
>> I'd like to create a tapestry page that contains component based
>> on the user's settings that are stored in a database. So
>> components should be created dynamically.
>> There are many postings that suggest usage of RenderBody /
>> RenderBlock combinations or usage of @If conditions.
>> I don't like this Idea because this looks not very flexible.
>> Is this something that is not possible at all (or not suggested)
>> with tapestry?
>> Is the @Delegator component a way to go ?
>>
>> How can I create a concrete instance of an abstract BaseComponent
>> subclass ?
>>
>> Thanks for any clues.
>>
>> Moritz Gmelin
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamic components from database
Posted by Matt Kerr <ma...@centralparksoftware.com>.
In WebObjects, I think this is the WOSwitchComponent -
where you can specify the component name to be rendered/substituted
as a binding.
I don't believe such a dynamic component exists in Tapestry.
(In 3.x) I've resorted to @If / @If / @If .. to implement solution
(bleh).
I didn't try @Delegator.
Please share if you find a smoother solution.
Thanks-Matt
On Nov 1, 2006, at 16:06 , Moritz Gmelin wrote:
> Hi,
>
> I'd like to create a tapestry page that contains component based on
> the user's settings that are stored in a database. So components
> should be created dynamically.
> There are many postings that suggest usage of RenderBody /
> RenderBlock combinations or usage of @If conditions.
> I don't like this Idea because this looks not very flexible.
> Is this something that is not possible at all (or not suggested)
> with tapestry?
> Is the @Delegator component a way to go ?
>
> How can I create a concrete instance of an abstract BaseComponent
> subclass ?
>
> Thanks for any clues.
>
> Moritz Gmelin
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org