Well, what would be gained is the flexibility to bind any kind of a form component to a div or a span.
So if your markup is, for example, <input type="text" ../> You do not have a bunch of options as to the type of Wicket Component you can bind to this HTML markup. But if you have, <div wicket:id="component"/> You get a bit more flexibility, in what type of component you can render, TextField, Label, DropDownChoice, Panel etc. Right now, we have the need to bind components (including form based components like TextField) to span's and div's and the way we achieved this was to create new classes that extend Panel and next the actual component. It forces us to create public apis like I described in my original post that break encapsulation. J.D. On 9/21/12 10:42 AM, "Carl-Eric Menzel" <[email protected]> wrote: >On Fri, 21 Sep 2012 14:48:05 +0000 >"Corbin, James" <[email protected]> wrote: >> <input type="text" wicket:id="someId" Š/> >> >> I would like to, instead, specify a span or a div in the markup and >> bind the TextField to that markup instead. > >Why? A TextField needs to bind to an input tag, because that is what >the browser will render as a text field. > >Of course, you could probably override TextField's onComponentTag to >not do the tag type check, if you wanted. Not sure whether that is >final (can't check right now). > >But to be honest, at least right now I'm not seeing what would be >gained. > >Carl-Eric > >--------------------------------------------------------------------- >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]
