on 08-28-2007 10:30 AM
Hi,
there are only two fields in my view, one is label and the other one is button. i want to get a message with help of the <b>"Message pool"</b> by clocking on the button. could any body help me out with the code.
thanks
Suresh
Hi SureshKumar Arumugham
Open the Message Pool edit the following details
<i><b>MessageKey =</b></i> ButtonClicked
<i><b>MessageType =</b></i> standard
<i><b>Message Text =</b></i> You had Clicked the Button times.
Now Create a Button in the and also create an action for that button.( eg Show_Message).
Inside The Action write this code...
public void onActionShow_Message(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionShow_Message(ServerEvent)
i=i+1;
wdComponentAPI.getMessageManager().reportMessage(IMessageTest_Button_App.BUTTON_CLICKED,new Object[] {" "+i},false);
//@@end
}
Declare a variable " i " Globally
/** You will find this at the end of the coding page ***/
//@@begin others
int i = 0;
//@@end
Now Execute Your Application
The output will be in such a way that how many times you had clicked the button.......
Regards
Chandran S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
Write this line in your button's action:
wdComponentAPI.getMessageManager().reportMessage(IMessage<viewname>.<messagekey in message pool>,null,true);
Warm Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
This will help you using Message Editor
http://help.sap.com/saphelp_nw70/helpdata/en/ae/4fd9b1ff5c8449b276586e801e5cfe/frameset.htm
you can use this statement to write message
wdThis.getComponent().wdGetAPI().getMessageManager().reportSuccess( 'Message here' );
Regards
Abhimanyu L
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! Suresh,
Create an Object of MessageManager by this code :--
MessageManager msgMgr = (MessageManager)
wdThis.wdGetAPI().getComponent().getMessageManager();
Now use msgMgr object to print the message from MessagePool Like:--
msgMgr.reportMessage
(IMessageRemoveUserComp.WARNING_USER_ID, null, false);
enjoy,
Mithileshwar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh
IWDNodeElement task = node.getElement();
manager = wdComponentAPI.getMessageManager();
IWDAttributeInfo attibute = node.getNodeInfo().getAttribute(XX);
String message = wdComponentAPI.getTextAccessor().getText(IMessageXX.Messagepool_Name);
manager.raiseInvalidContextAttributeException(task, attibute, message, true);
manager.raisePendingException();
Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.