Oh,
so calling
require("modal").invoke("activate")
and then later
require("modal").invoke("deactivate")
.. both re-construct a seperate "modal" js object and then call one of
the two published functions...
what if you have two different modals? what if they are init-ed differently:
java:afterRender() {
require("modal").invoke("init").with("message 1");
require("modal").invoke("init").with("message 2");
}
and then later
java:onSomeEvent() {
require("modal").invoke("activate");
}
this flow would essentially construct the modal module instance 3 times,
and the "activate" wouldn't know about "message 1" or "message 2".
Therefore, how would I re-aquire a handle to a specific module instance
later on? for eg:
java:onSomeEvent(){
// activate modal with "message 1"
require("modal").invoke("activate");
}
I know this example doesn't make much practical sense, but the concept
of communicating with something stateful is pretty key!
p.
On 13/11/2014 4:34 PM, Geoff Callender wrote:
Have you had a look at these two:
http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/modal/1
http://jumpstart.doublenegative.com.au/jumpstart7/examples/javascript/reusablemodal/1
Do they fit your scenario?
On 13 Nov 2014, at 3:40 pm, Paul Stanton <pa...@mapshed.com.au> wrote:
Hi Geoff,
I have found your examples invaluable in learning some of the basics of this
(and other) concepts. I can't thank you enough
.. the only thing I can see is missing currently is the example I asked about
in the previous mail:
Basically, how do I interact with a js module instance after it is created?
pretend some server-side state changes between afterRender and onSomeEvent, and
the client needs to react accordingly.
jss.addScript is deprecated, so I "shouldn't" be telling the client to execute
script apparently...
cheers, p.
On 13/11/2014 2:36 PM, Geoff Callender wrote:
do these examples cover the situations you are describing?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org