Hi, I think it is OK to remove 'final' from TextArea's #onComponentTagBody(). Please file a ticket. About the other problem - you cannot just skip Java components when there are HTML elements for them. You either have to use some Panel that shows the read-only version of the radio group, or you need to use "empty" Java components, like WebMarkupContainer/WebComponent, i.e. a Java component that won't render anything but will just fulfil the need of a Java component in the hierarchy.
Martin Grigorov Wicket Training and Consulting On Thu, Mar 20, 2014 at 7:27 PM, Entropy <[email protected]> wrote: > Of course the instant I submit the question, I thought of something else to > try. I stopped overriding onComponentTag and changed the body to: > > @SuppressWarnings("unchecked") > public void onComponentTagBody(final MarkupStream markupStream, > final > ComponentTag openTag) { > if (!isEnabledInHierarchy()) { > replaceComponentTagBody(markupStream, openTag, > convertValueToRender((T)getDefaultModelObject())); > } > super.onComponentTagBody(markupStream, openTag); > } > > it turns out the prior error was when the item was enabled. The super lets > me get past the enabled phase and to when it is disabled. At which point > the below error happens. This error is much more to the point. It doesn't > like that I have children and am erasing my body. But that's actually what > I want to do. How can I tell wicket that I really do want that? > > And of course the TextArea question still stands. > > This results in > org.apache.wicket.markup.MarkupException: Expected close tag for > '<wicket:container wicket:id="myRadio">' Possible attempt to embed > component(s) '<input wicket:id="myRadioYes" type="radio" name="adtype"/>' > in > the body of this component which discards its body > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Show-textfield-as-plaintext-when-disabled-tp4664723p4665062.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
