Hi,

One way is to contribute some JavaScript to change the attributes of the
parent element.
The "Wicket way" is to bind the parent element to a Wicket component, as
Francois showed in his example. If you want to spend the typing for such
extra components then you may want to use Wicket-Bootstrap integration
project (https://github.com/l0rdn1kk0n/wicket-bootstrap) that provides a
smarter ControlGroup component (
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/master/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/form/ControlGroup.java?source=cc
)


On Tue, Jun 18, 2013 at 11:29 PM, neilbennett <[email protected]>wrote:

> Hi,
>
> I have a number of RequiredTextField components on a form. I am using
> Twitter Bootstrap for CSS. On the form it switches between view and edit
> modes. In order to display a required border on the field I need to have:
>
>
>
> But in view mode I need:
>
>
> However I can't find how to modify the parent div tag while processing the
> form. Possibly with panels for both types of field? That seems to be a lot
> of code for just one change to the markup though. I'm pretty new to wicket
> so any help is appreciated.
>
> Thanks,
>
> Neil
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Modifying-components-parent-css-tp4659610.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]
>
>

Reply via email to