Sending updated to browser in every 10 second..(PeopleTable.html)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Sending updated to browser in every 10 second..(PeopleTable.html)

NAVIN
hi,

I am accessing the code using url in dwr.war as :
dwr/reverseajax/peopleTable.html...which demonstrate that "how to use
a separate server side thread to control a number of browsers. When
enabled updates will be sent to this pages table every 10 seconds".
But in this scenario,output to be shown to user on the basis of some
input,How shall i pass input request parameter to run method of
peopleTable.java file.
Means a text fileld shall be shown to user,user enter some value and
click on submit button. Now updates will be sent to this pages table
every 10 seconds.

try to be more clear, i'm in lack of ideas in this problem, even it
sounds like a classic :I have spend hours trying to play around with
this but have got nowhere.
Your help is much appreciated
Reply | Threaded
Open this post in threaded view
|

Re: Sending updated to browser in every 10 second..(PeopleTable.html)

david@butterdev.com
Our hints and tips page should help:
http://directwebremoting.org/dwr/documentation/reverse-ajax/hints-and-tips.html

On 01/31/2014 01:15 AM, rajesh wrote:

> hi,
>
> I am accessing the code using url in dwr.war as :
> dwr/reverseajax/peopleTable.html...which demonstrate that "how to use
> a separate server side thread to control a number of browsers. When
> enabled updates will be sent to this pages table every 10 seconds".
> But in this scenario,output to be shown to user on the basis of some
> input,How shall i pass input request parameter to run method of
> peopleTable.java file.
> Means a text fileld shall be shown to user,user enter some value and
> click on submit button. Now updates will be sent to this pages table
> every 10 seconds.
>
> try to be more clear, i'm in lack of ideas in this problem, even it
> sounds like a classic :I have spend hours trying to play around with
> this but have got nowhere.
> Your help is much appreciated
>

Reply | Threaded
Open this post in threaded view
|

Re: Sending updated to browser in every 10 second..(PeopleTable.html)

david@butterdev.com
In reply to this post by NAVIN
"Means a text fileld shall be shown to user,user enter some value and
click on submit button. Now updates will be sent to this pages table
every 10 seconds."

If you don't want reverse AJAX enabled until some value is evaluated on the server that is pretty simple.  Don't enable reverse AJAX on page load.  When the button is clicked make a normal DWR call to the server passing in the input fields value.  Then return an appropriate response which you can evaluate on the client and enable reverse AJAX based on it.


On 01/31/2014 01:15 AM, rajesh wrote:

> hi,
>
> I am accessing the code using url in dwr.war as :
> dwr/reverseajax/peopleTable.html...which demonstrate that "how to use
> a separate server side thread to control a number of browsers. When
> enabled updates will be sent to this pages table every 10 seconds".
> But in this scenario,output to be shown to user on the basis of some
> input,How shall i pass input request parameter to run method of
> peopleTable.java file.
> Means a text fileld shall be shown to user,user enter some value and
> click on submit button. Now updates will be sent to this pages table
> every 10 seconds.
>
> try to be more clear, i'm in lack of ideas in this problem, even it
> sounds like a classic :I have spend hours trying to play around with
> this but have got nowhere.
> Your help is much appreciated
>

Reply | Threaded
Open this post in threaded view
|

Re: Sending updated to browser in every 10 second..(PeopleTable.html)

NAVIN
In reply to this post by NAVIN
Please reply!

On Fri, Jan 31, 2014 at 1:45 PM, rajesh <[hidden email]> wrote:

> hi,
>
> I am accessing the code using url in dwr.war as :
> dwr/reverseajax/peopleTable.html...which demonstrate that "how to use
> a separate server side thread to control a number of browsers. When
> enabled updates will be sent to this pages table every 10 seconds".
> But in this scenario,output to be shown to user on the basis of some
> input,How shall i pass input request parameter to run method of
> peopleTable.java file.
> Means a text fileld shall be shown to user,user enter some value and
> click on submit button. Now updates will be sent to this pages table
> every 10 seconds.
>
> try to be more clear, i'm in lack of ideas in this problem, even it
> sounds like a classic :I have spend hours trying to play around with
> this but have got nowhere.
> Your help is much appreciated
Reply | Threaded
Open this post in threaded view
|

Re: Sending updated to browser in every 10 second..(PeopleTable.html)

Mike Wilson
Administrator
Rayesh,
Please look at the mailing list again. You have had two responses
from David Marginian.

rajesh wrote:

> Please reply!
>
> On Fri, Jan 31, 2014 at 1:45 PM, rajesh
> <[hidden email]> wrote:
> > hi,
> >
> > I am accessing the code using url in dwr.war as :
> > dwr/reverseajax/peopleTable.html...which demonstrate that
> "how to use
> > a separate server side thread to control a number of browsers. When
> > enabled updates will be sent to this pages table every 10 seconds".
> > But in this scenario,output to be shown to user on the basis of some
> > input,How shall i pass input request parameter to run method of
> > peopleTable.java file.
> > Means a text fileld shall be shown to user,user enter some value and
> > click on submit button. Now updates will be sent to this pages table
> > every 10 seconds.
> >
> > try to be more clear, i'm in lack of ideas in this problem, even it
> > sounds like a classic :I have spend hours trying to play around with
> > this but have got nowhere.
> > Your help is much appreciated

Reply | Threaded
Open this post in threaded view
|

Re: Sending updated to browser in every 10 second..(PeopleTable.html)

NAVIN
In reply to this post by NAVIN
Very-Very thankx for your response,
 Sir, thats my problem, how shall i retrieve input value given by user
to run method of PeopleTable.java class.
Can u show  me the code which shall be written in run method of
PeopleTable.java class.

Sir, The input value submitted by user should be available here so
that i can construct business logic here (what output should be shown
to user on basis of this input value.)







[hidden email] wrote

"Means a text fileld shall be shown to user,user enter some value and
click on submit button. Now updates will be sent to this pages table
every 10 seconds."

If you don't want reverse AJAX enabled until some value is evaluated
on the server that is pretty simple.  Don't enable reverse AJAX on
page load.  When the button is clicked make a normal DWR call to the
server passing in the input fields value.  Then return an appropriate
response which you can evaluate on the client and enable reverse AJAX
based on it.


[hidden email] wrote

Our hints and tips page should help:
http://directwebremoting.org/dwr/documentation/reverse-ajax/hints-and-tips.html

On Mon, Feb 3, 2014 at 9:40 AM, rajesh <[hidden email]> wrote:

> Please reply!
>
> On Fri, Jan 31, 2014 at 1:45 PM, rajesh <[hidden email]> wrote:
>> hi,
>>
>> I am accessing the code using url in dwr.war as :
>> dwr/reverseajax/peopleTable.html...which demonstrate that "how to use
>> a separate server side thread to control a number of browsers. When
>> enabled updates will be sent to this pages table every 10 seconds".
>> But in this scenario,output to be shown to user on the basis of some
>> input,How shall i pass input request parameter to run method of
>> peopleTable.java file.
>> Means a text fileld shall be shown to user,user enter some value and
>> click on submit button. Now updates will be sent to this pages table
>> every 10 seconds.
>>
>> try to be more clear, i'm in lack of ideas in this problem, even it
>> sounds like a classic :I have spend hours trying to play around with
>> this but have got nowhere.
>> Your help is much appreciated
Reply | Threaded
Open this post in threaded view
|

Re: Sending updated to browser in every 10 second..(PeopleTable.html)

NAVIN
 In attached file user shall first access input.jsp and enter value in
input. On clicking of submit button,peopleTable.jsp file shall be
called and from here run method shall be scheduled for interval of 10
second, Now please tell me, how this input value shall be available to
run method?

On Tue, Feb 4, 2014 at 11:28 AM, rajesh <[hidden email]> wrote:

> Very-Very thankx for your response,
>  Sir, thats my problem, how shall i retrieve input value given by user
> to run method of PeopleTable.java class.
> Can u show  me the code which shall be written in run method of
> PeopleTable.java class.
>
> Sir, The input value submitted by user should be available here so
> that i can construct business logic here (what output should be shown
> to user on basis of this input value.)
>
>
>
>
>
>
>
> [hidden email] wrote
>
> "Means a text fileld shall be shown to user,user enter some value and
> click on submit button. Now updates will be sent to this pages table
> every 10 seconds."
>
> If you don't want reverse AJAX enabled until some value is evaluated
> on the server that is pretty simple.  Don't enable reverse AJAX on
> page load.  When the button is clicked make a normal DWR call to the
> server passing in the input fields value.  Then return an appropriate
> response which you can evaluate on the client and enable reverse AJAX
> based on it.
>
>
> [hidden email] wrote
>
> Our hints and tips page should help:
> http://directwebremoting.org/dwr/documentation/reverse-ajax/hints-and-tips.html
>
> On Mon, Feb 3, 2014 at 9:40 AM, rajesh <[hidden email]> wrote:
>> Please reply!
>>
>> On Fri, Jan 31, 2014 at 1:45 PM, rajesh <[hidden email]> wrote:
>>> hi,
>>>
>>> I am accessing the code using url in dwr.war as :
>>> dwr/reverseajax/peopleTable.html...which demonstrate that "how to use
>>> a separate server side thread to control a number of browsers. When
>>> enabled updates will be sent to this pages table every 10 seconds".
>>> But in this scenario,output to be shown to user on the basis of some
>>> input,How shall i pass input request parameter to run method of
>>> peopleTable.java file.
>>> Means a text fileld shall be shown to user,user enter some value and
>>> click on submit button. Now updates will be sent to this pages table
>>> every 10 seconds.
>>>
>>> try to be more clear, i'm in lack of ideas in this problem, even it
>>> sounds like a classic :I have spend hours trying to play around with
>>> this but have got nowhere.
>>> Your help is much appreciated

input.jsp (828 bytes) Download Attachment
peopleTable.jsp (4K) Download Attachment
PeopleTable.java (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Sending updated to browser in every 10 second..(PeopleTable.html)

david@butterdev.com
You can pass parameters to DWR calls, if you don't understand this than
you need to go back and start over with the DWR docs/tutorials as it is
basic functionality:

Change:
public void addAttributeToScriptSession() {
     ScriptSession scriptSession =
WebContextFactory.get().getScriptSession();
     scriptSession.setAttribute(SCRIPT_SESSION_ATTR, true);
}

To:
public void addAttributeToScriptSession(String inputValue) {
     ScriptSession scriptSession =
WebContextFactory.get().getScriptSession();
     scriptSession.setAttribute(SCRIPT_SESSION_ATTR, inputValue);
}

Then in your jsp pull inputValue out of the request and pass it into
your remote method:
  function addAttributeToScriptSession() {
       // TODO add code to grab the input value from the request
       PeopleTable.addAttributeToScriptSession(inputValue);
       dwr.util.byId("enable").style.display = 'none';
       dwr.util.byId("disable").style.display = 'block';
  }

On 02/04/2014 01:00 AM, rajesh wrote:

>   In attached file user shall first access input.jsp and enter value in
> input. On clicking of submit button,peopleTable.jsp file shall be
> called and from here run method shall be scheduled for interval of 10
> second, Now please tell me, how this input value shall be available to
> run method?
>
> On Tue, Feb 4, 2014 at 11:28 AM, rajesh <[hidden email]> wrote:
>> Very-Very thankx for your response,
>>   Sir, thats my problem, how shall i retrieve input value given by user
>> to run method of PeopleTable.java class.
>> Can u show  me the code which shall be written in run method of
>> PeopleTable.java class.
>>
>> Sir, The input value submitted by user should be available here so
>> that i can construct business logic here (what output should be shown
>> to user on basis of this input value.)
>>
>>
>>
>>
>>
>>
>>
>> [hidden email] wrote
>>
>> "Means a text fileld shall be shown to user,user enter some value and
>> click on submit button. Now updates will be sent to this pages table
>> every 10 seconds."
>>
>> If you don't want reverse AJAX enabled until some value is evaluated
>> on the server that is pretty simple.  Don't enable reverse AJAX on
>> page load.  When the button is clicked make a normal DWR call to the
>> server passing in the input fields value.  Then return an appropriate
>> response which you can evaluate on the client and enable reverse AJAX
>> based on it.
>>
>>
>> [hidden email] wrote
>>
>> Our hints and tips page should help:
>> http://directwebremoting.org/dwr/documentation/reverse-ajax/hints-and-tips.html
>>
>> On Mon, Feb 3, 2014 at 9:40 AM, rajesh <[hidden email]> wrote:
>>> Please reply!
>>>
>>> On Fri, Jan 31, 2014 at 1:45 PM, rajesh <[hidden email]> wrote:
>>>> hi,
>>>>
>>>> I am accessing the code using url in dwr.war as :
>>>> dwr/reverseajax/peopleTable.html...which demonstrate that "how to use
>>>> a separate server side thread to control a number of browsers. When
>>>> enabled updates will be sent to this pages table every 10 seconds".
>>>> But in this scenario,output to be shown to user on the basis of some
>>>> input,How shall i pass input request parameter to run method of
>>>> peopleTable.java file.
>>>> Means a text fileld shall be shown to user,user enter some value and
>>>> click on submit button. Now updates will be sent to this pages table
>>>> every 10 seconds.
>>>>
>>>> try to be more clear, i'm in lack of ideas in this problem, even it
>>>> sounds like a classic :I have spend hours trying to play around with
>>>> this but have got nowhere.
>>>> Your help is much appreciated