On Thu, Oct 15, 2009 at 4:05 PM, Java1Guy <mark.cha...@gmail.com> wrote:

>
> FWIW - I went with choice #1.
> Seems like CometActor name method doesn't really get the value of the
> name parameter in the XML :(
>


how were you testing this?


> Appended uniqueId on all the variables and functions - worked just
> fine!
>
> On Oct 15, 12:56 pm, Java1Guy <mark.cha...@gmail.com> wrote:
> > Hey all!
> > I have had some great success in putting together a web page using
> > Flot for client-side JavaScript charting.  I *even* generate said
> > JavaScript in my Scala code (well, the data and the call to the
> > appropriate function) - FTW!
> >
> > Now my question is this: I need multiple graphs on a given page.
> > Should I repeat the CometActor tag, or will the actor properly handle
> > multiple tags in the snippet?
> > (The 'theScript' tag is where the javascript is pasted, a couple
> > variable defns and a function call.)
> >
> > Current one graph code:
> > <lift:surround with="default" at="content">
> >   <lift:comet type="FlotkitActor" name="main">
> >       <f:theScript gt="Recent.Production" cid="placeholder"/>
> >       <div id="placeholder" style="width:600px;height:300px;">Graph
> > will load in ~ 10 sec.</div>
> >   </lift:comet>
> > </lift:surround>
> >
> > Choice 1 - multiple actors:
> >   <lift:comet type="FlotkitActor" name="main1">
> >       <f:theScript gt="Recent.Production" cid="placeholder1"/>
> >       <div id="placeholder1" style="width:600px;height:300px;">Graph
> > will load in ~ 10 sec.</div>
> >   </lift:comet>
> >   <lift:comet type="FlotkitActor" name="main2">
> >       <f:theScript gt="Recent.Demand" cid="placeholder2"/>
> >       <div id="placeholder2" style="width:600px;height:300px;">Graph
> > will load in ~ 10 sec.</div>
> >   </lift:comet>
> >
> > Choice 2 - one actor, multiple tags:
> >   <lift:comet type="FlotkitActor" name="main">
> >       <f:theScript gt="Recent.Production" cid="placeholder2"/>
> >       <div id="placeholder1" style="width:600px;height:300px;">Graph
> > will load in ~ 10 sec.</div>
> >       <f:theScript gt="Recent.Demand" cid="placeholder2"/>
> >       <div id="placeholder2" style="width:600px;height:300px;">Graph
> > will load in ~ 10 sec.</div>
> >   </lift:comet>
> >
> > Would it depend on whether the actors need to update independently?
> > (not sure if they do or not, yet)
> > I'm guessing opt. #1 unless there's serious magic in the bind
> > method... (which could happen)
> >
> > Thanks,
> > Mark
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to