Skip to Content
0
Former Member
Jan 04, 2008 at 04:56 AM

need to pass the user selected value to database as input and get output

18 Views

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