Broadcast, messages and sessions

18 views
Skip to first unread message

Douglas Trojanwoski

unread,
Jan 16, 2014, 10:34:02 AM1/16/14
to model...@googlegroups.com
Maybe I drank to much kool aid today but i can't figure out why this is happening.

I have eventTypIe

Checks if user is logged in.


       <event-type name="SecuredEvent">
            <before>
                <broadcasts>
                    <message name="getAuthenticated" />
                </broadcasts>
                <results>
                    <result name="notAuthenticated" do="Logon" redirect="true" />
                </results>
            </before>
        </event-type>
Below does SecuredEvent Fire off before the broadcasts runs in blah?

cause i keep getting session errors in my ajax events because user will leave their screen open then come back type into an autocomplete box which fires off ajax and i get an error with session stuff.

Now i know it works cause as soon as they leave that page to go to another one it kicks them back to the logon screen.

<event-handler name="blah" type="SecuredEvent">
        <broadcasts>
            <message name="getOrderLoadTotal" />
        </broadcasts>
        <results/>
        <views>
            <include name="body" template="blah.cfm" />
        </views>
    </event-handler>   
     

<event-handler name="blahajax" type="SecuredEvent">
            <broadcasts>
                <message name="jsonReturnForJqueryAutoComplete" />
            </broadcasts>
            <results/>
            <views/>
        </event-handler>

hope this makes sense

Dan Wilson

unread,
Jan 16, 2014, 12:02:57 PM1/16/14
to model...@googlegroups.com
Just thinking outloud, but if control is at the Ajax layer, then any redirect is going to affect the content returned by Ajax, not the main user experience.

This means, if my Ajax request expected JSON as the return, but the event ran, and I actually got a timeout page/error/authentication page, my Ajax request would break.

Is this what you are seeing, or are you seeing something else?


DW




Douglas Trojanwoski wrote:

Maybe I drank to much kool aid today but i can't figure out why this
is happening.

I have eventTypIe

Checks if user is logged in.


<event-type name="SecuredEvent">
<before>
<broadcasts>
<message name="getAuthenticated" />
</broadcasts>
<results>
<result name="notAuthenticated" do="Logon" re direct="true" />
--
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to model...@googlegroups.com
To unsubscribe from this group, send email to
model-glue+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
---
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to model-glue+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages