cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement receiving message from WAS in WD java in client?

Former Member
0 Kudos

Hi all,

We have some requirments in WD java, client check messages on server real time, if there are messages client will show up the message on fixed area, but these checking and showing is auto proceed by program. If there are any good solution for this requirement.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have not done it myself. You can try using a timer (java.util.Timer) to fetch messages from the server.

int delay = 60000;   // delay for 60 sec.
    int period = 1000;  // repeat every sec.
    Timer timer = new Timer();
    
    timer.scheduleAtFixedRate(new TimerTask() {
            public void run() {
                // method to fetch message from server and display
            }
        }, delay, period);

Good luck, Roelof

Former Member
0 Kudos

Hi, Knibbe

We have lots page in our system, we hope wherver page user come to , user can receive message from server if server has message send to this user. and this message can show up in a suitable location for several seconds for reading. My question is, WD java run in EP, if EP support some function about this requirement? If not, we do not want to write TIMER CODE in every page to check message from server. Do we has other solution?

best regard

Former Member
0 Kudos

You can ask in the portal forum about possibilities.

But you don't have to add a timer to every page (view) in your WD app.

You can place one timer in the central controller that checks periodically for messages.

In order to (briefly) show the message, each view needs some view element on which the message can be shown. Also you need to write custom code to make the message disappear disappear.

Good luck, Roelof

Former Member
0 Kudos

Hi,

You could try to see if UWL will be of help for your scenario. It will be a centre place where user can see the changes that needs his attention.

Regards

Ayyapparaj

Former Member
0 Kudos

hi Ayyapparaj KV :

Do your UWL mean Universal Worklist, i am a beginner to this. I wonder if my idea is correct. If i try UWL, should we need a additional panel in portal application area. It was used to show attentive msg.

if system have some msg to release, it use UWL to inform use in the panel?

Former Member
0 Kudos

Hi R. Knibbe

I notice that we can show message in view element MessageArea, and if we use Timer in Component Controller we do not need to write This Timer in every page, Our prj has many components , so should need call this Timer in every Component's Controller ?

best regard

reefish

pravesh_verma
Active Contributor
0 Kudos

Hi Ree,

One word of advise.. Always use the message area for displaying teh messages. Most of teh time displaying the messages is controlled by the framework. There are some messages which also comes from backend. You cannot always do teh coding to handle such messages. Therefore if you have the message area in you view it helps to solve most of the message related stuff by itself.

Moreover it gives a uniform look to all views where the messages are displayed. If you dont have the message Area then all messages are displayed at the bottom of the page which is not the corerct place for messages.

Good that you haveused the message area in you application now.!!

Yes,if you have lot of views then you should add this timer to the component controller. This will be the best solution. Otherwise you have to writre the same code for all views.

All the best!!

Regards,

Pravesh

Former Member
0 Kudos

Hi Pravesh

I added the Timer in Component Controller but it doesn't work. There is no response when Timer was triggered. Only when add TimedTrigger in the Views it can be trigged. As we know in B/S , Server can not push any message to Broswer. Only response Browser's resquest. So can we use Timer in Component Controller?

best regard

reefish

Answers (0)