on 11-22-2007 7:07 AM
HI All,
I want to display the Error Message in Message Pool Dynamically.
By creating only one Message in Message Pool of Type Error.
I.E If user leaves the First Name and Last Name Field Blank then
Error Message Should appear as:
Please Enter First Name.
Please Enter Last Name.
How could i achieve this.....
Regards,
Dhruv Shah
Hi dhruv,
In the message pool create
Message text : Please enter to submit. message Type:Error messaky: Missinginput In the it will take the object which we are passing.
Regards,
karthik.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dhruv,
In the Message Pool create a new Message of Type error and the Text Please enter the .
And on the action of Your Submit button write the following code :-
String strFirstName = wdContext.currentContextElement().getFirstName();
IWDMessageManager msgMgr = WdComponentAPI().getMessageManager();
IWDAttributeInfo <ObjectName> = this.wdContext.getNodeInfo.getAttribute("FirstNameField");
if( strFirstName == null || strFirstName.length() == 0)
{
msgMgr.reportContextAttributeMessage(wdContext.currentContextElement,<ObjectName>,IMessage<componentName>.<MessageKey>,new Object[] {"First Name"},true);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dhruv,
In the Message Pool create a new Message of Type <b>error</b> and the Text <b>Please enter the </b>.
And on the action of Your Submit button write the following code :-
IWDMessageManager msgMgr = WdComponentAPI().getMessageManager();
IWDAttributeInfo <ObjectName> = this.wdContext.getNodeInfo.getAttribute("FirstNameField");
if(<ObjectName> == null)
{
msgMgr.reportContextAttributeMessage(wdContext.currentContextElement,<ObjectName>,IMessage<componentName>.<MessageKey>,new Object[] {"First Name"},true);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try this.
define message as Please Enter in Message Pool
and
Use following code
a=wdContext.currentContextElement().get<FName>();
b= wdContext.currentContextElement().get<LName>();
MessageManager msgMgr = (MessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();
if(a==null)
Object[] obj ={new String(a)};
else if(b==null)
Object[] obj ={new String(b)};
msgMgr.reportMessage(<component>.<key>, obj, true);
Regards
LakshmiNarayna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.