on 01-04-2008 4:56 AM
hai ,
i have an input field (value help).when i select a value from that i need to pass that particular value to database as input(eg material) and get the output from database(eg amount).I tried doing this by marking the calculated attribute as true for the input field in context and tried ti get the value selected in the method get(attributename) but i see a blank screen as output and the application is not running.please help me in this issue .Its very urgent
public void wdDoInit()
{
//@@begin wdDoInit()
IWDAttributeInfo a=wdContext.getNodeInfo().getAttribute(IPrivateSssView.IContextElement.NAME);
ISimpleTypeModifiable stm=a.getModifiableSimpleType();
IModifiableSimpleValueSet svs=stm.getSVServices().getModifiableSimpleValueSet();
svs.put("1","First");
svs.put("2","Second");
//@@end
}
till i give the calculated attribute as true i find this value help field with the options first and second as given above.
public int getName(IPrivateSssView.IContextElement element)
{
//@@begin getName(IPrivateSssView.IContextElement)
int val=element.getName();
String res=null;
if(val==1)
{ res="Fahad";
}
if(val==2)
{
res="Pradeep";
}
wdComponentAPI.getMessageManager().reportSuccess(res);
return val;
//@@end
}
this is included after setting the calculated attribute as true.suggest me if there is any other method for doin this.
regards
sharanya
Edited by: Sharanya R on Jan 4, 2008 5:58 AM
Hi,
For calculated attributes if you want to change the value's you need to have a set method to do this from the properties of the attribute set the readonly property to false then you will be able to see the setter method created.
Setter method have a parameter called value which returns you the newly selected value.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai ayappa,
yes the application is now running when i commented the line.but now iam not able to select the value in my value help at run time.how to get the value which is selected by the user at run time in the getName method which is generated when i set the calculated attribute to true(refer code).
regds
sharanya
Hi Shranaya,
Please let us know what is the output of statement
"wdComponentAPI.getMessageManager().reportSuccess(res);" and where you are calling getName() method.
Other way can be set external break point for functrion module, and debug and check what is value being passed to back end.
Regards,
Ganga.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.