Hello,

I have problems with sessions and APE.

I do that :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" dir="ltr"
lang="en">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <script type="text/javaScript" src="../../Clients/JavaScript.js"></
script>
        <script type="text/javaScript" src="../config.js"></script>
</head>
<body>
        <div id="ape_master_container"></div>
        <script type="text/javaScript">

                // Initialize APE_Client
        APE.Config.scripts.push(APE.Config.baseUrl + '/Source/Core/
Session.js');

        var client = new APE.Client();

        //Load APE client and join test channel
        client.load({'channel':'efyx', 'identifier': 'jsonpTest' });

        client.addEvent('load', function() {
                //If session is active core.options.restore is to true
                if (client.core.options.restore) {
                    //Calling start(); without arguments, this will
ask APE Server for user session
                    client.core.start();
                } else {
                    //It's not a session restoration, ask user for his
name
                    client.core.start({'name':prompt('name?')});
                }
        });

        client.addEvent('ready', function() {
            if (client.core.options.restore) {
                //If it's a session restoration, ask the APE server
for the custom session 'key1'
                client.core.getSession('key1', function(resp) {
                    console.log('Receiving sessions data. key1 value
is : ', resp.data.sessions.key1);
                });
            } else {
                //Saving custom session key1 one the server
                console.log('saving custom session data, key1 on the
server');
                client.core.setSession({'key1':'value1'});
            }
        });


        </script>
        </body>
</html>


But already create new sessions and ask me "name?" ... Anyone can help
me ? Ape Configuration ? Bad js files ?

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to