problem with push data to a selected user

View: New views
1 Messages — Rating Filter:   Alert me  

problem with push data to a selected user

by robyp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have to push data only to a particolar sub-set of user.
i hope that you can answer at least one of my question, maybe the first please!:(..here they are:

1) first of all, i have to push data to only one user. The users open the browser at same page (index.jsp).I use scriptsession, like in http://directwebremoting.org/dwr/reverse-ajax/hints-and-tips.html

i set a session attribute (or key) like user_id and i try to do push to user with id like required user_id:

 String userid = ((String)scriptSession.getAttribute("user_id"));
        if (userid!=null && userid.equals("roby")){
Browser.withSession(scriptSession.getId(), new Runnable() {
                public void run() {
//push data to html page for user with user_id=roby
...
..
}

why doesn't work? it push to everyone user with a browser listen to the same page instead one of them :(

2) if i would to send data to a subset of user there is something filter to use?

3)is script session the right and the only method to differentiate users?


thank you very much

roby


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...