Ok, here is a little more of the datatable code: <t:jquery.table id="dataTable"
t:row="currRow" t:mixins="jquery/bind" bind.event="datatableclick" bind.eventType="click" bind.zone="theZone" bind.context="${currRow.fileID}" include="..." > <p:buttonCell> <t:jquery.dialogajaxlink t:dialog="myDialog" t:zone="detailZone" t:context="${thisfile.fileID}"><button class="smallgridbutton" type="button">Requeue</button></t:jquery.dialogajaxlink> </p:buttonCell> </t:jquery.datatable> currRow is defined in java with @Property annotation. I have tried in the tml: bind.context="${currRow.fileID}" bind.context="currRow.fileID" I am always getting an error: currRow is NULL. Why is that? ------------------------------------------------------------------------------------------------ Now with the callback, where does this Java code go? ________________________________ From: Barry Books <trs...@gmail.com> To: Tapestry users <users@tapestry.apache.org> Sent: Friday, 30 August 2013 8:59 AM Subject: Re: JQuery Datatable Bind Mixin You will need to provide a javascript callback function to the mixin that puts the value into the url. It's called like this if ( callback ) { // TODO should work if value is array u.addContext = function(value) { u.url = u.url.replace(u.context,value) }; callback(event,ui,u); } so I think your callback can be function(event,ui,u) { u.addContext("Your Value"); } On Thu, Aug 29, 2013 at 6:18 PM, Taha Hafeez Siddiqi < tawus.tapes...@gmail.com> wrote: > Try curRow.fileID instead of ${curRow.fileID} as parameter to bind.context > > Sent from my iPhone > > On 30-Aug-2013, at 3:26 AM, john c <john998...@yahoo.com> wrote: > > > I am attempting to use the jquery/bind mixin with a datatable, but not > having success. > > The relevant code is below. Basically I want to click a row and have it > create a tapestry event, with the fileID. > > I have tested and found the event occurs, but I can't seem to pass the > fileID context. > > Any ideas? > > > > > > > --------------------------------------------------------------------------- > > > > <t:jquery.datatable id="dataTable" > > > > t:mixins="jquery/bind" bind.event="datatableclick" > bind.eventType="click" bind.zone="theZone" bind.context="${currRow.fileID}" > > include="..." > > > </t:jquery.datatable> > > > > > --------------------------------------------------------------------------- > > > > > > @Persist > > @Property > > private OutboundFile currRow; > > > > @InjectComponent > > private Zone theZone; > > > > > > @OnEvent("datatableclick") > > public Object onDatatableClickEvent(String value) { > > System.out.println("value: " + value); > > return theZone.getBody(); > > } > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >