on 10-10-2006 6:09 AM
if Message Manager is used it shows an errror in 'attributeInfo'...
do we have to define 'attributeInfo' before using it here:
IWDMessageManager msgMgr =
this.wdThis.wdGetAPI().getComponent().getMessageManager();
msgMgr.reportContextAttributeMessage(
this.wdContext.currentContextElement(), <u>attributeInfo</u>,
IMessageSimpleErrors..MISSING_INPUT, new Object[] {"Name"},true);
Hai ,
Create a label set the labelfor property to input field, Set the input field property state is required.
Write the code when click the submit button
String valueOfInputField=wdContext.currentContextElement.getX();
if(valueOfInputField==null || valueOfInputField.trim().equals(")){
msgMgr.reportWarning(" Name is Mandatory");
}
regards,
Naga Raju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
public void checkMandatory(String name,String filedContextID)
{
String attributeValue = wdContext.currentContextElement.getAttributeAsText(filedContextID);
String attributeinfo = wdCotext.getNodeInfo().getAttribute(filedContextID);
if(attributeValue ==" ")
{
ur reportContextAttrMsg()
}
}
Declare u context attribute name in current View method
Where you used this method.
This.checkMandatory("Ur errorMsg",Attributeof declaredView);
Or Do u need to * red color ur input filed label do follow.
set the property state as required for the input Field
In the Label's property labelFor set the coressponding text field's Id.
Thanks
Lohi.
Message was edited by: Lohitha M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Set the State Property of the input field is required
Regards,
Saraswathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes we need to define attribute info before using it.
If you have defined the attribute in your root context, you need to obtain it in the following way :
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute("ContextAttributeName");
Regards,
Subramanian V.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.