Quoting Skorpien126 <[EMAIL PROTECTED]>:

> In another Component I read the array. This one should entry a the
> Non-worker component or the Worker-Component for each object depending on
> which object i want to visualize. Is there a way realize that?!?!

You can use the If component to choose how to display something.
Assuming your Person Class has a method isWorker() that is true
iff the person instance is a worker and your component stores a
Person instance in a component property called person, you can
write the following in the html template (untested code follows):

<span jwcid="@If" condition="ognl:person.worker">
  <span jwcid="@WorkerDisplayComponent" worker="ognl:person">
</span>
<span jwcid="@Else">
  <span jwcid="@NonWorkerDisplayComponent" nonWorker="ognl:person">
</span>

WorkerDisplayComponent here is a component that has a parameter
worker and NonWorkerDisplayComponent is a component that has a
parameter nonWorker.

HTH

Ciao Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to