Hi I have been using some mechanism in which I generate a list of
dynamic components:

Page containing list of dynamic components:

<span jwcid="@Foreach" source="ognl:page.wpage.components"
value="ognl:row">
        <span jwcid="@RenderBlock"
block="ognl:page.requestCycle.getPage(row.code +
'Edit').components.view" componentId="ognl:row.id"/>
</span>

row.code is the type of component (for instance Paragraph), row.id is
the id of a specific component in this page.

the ParagraphEdit page contains:

<span jwcid="[EMAIL PROTECTED]">
        <span jwcid="@ParagraphView"
componentId="ognl:page.getComponent('view').inserter.getBinding('componentId').object"/>
</span>

Notice how the parameter is passed.

This does not require knowing the components types and allows adding new
ones over the time.

Len

On Tue, 2005-07-26 at 08:43, Henrik wrote:

> Hi
> 
> I have a situation where I have a component that will display certain 
> properties
> for a Section object. In addition it should display a list of items for that
> Section. The items in the list can be of type MultipleChoiceItem or
> TrueFalseItem. I would like from my html page to be able to specify that teh
> Section component should use the MultipleChoiceItem component if the list
> contains multipleChoiceItems or use the TrueFalseComponent if the list 
> contains
> truefalse items. 
> 
> Is it a way to specify components as a parameter in a component 
> specification??
> 
> ex: <span jwcid="@SectionEditor" itemEditor="MultipleChoiceEditor"/> ??? Where
> the MultipleChoiceEditor is a component
> 
> Henrik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to