cancel
Showing results for 
Search instead for 
Did you mean: 

message display

Former Member
0 Kudos

Hi All,

I have a issue,i am working in ejb concept in webdynpro.

here problem is i created two views

1.joint and

2.progress views.

i want to add one more error message in second view.

if u click on save button in progress view, an error msg have to display in joint view.can any body send me code for this.

Thanks

prasad

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member751941
Active Contributor
0 Kudos

Hi Prasad,

Go to Message Pool and add a message .Use that message in diff view based on the message key.

Regards,

Mithu

Former Member
0 Kudos

hi methu,

Compulsory i want to go messagepool or shall i write

IWDMessageManager.ErrorException("MSG",True); directly in second view save button.is it ok..

thanks

former_member751941
Active Contributor
0 Kudos

Hi Prasad,

It’s not mandatory. You can do as you want. But for standard practice you should use message pool.

Try

{

code for save

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException(“Error Message : ” +e.getMessage(),true);

}

Regards,

Mithu

Former Member
0 Kudos

Hi prasad,

I agree with Mithu, for standard practice you should use message pool. You want add one more error message. Example: you execute your ejb and you want add one more message if this ejb throw an exception.


try {
	//lookup and execute the EJB
} catch (Exception e) {
	//My customized message
	wdComponentAPI.getMessageManager().reportException("My message", true);
	//EJB message
	wdComponentAPI.getMessageManager().reportException("" + e.getMessage(), true);
}

Regards,

Edson Thomaz

Former Member
0 Kudos

Hi,

wdComponentAPI.getMessageManager().reportException(“MSG”, true);

This code show error message in view Web Dynpro.

Regards,

Edson Thomaz

Former Member
0 Kudos

Hi Edson,

Thanks for reply,

I have two views 1.jointview 2. processview.

if u click on save button in processview some error mesgs are displaying in joint view.i have to add one more error msg.can u send steps how i want create that error msg.

Thanks

prasad

Former Member
0 Kudos

Hi prasad ,

You have two views in ViewSet???

Regards

Edson Thomaz

Former Member
0 Kudos

Hi

Create a context value boolean and bind it to the both view.

set the value for the attibute true in the save button action.

In the fire plug in joint view check the save button click and give the error message as

wdComponentAPI.getMessageManager().reportException("Error Message",false);

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Mukesh,

Thanks for ur reply,

Where i have create contextvalue.if u dontmine.can u send me process in stepwise

Thanks

prasad

Former Member
0 Kudos

Hi

Create the attribute in ComponentConroler and bind it to the views.

see the following link for the details

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">web Dynpro Sample Applications and Tutorials</a>

Kind Regards

Mukesh