Try <div wicket:id="regionOne" class=""> <div wicket:id="regionWidget"></div> </div>
On Sun, Feb 24, 2013 at 2:40 AM, Gonzalo Aguilar Delgado < gagui...@aguilardelgado.com> wrote: > Hello, > > I think I found something that may not be working right. > > I have an html that looks like: > > <div wicket:id="regionOne"> > <div wicket:id="regionWidget"></div> > </div> > > > regionOne will be a listview and regionWidget will be one panel > populated on populateItem. > > > This is how it looks the class that will go to regionOne (listview) > > public class RegionWidgetContainer extends ListView<RegionWidget> { > /** > * > */ > private static final long serialVersionUID = 1L; > final static Logger logger = > LoggerFactory.getLogger(RegionWidgetContainer.class); > private static int regionCounter = 1; > > private int regionIdx=0; > > public RegionWidgetContainer(String id, final Region region, > PageUser > pageUser) { > super(id, new IModel<List<RegionWidget>>(){ > > /** > * > */ > private static final long serialVersionUID = 1L; > > @Override > public void detach() { > // TODO Auto-generated method stub > } > > @Override > public List<RegionWidget> getObject() { > return region.getRegionWidgets(); > } > > @Override > public void setObject(List<RegionWidget> object) { > } > > }); > regionIdx = RegionWidgetContainer.nextCounter(); > buildCssClassAttributes(region,pageUser); > this.setMarkupId("region-" + region.getId() + "-id"); > this.setOutputMarkupId(true); > } > > protected void buildCssClassAttributes(Region region, PageUser > pageUser) > { > String cssClass = "region"; > if(region.isLocked() || !pageUser.isEditor()) > { > cssClass += " region-locked"; > } > > cssClass += " " + > region.getPage().getPageLayout().getCode() + "_" + > String.valueOf(regionIdx); > cssClass += " regionNonDragging"; > > > this.add(new AttributeAppender("class", cssClass)); > } > ... > } > > > > As you can see it will add the class via AttributeAppender and will set > the markup id. > > > But it does not work. Any of two. The div is rendered like this... > > <div> > ... > </div> > > > So, is this a bug or a feature? > > -- Regards - Ernesto Reinaldo Barreiro Antilia Soft http://antiliasoft.com/ <http://antiliasoft.com/antilia>