On Tue, Oct 12, 2010 at 8:25 AM, duncan787 <
[hidden email]> wrote:
>
> Its already "attached" to the DataView, see the relevant/simplified Java
> code
> added below. Would it best practice be to assign a WebMarkupContainer to
> the <TR> element and add both an AjaxFallbackLink and a DataView to the
> container?
>
> DataView<SiteProject> projectListDataView =
> new DataView<SiteProject>("siteProjectList", getDataProvider(), 100)
> {
> @Override
> protected void populateItem(final Item<SiteProject> item)
> {
> SiteProject siteProject = item.getModelObject();
> item.add(new Label("ProjectDesc",
> siteProject.getProjectDesc()));
> }
> };
>
> --
> View this message in context:
>
http://apache-wicket.1842946.n4.nabble.com/How-to-trigger-server-side-method-when-user-clicks-on-a-Table-Row-tp2991576p2991852.html> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
[hidden email]
> For additional commands, e-mail:
[hidden email]
>
>
Nowhere in that code do you attach any ajax behavior that I see.
All you need is this (in your populate item method):
item.add(new AjaxEventBehavior("onclick") { ... onEvent(AjaxRequestTarget
target) { /* do something here */ } });
--
Jeremy Thomerson
http://www.wickettraining.com