Am Dienstag, 21. Februar 2006 12:30 schrieb Izak Wessels: > Hello all, > > If I have a custom component that gets called if a condition is true and > all of it is inside a for loop, can I pass > a different parameter to the custom component each time i go through the > loop? > > Regards, > > -- Izak
hi yes you can. add a parameter to your custom component in the .jwc-file (e.g. an ID) <parameter name="id" required="true" /> or in your component-class (with java1.5 annotations) @Parameter(required = true) public abstract int getId(); public abstract void setId( int id ); and use it in your loop <span jwcid="@For" ..> <span jwcid="MyComponent" id="ognl:currentID" /> </span> note: if you try to pass objects to the component, make them serializable. greets lukas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
