got it :) thanks
Eyal Golan [email protected] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Nov 16, 2009 at 5:43 PM, Igor Vaynberg <[email protected]>wrote: > this will get you most of the way there > > > http://wicketstuff.org/wicket14/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.OIRPage > > -igor > > On Mon, Nov 16, 2009 at 7:04 AM, Eyal Golan <[email protected]> wrote: > > Hello, > > we have a DataTable with one column that holds a fragment. > > In that fragment we put an AjaxLink: > > @Override > > public void populateItem(Item item, String componentId, IModel > > model) { > > CampaignEntity entity = (CampaignEntity) > model.getObject(); > > Fragment frag = new OwnerLinkFragment(componentId, > > FirstEntitiesListInnerPanel.this,entity); > > item.add(frag); > > } > > > > private final class OwnerLinkFragment extends Fragment { > > private static final long serialVersionUID = 6949616729209808580L; > > > > public OwnerLinkFragment(String id, MarkupContainer > markupProvider, > > final CampaignEntity entity) { > > super(id, "linkFragment", markupProvider); > > AjaxLink link = new AjaxLink("link", new > > Model(entity.getDisplayName())) { > > private static final long serialVersionUID = 1L; > > > > @Override > > public void onClick(AjaxRequestTarget target) { > > itemClickProducer.itemClicked(entity, target); > > } > > }; > > add(link); > > } > > > > } > > > > I want that when the user clicks on the link, the row will be highlighted > > and the previous selected (if there was) will be un-highlighted. > > > > I know that it is with CSS playing (changing classes), but how do I do > that? > > And I guess that if I add this table to the ajaxTarget, then the previous > > line will not be highlighted. > > > > Thanks > > > > > > Eyal Golan > > [email protected] > > > > Visit: http://jvdrums.sourceforge.net/ > > LinkedIn: http://www.linkedin.com/in/egolan74 > > > > P Save a tree. Please don't print this e-mail unless it's really > necessary > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
