item.add(new AttributeModifier("attr", true, "value"));dataview#oncomponenttag doesn't do anything since the dataview repeats its markup with a listitem. the list item#oncomponenttag actually receives the markup tag. Martijn On Thu, Dec 16, 2010 at 10:04 PM, Matt Schmidt <[email protected]> wrote: > I'm trying to modify an attribute on the HTML element that goes with my > DataView: > > HTML > <div wicket:id="dataview" id="dynamic"> > <span wicket:id="myLabel" /> > </div> > > JAVA > new DataView<POJO>("dataview", dataProvider) { > protected void populateItem(Item<POJO> item) { > item.add(new Label("myLabel", item.getModelObject().getValue())); > } > protected void onComponentTag(ComponentTag tag) { > super.onComponentTag(tag); > tag.put("id", "dynamicValue"); > } > } > > I thought this would do it, but I never even hit DataView.onComponentTag(). > Any other suggestions? > > -Matt > -- Become a Wicket expert, learn from the best: http://wicketinaction.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
