Did you notice this method in AbstractChoice? protected boolean isDisabled(final Object object, int index, String selected)
It is designed to do exactly what you want. In Wicket 1.3 only, in wicket 1.2 you need to override protected void appendOptionHtml(AppendingStringBuffer buffer, Object choice, int index, String selected) and do it yourself. Maurice On 10/16/07, Jonas <[EMAIL PROTECTED]> wrote: > While implementing a custom IAuthorizationStrategy for our web app, > I noticed that DropDownChoice (and any other AbstractChoice) doesn't > honor restrictions on Component.RENDER and Component.ENABLE. > > Is there a recommended way to make that work? > Wouldn't it make sense that AbstractChoice did honor those restrictions, > as e.g. AbstractLink does? > That would probably require an extension of the IAuthorizationStrategy > interface, since the selectable options are just any kind of objects, > not wicket components. Maybe a method like > boolean isActionAuthorized(Component component, Object item, Action action); > would do the trick? > > > Jonas > > --------------------------------------------------------------------- > 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]
