Hi, thinking of the #1 mantra in tapestry "static structure, dynamic behavior", I guess you need to look for another approach.
Try adding the mixin to your component, not to the component inside of the component. Maybe you need to change your implementation a bit (passing some parameters) but it should work without an additional if clause. Cheers Christian Am 09.03.2012 um 17:00 schrieb Brian Long: > Hi all, > > have a problem that seems easy to resolve but I'm making hard work of > it, was hoping someone here can help me out. I have a simple component > I want to use on different pages in my application, and there's a > mixin associated with the select component in this simple component, > but I want to use a different mixin depending on which type of page > the component is located. > > so I have in my component.tml > > <t:label t:for="residentFeeInquiry" id="resident-label"/> > <t:select t:id="residentFeeInquiry" > t:validate="required" t:value="residentFeeInquiry" > t:model="senderHasIdSelectModel" t:encoder="senderHasIdValueEncoder" > t:mixins="mixin" > t:blankOption="always" > t:blankLabel="message:PLEASE_SELECT" t:label="message:RESIDENT" > tabindex="${getResidentTabIndex()}"/> > > and in my component.java > > public String getMixin() { > if (getContainer() instanceof SendMoneyTransfer) { > return "feefromresidentupdater"; > } > return "singlesourceformfieldupdater"; > } > > getting "Unable to resolve 'mixin' to a mixin class name". Have tried > prop:mixin, ${mixin}, ${prop:mixin} etc. to no avail, would like to > avoid having multiple select components with different mixins and an > if else(s) if possible? > > Thanks for listening! Brian. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org