You might be able to use the onEvent mixin to attach a clientside event to
a serverside event.
http://tapestry-stitch.uklance.cloudbees.net/oneventdemo

If not, the code should help.
On 9 Jul 2013 18:59, "George Ludwig" <georgelud...@gmail.com> wrote:

> I've got this working pretty well now, but I want to take it to the next
> level.
>
> When the user clicks on a node of the graph, I want to trigger a callback
> function on the java side. I assume this means attaching a click handler
> method in javascript to the nodes...but how do I wire it up so when the js
> click handler is invoked, it calls a server side java method?
>
> Looking at this example: http://sigmajs.org/examples/hidden_nodes.html
>
> When a node is clicked, I'd like to execute a server side java call that
> receives the node name.
>
> Is there a clear example of this type of integration anywhere I can take a
> look at?
>
> -George
>
>
> On Tue, Jul 9, 2013 at 10:53 AM, George Ludwig <georgelud...@gmail.com
> >wrote:
>
> > Thanks for those links!
> >
> >
> > On Sun, Jul 7, 2013 at 11:00 PM, Geoff Callender <
> > geoff.callender.jumpst...@gmail.com> wrote:
> >
> >> These examples describe the pros and cons of addScript() and
> >> addInitializerCall():
> >>
> >> -
> >>
> >>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/javascript
> >> -
> >>
> >>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/reusable
> >> -
> >>
> >>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/robust
> >>
> >> HTH,
> >>
> >> Geoff
> >>
> >>
> >> On 3 July 2013 06:25, George Ludwig <georgelud...@gmail.com> wrote:
> >>
> >> > Thanks for the info Thiago!
> >> >
> >> > >>  Couldn't you just @Import to get the JS files included and
> >> > JavaScriptSupport.addScript() to invoke JS functions?
> >> >
> >> > That's the route I ended up taking to import the necessary js files,
> but
> >> > I'm still unclear on exactly how to use  JavaScriptSupport.addScript()
> >> to
> >> > create an instance of the sigma viewer. For example, I don't
> understand
> >> > when it's appropriate to use JavaScriptSupport.addInitializerCall()
> >> > vs. JavaScriptSupport.addScript()
> >> >
> >> >
> >> >
> >> > On Tue, Jul 2, 2013 at 12:01 PM, Thiago H de Paula Figueiredo <
> >> > thiag...@gmail.com> wrote:
> >> >
> >> > > On Tue, 02 Jul 2013 15:35:20 -0300, George Ludwig <
> >> > georgelud...@gmail.com>
> >> > > wrote:
> >> > >
> >> > >  I'm working on a custom component of the SigmaJS visualization
> >> library (
> >> > >> http://sigmajs.org).
> >> > >> Specifically, this example: http://sigmajs.org/examples/**
> >> > >> gexf_example.html <http://sigmajs.org/examples/gexf_example.html>
> >> > >>
> >> > >
> >> > > Interesting!
> >> > >
> >> > >
> >> > >  I've been studying the got5 examples of js library integration, and
> >> they
> >> > >> are all pretty complex, and it's a challenge to figure out what I
> >> really
> >> > >> need to do.
> >> > >>
> >> > >
> >> > > They are complex because the project tapestry-jquery is about
> >> > > reimplementing Tapestry's built-in Java in jQuery. You're thinking
> >> what
> >> > you
> >> > > need to do in your example is way too complex than reality. Couldn't
> >> you
> >> > > just @Import to get the JS files included and
> >> > JavaScriptSupport.addScript()
> >> > > to invoke JS functions?
> >> > >
> >> > >
> >> > >  I've been working form this tutorial:
> >> > >>
> >> http://wiki.apache.org/**tapestry/**Tapestry5AndJavaScriptExplaine**d<
> >> > http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained
> >> >however,
> >> > >> it's for a mixin and I'm unclear if there is a material difference
> >> > >> between creating a component vs. a mixin.
> >> > >>
> >> > >
> >> > > For the JavaScript part, it's absolutely the same in pages,
> components
> >> > and
> >> > > mixins.
> >> > >
> >> > >
> >> > >
> >> > >> Any guidance is much appreciated!
> >> > >>
> >> > >> -George
> >> > >>
> >> > >
> >> > >
> >> > > --
> >> > > Thiago H. de Paula Figueiredo
> >> > >
> >> > >
> >>
> ------------------------------**------------------------------**---------
> >> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<
> >> > users-unsubscr...@tapestry.apache.org>
> >> > > For additional commands, e-mail: users-h...@tapestry.apache.org
> >> > >
> >> > >
> >> >
> >>
> >
> >
>

Reply via email to