cancel
Showing results for 
Search instead for 
Did you mean: 

message prblm

Former Member
0 Kudos

Hi All!

The problem I'm having is:

If a message apperars and then it quickly disappears again on the view.

How can it be solved? Any ideas

Rdg

sas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Everybody!

It is a already existing project and this message is coming from the Backend

It depends on whether an order has been not found or not.

Regards

sas

former_member197348
Active Contributor
0 Kudos

Hi Erdem,

Of course, this message may be coming from backend but you need to display it using some code like WDMessageManager API or using UI Element like Textview.

First case use the you need to do as our previous option

In second case your backend people need to populate the field(model attribute) again because there might be two or more calls to backend,in first time backend people are populating the field but in second call they may be ignoring this field.

regards,

Siva

Former Member
0 Kudos

In that case the message is likely produced in the execute method of your controller or custom controller. (manager.reportException(msg), or manager.reportSuccess(msg))

You can instead place the message in a context variable, which you map to the view.

There you can implement the message in wdDoModifyView.

Good luck, Roelof

Answers (5)

Answers (5)

Former Member
0 Kudos

Siva Rama Krushna thanky ou very much for this useful hint.

Siva Rama Krushna I have forgotten to say the this disappearing occurs inside the

portal. If I run this application ouside portal then it doesn't disappear.

Is this information useful for you guys ?

Regards

sas

former_member197348
Active Contributor
0 Kudos

Hi Erdem,

That means the WD application is working properly. I am not sure of this but can you compare once properties of this iView and Page with properties your other iViews and Pages?

regards,

Siva

Former Member
0 Kudos

There was defined a message area (Toolbar - > Pattern).

I have removed it since then the messages are shown at the bottom instead

of at the header part. Is it necessary to define a message area.

I have tried to place a message area again to the top. It's not possible.

It places it at the bottom.

Regards

sas

Former Member
0 Kudos

If there is no message area, messages will be shown at the bottom.

If there is one message area, messages will be shown in this message area.

If there are more than one messagareas in your view, i believe the message will be shown in the first area you placed in your view (the oldest).

Good luck, Roelof

former_member197348
Active Contributor
0 Kudos

Is it necessary to define a message area?

MessageArea is used to display the WDMessage wherever you want.

I have tried to place a message area again to the top. It's not possible.

It places it at the bottom.

Of course, default it places in the bottom of the layout.

But you can move it to wherever you want.

Right click on the MessageArea -> select Move Up

You can just Drag and Drop any UIElement to up or down or into any other layout container.

regards,

Siva

Former Member
0 Kudos

Hi!

What shuold be put

in the wdDoModifyView of your view.

rgd

sas

former_member197348
Active Contributor
0 Kudos

wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("your message") ;

regards,

Siva

Former Member
0 Kudos

You can put the statement that produces the message in the wdModifyView method of your view.

Then, it wil be printed all the time.

e.g. wdComponentAPI().wdGetMessageManager().reportWarning("my message!");

Good luck, Roelof

Former Member
0 Kudos

Hi Sas,

Use any of the following

wdThis.wdGetAPI().getComponent().getMessageManager().reportException(message)

wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(message)

Regards

Ayyapparaj

former_member197348
Active Contributor
0 Kudos

Hi Erdem,

May be you are triggering another event immediately after printing the message.

regards,

Siva

Former Member
0 Kudos

Put in in the wdDoModifyView of your view.

Good luck, Roelof