Our customer should be able to place a component in any of the available page templates. He has no access to the Page classes. The component works as a loop component but instead of providing a list of elements to the component, the user has to provide a query string and the component uses an injected service to get the list. The customer will write the body part of the loop on his own but he needs a loop variable to access the properties of the elements.
For example: <t:ProductLoop t:id="cheapestProducts" t:query="cheapest products" t:value="product"> <a class="small_pic" ><img src="${product.image}" /></a> </t:ProductLoop> One solution is to implement a setProduct() and getProduct() in every page but I'm looking for a solution that is independent of the page. Thomas Am Samstag, 11. August 2007 22:34 schrieb Davor Hrg: > please elaborate your use case a bit more, > maybe an alternative will be sufficient. > > Davor Hrg > > On 8/11/07, Thomas Beckmann <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm looking for a way to access a component variable the same way as a > > page > > variable. > > So for example when using a loop component I want to provide a setter > > and getter of a component as the loop value instead of a setter and > > getter of the > > page. > > I want to implement a component that works as a loop but provides a list > > of > > elements on it's own. I want to use this component on any page without > > the need to implement a loop value on each page. > > > > I tried value="component:someComponent.someMethod" but got an error > > telling > > that there is no such component. > > > > Any ideas? > > > > Thanks > > Thomas > > > > --------------------------------------------------------------------- > > 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]