Hi Steve,

I'm not aware of any way to do this but you may want to take a look at
the Block and RenderBlock components. You can define blocks that use
different components, then dynamically pick which block to render with
RenderBlock.

HTH

Ben

-----Original Message-----
From: Stephen Todd [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 28, 2005 3:26 AM
To: [email protected]
Subject: dynamically specifying component type

I'm trying to specify which component to use dynamically, but I think 
what I want to do is outside of conventions. I wanted to do something 
like the following.

in the .html

<span jwcid="area"/>

in the .jwc

<component id="area" type="ognl:componentType"/>

and in the .java

public String getComponentType() {
    // some code
    return "@" + componentType; // ie. MyCoolArea
}

(This isn't the real code)

I know I could just line up a bunch of if's but that seems wrong and 
inefficient. I know in the example above that it is trying to find 
'componentType' in the namespace 'ognl', but I really just want to pass 
a string to specifiy the component.

Thanks,

Steve

---------------------------------------------------------------------
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