Skip to Content
author's profile photo Former Member
Former Member

how to assign a SVS to a valueatt that inside a valuenode

Hi Frndz...

I did well with simple value services for single valueattribute with this code

IWDAttributeInfo attributeInfo =

wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.COUNTRY);

ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

(* this is for only with single valueattribute)

But as per my requirement,i have to do this with valuenode inside it with value attribute ......

can anyone help the code for this ,itz vvvvvvv urgent for me.......

Regards

Rajesh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2008 at 08:21 AM

    Hi,

    Your code should be like this:

    -


    IWDAttriuteInfo attrInfo = wdContext.node<value node name>().getNodeInfo().getAttribute(I<value node name>Element.<ATTRIBUTE NAME>);

    //the rest of the code remains same.

    -


    Regards,

    Satyajit.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2008 at 12:14 PM

    Hi,

    "I did well with simple value services for single valueattribute with this code

    IWDAttributeInfo attributeInfo =

    wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.COUNTRY);

    ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

    "

    Only change that you have to do is point to the valuenode and then get the nodeInfo

    Ex: If your value node name is MyNode which contains an attribute Country then you code will be as follows

    IWDAttributeInfo attributeInfo =

    wdContext.nodeMyNode().geNodeInfo().getAttribute("Country");

    ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2008 at 08:48 AM

    Hi All,

    The code goes like this, but the data is not getting populated.

    "controller_curr" is the value attribute under the node "InitTable" in the controller which is further mapped to view controller with the same structure.

    The data is geting printed through the message manager just before the line

    divSMT.put(currency,currency); in this code, at the end.

    But "divSMT.put" is not able to populate the data.

    _________START________

    public void currency( )

    {

    //@@begin currency()

    IWDMessageManager msg = wdComponentAPI.getMessageManager();

    ISimpleTypeModifiable objSimpleTypeCurr = null;

    IModifiableSimpleValueSet objSimpleValueSetCurr = null;

    String currency=null;

    String bandg = null;

    Z_Bapi_Get_Curr_Rate_Input authCurrDet = null; //for FCURR

    Try

    {

    authCurrDet = new Z_Bapi_Get_Curr_Rate_Input();

    wdContext.nodeZ_Bapi_Get_Curr_Rate_Input().bind(authCurrDet);

    wdContext.nodeZ_Bapi_Get_Curr_Rate_Input().currentZ_Bapi_Get_Curr_Rate_InputElement().modelObject().execute();

    IWDAttributeInfo objSimpleValueSetCurr1 = wdContext.nodeInitTable().getNodeInfo().getAttribute("controller_curr");

    ISimpleTypeModifiable countryType = objSimpleValueSetCurr1.getModifiableSimpleType();

    IModifiableSimpleValueSet divSMT = countryType.getSVServices().getModifiableSimpleValueSet();

    int sizeofCurrencyFCURR = wdContext.nodeOPCURROutput().nodeIt_Curr_Rate().size();

    msg.reportSuccess("SizeofCurrency FCURR : "+sizeofCurrencyFCURR);

    for(int i=0;i<sizeofCurrencyFCURR;i++)

    {

    currency = wdContext.nodeOPCURROutput().nodeIt_Curr_Rate().getIt_Curr_RateElementAt(i).getFcurr();

    msg.reportSuccess("Currency : "+currency);

    divSMT.put(currency,currency);

    }

    }

    catch(Exception e)

    {

    }

    //@@end

    _________END________

    Please look into the issue.

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.