Thank you ... it worked perfectly!!
Newgro wrote: > > There is some code in the AbstractChoice class from which DDC is > inheriting. > > /** > * Gets whether the given value is disabled. This default > implementation always returns false. > * > * @param object > * The object to check > * @param index > * The index in the choices collection this object is in. > * @param selected > * The currently selected string value > * @return Whether the given value represents the current selection > */ > protected boolean isDisabled(final E object, int index, String > selected) > { > return false; > } > > And if i check the method > protected void appendOptionHtml(AppendingStringBuffer buffer, E choice, > int index, > String selected) > which is called by > protected void onComponentTagBody(final MarkupStream markupStream, final > ComponentTag openTag) > which is called in rendering process > > i can see that this is adding disabled = disabled if this method returns > true. > > So you could overwrite the isDisabled method of your ddc and return true > for the appropriate object or index or selected. > > PS: Answer is based on 1.4.2 > > Cheers > Per > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://old.nabble.com/disable-a-DropdownChoice-item-tp27831690p27839560.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org