Dynamic DropDownByKey

Hi,
I'm creating a DropDownByKey:
select * from ycenas into corresponding fields of table lt_cenas.
loop at lt_cenas into ls_cenas.
    l_palias-value = ls_cenas-palias.
    l_palias-text = ls_cenas-palias.
    insert l_palias into table lt_palias.
endloop.
attribute_cenas->set_attribute_value_set(
      name = 'PALIAS'
      value_set = lt_palias ).
This inserts all values from ls_profile-palias in the DropDownByKey by I don't want to display duplicate values, how can I do that?
Regards

hi,
select * from ycenas into corresponding fields of table lt_cenas.
loop at lt_cenas into ls_cenas.
    l_palias-value = ls_cenas-palias.
    l_palias-text = ls_cenas-palias.
    insert l_palias into table lt_palias.
endloop.
DELETE ADJACENT DUPLICATES FROM lt_palias COMPARING value.
attribute_cenas->set_attribute_value_set(
      name = 'PALIAS'
      value_set = lt_palias ).
Regards,
akshay

Similar Messages

  • Binding Dropdownbykey to child node's attribute dynamically

    Hi..
    i am creating a child node "CHILD" and attribute attached to it "ATTR" dynamically. Also i create a dynamic dropdownbykey element and trying to attach the ATTR. then i get the following error. zdyn_date is data element with some fixed values. Please let me know as quick as possible.
    <b>"Adapter error in DROPDOWN_BY_KEY "KEY1" of view "ZDYN_DDKEY.MAIN": Context binding for property SELECTED_KEY cannot be resolved: The MAIN.1.CHILD node does not contain any elements"</b>
    METHOD WDDOMODIFYVIEW .
      DATA: LR_ROOT_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO,
            LR_CHILD_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO,
            cl_des type REF TO CL_ABAP_ELEMDESCR,
    ATTR_INFO TYPE WDR_CONTEXT_ATTRIBUTE_INFO.
      LR_ROOT_INFO = WD_CONTEXT->GET_NODE_INFO( ).
    CALL METHOD lr_root_info->ADD_NEW_CHILD_NODE
          EXPORTING
            NAME                         = 'CHILD'
          RECEIVING
            CHILD_NODE_INFO              = lr_child_info.
      ATTR_INFO-NAME = 'ATTR'.
      ATTR_INFO-TYPE_NAME = 'ZDYN_DATE'.
      CALL METHOD lr_child_info->ADD_ATTRIBUTE
        EXPORTING
          ATTRIBUTE_INFO = ATTR_INFO.
      DATA: LR_ROOT_CONTAINER TYPE REF TO CL_WD_TRANSPARENT_CONTAINER,
            LE_DD_KEY1 TYPE REF TO CL_WD_DROPDOWN_BY_KEY.
      LR_ROOT_CONTAINER ?= VIEW->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER' ).
      CALL METHOD CL_WD_DROPDOWN_BY_KEY=>NEW_DROPDOWN_BY_KEY
        EXPORTING
          BIND_SELECTED_KEY      = 'CHILD.ATTR'
          ID                     = 'KEY1'
        RECEIVING
          CONTROL                = LE_DD_KEY1. .
      CALL METHOD CL_WD_MATRIX_LAYOUT=>NEW_MATRIX_LAYOUT
        EXPORTING
          CONTAINER = LR_ROOT_CONTAINER.
      CALL METHOD CL_WD_MATRIX_HEAD_DATA=>NEW_MATRIX_HEAD_DATA
        EXPORTING
          ELEMENT = LE_DD_KEY1.
      CALL METHOD LR_ROOT_CONTAINER->ADD_CHILD
        EXPORTING
        INDEX     =
          THE_CHILD = LE_DD_KEY1.
    ENDMETHOD.

    Hi ,
    can u try to create the node and its attribute in some other method..like in some action or in WDDOINIT instead of wddomodifyview .bcoz its recommended not to modify the data of node in wddomodifyview ..
    hope it will solve ur problem .
    Regards
    Yash

  • Data population in a dropdown inside a Table in WebDynpro Java

    Hi All ,
    I have a table inside which there is a dropdown in a ZCI Form. I am using enumerated dropdown list.
    The issue is binding of this dropdown is not woking as it works for normal dropdown.
    I am getting pdfdocumentcreation exception if trying to bind this dropdown using dynamic binding.
    Anybody help me out to solve this issue.
    regards
    Ravindra

    Hi,
      Refer the below link you will get useful information
    Dropdownlist to display r3 table
    Re: DropdownList box to display R/3 table
    see this link for when to use DropDownByIndex (DDI) vs DDK (DropDownByKey) and how populate data from R/3.
    Re: webdynpro populating dropdown values programmatically
    create context value attribute and bind to drop down by key
    not getting value from DropDownByKey
    Dynamically adding values to dropdown by key thread
    Dynamicaly adding values to DropDownByKey
    Dropdown by key
    dynamic DropDownByKey
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/8613e41629344194e4f40393740d51/content.htm
    Regards,
    Saraswathi.
    Pls reward points for useful info
    Message was edited by: Saraswathi D

  • DropdownList box to display R/3 table

    Hi,
    I want to display a R/3 table of 5 columns in the dropdownbox with only one column, how can I do that?.
    Is this possible without simple types. Since we dont know the contents of drop-down box at design time, I cant use simple type. How can I achieve this feature?.
    Thanks.
    /sunita.

    Hi,
    If u want to populate values using a DropDownByKey UI Element this code will help you.
    IWDAttributeInfo ainfo = wdContext.node<<NodeName>>().getNodeInfo().getAttribute("<<Value Attribute that is bound to the Drop Down by Key element>>");
    ISimpleTypeModifiable st = aiinfo.getModifiableSimpleType();
    IModifiableSimpleValueSet vs = st.getSVServices().getModifiableSimpleValueSet();
    for(int i=0;i<wdContext.node<<name of the node>>().size();i++)
    vs.put(Key,Value}
    Also go through the following link to know more about Drop Down by key element.
    http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/frameset.htm
    Check this for a sample application using Drop Down by key UI element.
    http://help.sap.com/saphelp_nw04/helpdata/en/c6/a5d4a523bf4b4c9085a114e46c6ed3/frameset.htm
    Also check out the following discussion in forum :
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/search%21default.jspa%3FforumID%3D52%26threadID%3D52985
    dynamic DropDownByKey
    Regards,
    Saraswathi
    Pls reward point if it is useful information

  • Problem with Drop down by key

    Hi all,
          I Inserted several drop down by key in my view at design time. When I try to run the application it displays an error as
    java.lang.ClassCastException at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:202)
    My requirement is,
    I am getting a table with two fields(key,value) from R/3 I want to display these in the drop down by key box how to bind them to this drop down.

    Hi Refer the below link
    DropdownList box to display R/3 table  
    Re: DropdownList box to display R/3 table
    see this link for when to use DropDownByIndex (DDI) vs DDK (DropDownByKey) and how populate data from R/3.
    Re: webdynpro populating dropdown values programmatically
    populating dropdownbyvalue with the r/3 value?  
    Re: Regarding DropDown Box
    /message/2187817#2187817 [original link is broken]
    Re: DropdownList box to display R/3 table
    create context value attribute and bind to drop down by key
    not getting value from DropDownByKey
    Dropdown by key
    dynamic DropDownByKey
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/8613e41629344194e4f40393740d51/content.htm
    For DropdownbyKey
    http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/content.htm
    For DropdownByIndex
    http://help.sap.com/saphelp_nw04/helpdata/en/24/25e08d4ba6c743b55f1d375637ba8d/frameset.htm
    Regards,
    Saraswathi
    Pls reward points for useful info.

  • Error when trying to create a Dynamic UI Element(DropDownByKey)

    Dear All,
    I am trying to create a Dynamic UI element(dropdownbykey) .
    I used the following code which i wrote in domodify:
    if (firstTime)
    IWDTransparentContainer thetransparent =(IWDTransparentContainer)view.getElement("AttributeDynamic_TransparentContainer");
    IWDNodeInfo node = wdContext.getNodeInfo().addChild(
      "DynamicNode",null,true,true,false,true,false,true,null,null,null);
                              IWDAttributeInfo attr1=node.addAttribute("attrib00","ddic:com.sap.dictionary.string");
    IWDAbstractDropDownByKey Sizedropdown=(IWDAbstractDropDownByKey)view.createElement(IWDAbstractDropDownByKey.class,null);
    Sizedropdown.bindSelectedKey(attr1);
    thetransparent.addChild(Sizedropdown);
    When i deployed it i got the following error:
    com.sap.tc.webdynpro.services.exceptions.CreationFailedException: Cannot create view element implementation com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDAbstractDropDownByKey
    Can anyone please help me in this regard.
    Thanks and Regards
    Nishita Salver

    Dear All,
    Thanks for ur quick reply below is the entire error chain:
    com.sap.tc.webdynpro.services.exceptions.CreationFailedException: Cannot create view element implementation com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDAbstractDropDownByIndex
         at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:161)
         at com.sap.tc.webdynpro.progmodel.view.View.createElement(View.java:177)
         at com.sap.satyam.dynamic_attrapp.Dynamic_attrAppView.wdDoModifyView(Dynamic_attrAppView.java:184)
         at com.sap.satyam.dynamic_attrapp.wdp.InternalDynamic_attrAppView.wdDoModifyView(InternalDynamic_attrAppView.java:364)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
         at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:207)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Caused by: java.lang.NoSuchMethodException
         at java.lang.Class.getConstructorImpl(Native Method)
         at java.lang.Class.getConstructor(Class.java:554)
         at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:150)
         at com.sap.tc.webdynpro.progmodel.view.View.createElement(View.java:177)
         at com.sap.satyam.dynamic_attrapp.Dynamic_attrAppView.wdDoModifyView(Dynamic_attrAppView.java:184)
    Thanks and Regards,
    Nishita

  • Dynamically binding simpletype to a dropdownbykey??

    Dear All,
    How to bind a existing simpletype to a dropdownbykey UI element?
    I have set of simpletypes created and I want to assign them to dropdownbykey UI element ( statically created). How do I go about it?
    Pls help. Can anybody give me sample code for this?
    I am writing following code in my wdModifyView method:-
    IWDDropDownByKey combs = (IWDDropDownByKey) view.getElement(<UI element ID>);
    combs.bindSelectedKey(<simpletypename>);
    But it is throwing context exception "Unknown child node"
    regards,
    Amey

    See ... i have three context value attributes:-
    1. context value attribute : combs1 of type "com.myproject.simpletypes.combsList1"
    2. context value attribute : combs2 of type "com.myproject.simpletypes.combsList2"
    3. context value attribute : combs3 of type "com.myproject.simpletypes.combsList3"
    Now my purpose is to bind one of these attributes to a SINGLE dropdownbykey UI Element dynamically !!!
    That means initially I am binding combs1 to UI element's 'Selected key" property.
    I hope  i am explaining you my scenario correctly !!!
    regards,
    Amey

  • Dynamic Population of DropDownByKey/Index

    Hi,
    I'm using Adaptive RFC model to get data from SAP and I've to create DropDownByKey/Index dynamically and populate it with the data. I've Model node with attributes in the Controller context bound to the DataModel and also model nodes/attributes in the view context bound to controller context. But the data doesnt seem to be populated.
    The return from the RFC is just one internal table. Where exactly (in the code or otherwise) do i need to populate this dynamically created drop down unit?
    Any links/code would be greatly appreciated.
    Thanks,
    Rajit.

    Hi Rajit,
    I have been creating DropDownByKey elements with dynamic values by following Example A under "Code Example of Key Binding" in the IDE help.  I just use a loop on the internal table to populate the value set that's bound to the context node attribute with the desired key/value pairs.
    Hope this helps.
    Best regards,
    Loren
    Message was edited by: Loren Woo

  • How to populate values dynamically in dropdownbykey

    Hi All,
    My requirement is to populate the dropdown filled in with values( and key) which are coming from the ZBAPI call ie web service model.
    How do i achieve this ?
    Kindly provide me with some pseudo code.
    Reg/Venkat

    Hi Venkat,
              You can populate dropdown values from webservice using the following steps. I assume you gave idea about custom controller.
    step1:
          Create custom controller.Inside custom controller Bind input value then execute webservice.
    step2:
          Now you have value node which is returned from web service. find thr size of value node.  
    After execute web service you can find size using the following code. create value node and model node object using the code.
    Step3:
    <custom controller name>.IRole_ResultNode modelnode=wdContext.nodeRole_Result();
    <custom controller name>.IRole_OutputNode valuenode=wdContext.nodeRole_Output();
    valuenode.invalidate();
    int size=modelnode.size();
    Step4:
         After find size using loop fetch values from model node into value node.Asume in this value node contains key and value.
    for(int x=0;x<modelnode.size();x++){
    <custom controller name>.IRole_ResultElement  modelElement=modelnode.getRole_ResultElementAt(x);
    <custom controller name>.IRole_OutputElement valueElement=wdContext.createRole_OutputElement();
    valueElement.setId(modelElement.getKey());
    valueElement.setText(modelElement.getValue());
    valuenode.addElement(valueElement);
    step5:
    After that bind this value node(Role_Output) into Component controller. Then Bind value node(Role_Output) from component controller into view.
    Step6:
    Finally bind dropdown UI Element into Role_Output node's attribute(ID).
    Kind Regards,
    S.Saravanan

  • Check mandatory dropdownbykey

    In my view I have two dropdownbykey elements. After a push on the button I want to check if a value in the dropdown is selected.
    I found the following code to check "simple" inputfields:
    public void checkMandatory( java.lang.String fieldname )
        //@@begin checkMandatory()
        IWDMessageManager msgMan = wdComponentAPI.getMessageManager();
        String value = wdContext.nodeProject().currentProjectElement().getAttributeAsText(fieldname);
        IWDAttributeInfo projectAttr = wdContext.nodeProject().getNodeInfo().getAttribute(fieldname);
        if (value.length() == 0) {
             msgMan.reportContextAttributeMessage(
                  wdContext.nodeProject().currentProjectElement(),
                  projectAttr,
                  IMessageCCAdvice.MISSING_INPUT,
                  new Object[] { fieldname },
                  true);
        //@@end
    But if I run this a dump appears on
    String value = wdContext.nodeProject().currentProjectElement().getAttributeAsText(fieldname);
    It works fine for "simple" inputfields but not for the dropdown fields.
    Can anybody help me?
    Thanks in advance.
    Michael

    Hi
    Do dynamic validation this way, its generic for every string attribute, regardless of the UIElement..:
    //Method on the view
    public void checkMandatory( java.lang.String[] pathNodeNames, java.lang.String attributeName, java.lang.String placeHolder )
        //@@begin checkMandatory()
          //MessageManagerInstance
          IWDMessageManager messageManager =     wdComponentAPI.getMessageManager();
          IWDNode node = wdContext;
          Object attributeValue = null;
          IWDAttributeInfo attributeInfo = null;
          //Find the attribute within context tree
          if (pathNodeNames.length == 0)
               //Let's get the attribute value          
               attributeValue = wdContext.currentContextElement().getAttributeValue(attributeName);
          else
         for(int i=0; i< pathNodeNames.length; i++)
           //Go a level down within context tree
           node = node.getChildNode(pathNodeNames<i>, IWDNode.LEAD_SELECTION);
          //Let's get the attribute value          
          attributeValue = node.getCurrentElement().getAttributeValue(attributeName);
          //Extract attribute info
          attributeInfo = node.getNodeInfo().getAttribute(attributeName);
          //Check if the string is null or empty, and report nulls/empties to messagemanager
          if (isEmptyField(attributeValue))     
               messageManager.reportContextAttributeMessage(node.getCurrentElement(),
                   attributeInfo, IMessageCCAdvice.MISSING_INPUT, new Object[] { placeHolder }, true);
        //@@end
      //Metodo on the view
    public boolean isEmptyField( java.lang.Object attributeValue )
        //@@begin isEmptyField()
          String stringValue;
          if ((attributeValue != null))
               stringValue = attributeValue.toString();
               if (stringValue.trim().length() > 0)
                 return false;
          return true;     
        //@@end
      //Method which will manage dynamic validation to achieve business rules
       public void doValidateFields( )
          if (someCondition())  //You can validate based on conditions, in order to apply business rules sucessfully
            //Array of Strings would go empty if the attribute is located in context root
            //wdContext -->attribute
            this.checkMandatory(new String[]{} , fieldname , "placeholderValue");
          else
            //Careful here, you'll send one element inside the array of String for each subnode in context tree in which attributeName is located
            //on your case, within context root you have a node called "Project", and your attributeName inside "Project"
            //wdContext-->node "Project"--> attribute "fieldName"
            checkMandatory(new String[]{"Project"}, "fieldName", "placeholder text of your choice if needed");
            //Show error messages if thats the case
               wdComponentAPI.getMessageManager().raisePendingException();
    Just call the method doValidateFields whenever you want to apply dynamic validation.
      public void onActionRejectLoanRequest(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionRejectLoanRequest(ServerEvent)
         //Execute validations
         doValidateFields();
         //ATTENTION:  If at least one field didn't pass validation,
         //                    this Action's code will stop HERE, next lines
         //                    won't execute. Nice uh?
         //Call method of Loan Reject in CompController to execute reject actions
         wdThis.wdGetLoansAdministrationCompController().doRejectRequest();
        //@@end
    Normally, i use some generic error message, and pass the name or description of the value i'm validating, something like:
    "The value is mandatory, please select or enter a valid value".
    It could be generic too (passed as parameter) , with a few more refinement of this method.
    Regards
    Julio C. Herrera Cuevas

  • Dynamically applying OVS on input field

    Hi,
    I have table with drop DropDownByKey UI element in one column. In all the other columns i have input field. Now based on the value of the DropDownByKey i have to apply the OVS on the input fields of the table column.
    Now my question is how can i apply the OVS dynamically.
    I can not change the properties of attributes, so want to change them dynamically.
    Thanks,
    Reeha Verma.

    Hi,
    You can check the value of context attribute binded to dropdown(KEY) and accordingly formulate the Input structure and output table.
    It seems that you have to do the data declecration in advance for all the possible values of dropdown.
    If you want to avoid the data decleration in advance then i think you have to dynamically create the context node and attribute to acheive the functionality.
    If you have limited values in DropDown then i think you can go with data decleration otherwise please try out with Dynamic context programming.
    Thanks,
    Rahul

  • Sorting of dynamical  created table

    Hi,
    i created a context node for a table uielement and added in wddoinit method some attributes.
    The celleditor vor according columns is a DropDownByKey .
    How can i sort my table by one of this dynamical attributes/columns ?

    Hi ,
          I would like to explain the code in more detail
    DATA: lv_slno type string value 'SLNO',  " SLNO is your column name by which you want to sort
               lo_node type ref to if_wd_context_node.
      FIELD-SYMBOLS :
        <lv_table>  TYPE STANDARD TABLE.
    Get the reference of your table node into lo_node
    lo_node = wd_context->get_child_node(  'ABC' ).  " Assuming ABC is the node name
    Get the data of the node
    lo_node->GET_STATIC_ATTRIBUTES_TABLE(
                                                        IMPORTING TABLE = <lv_table> ).
    Sort the data in the table
    SORT <lv_table> BY (lv_slno) DESCENDING.
    Bind the sorted data again 
    lo_node->bind_table( <lv_table> ).
    I hope it is clear now . Let me know in case of any confusion .
    Regards
    Vivek

  • DropDownByKey UI Element and Model Attribute

    Hi
      The DropDownByKey UI Element can be linked to value attribute, which are simple types.
    Now if i try to link them to model attribute which are simple types pertaining to some model classes, its not happening.
    so my question is how to attach any DropDownByKey UI Element with Model attribute which will get data from model to which it is attached?
    thanks
    Srikant

    D.V.,
    Whether or not DDK (DropDownByKey) works with model attribute depends on type of attribute (actually, type of model class property that stays behind this attribute)
    If the type contains enumeration itself then DDK works.
    So, you have the following options (dynamically populating values set will not work here):
    1. Alter type on back-end to include enumeration
    2. Use DDI (DropDownByIndex) as suggested here
    3. Create sub-node with cardinality 1..1 (better keep singleton false), then add value attribute with the same basic type (string, int etc) and set it flag calculated to true. WD will generate getter / setter for this attribute -- just return / set original model attribute in this method. Next:
    3.a Either create new simple DDIC type for calculated attribute and define enumeration here
    3.b Or modify SVS of calculated attribute at run-time as suggested in this thread
    Valery Silaev
    EPAM Systems
    http://www.netweaverteam.com/

  • 7.1: Filling choice of DropDownByKey widget

    This is a question for NW Mobile 7.1
    Dear all,
    we want to use the DropDownByKey widget of WebdynPro for Java on the mobile client.
    we want to fill the list of choices from a table in our data base
    we have a data model, data service, and an operation that returns a result set with just one column
    we are able to display this result set in a single column table (for testing)
    now we want to fill the choices of the DropDownByKey widget with that result set
    how would we do this? I could not find any documentation that helps.
    The examples in the documentation only refers to java lists of strings (like the names of the months) which are then added to the choice list using "put" for each value of the list.
    Any ideas?
    Thanks in advance, Andre
    Edited by: André Gerdts on Jun 19, 2008 3:49 PM
    to clarify: we are developing for PDAs
    A.

    Hi Jan,
    this information is very helpful and we got it to work in the case that all the records of the helper table should be used to fill the dropdown list.
    In the declaration of the helper, it is only possible to specify a data object and the relevant columns. As far as we can see, it is not possible to be more selective to only use certain records based on a filter with input from some other dynamic value.
    The case:
    - we have 4 DropDownLists.
    - the selected value of one DropDown widget determines the subset of allowed values for the next DropDown widget
    - all super sets of allowed values are in Data Objects downloaded from the backend. Simplified, they consist of just 2 columns: filter column and value column. We need to select on the filter column to only load the the values from the value column
    we don't see that we can abstract such a query with an input parameter in such a way, that we can specify it as the helper table.
    Is this a limitation of the feature? or did we miss something?
    Cheers, Andre

  • Assigning values dynamically to drop down

    Hi,
    I have drop down for which i have to assign values dynamically, I am getting values as a form of Array list.

    Hi Venki,
    Say your ArrayList is al . Create a value attribute under the root node. Say test. Bind this test to the DropdownByKey UI element. You can populate test attribute like this.
    IWDAttributeInfo attributeInfo =
    wdContext.getNodeInfo().getAttribute(IPrivate<viewname>View.IContextElement.TEST);
    ISimpleTypeModifiable valuesType =
    attributeInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet VS=
    valuesType.getSVServices().getModifiableSimpleValueSet();
           for (int i = 0; i < al.size(); i++) {
              VS.put(al.get(i),""+al.get(i));
    Regards
    Siva

Maybe you are looking for

  • Firefox will not open even after update or in safe mode using windows button + R

    Tried solitions given on site using IE. Firefox will not start at all, did latest update and tried safe mode start. Only get box stating it has encounterd a problem and crashed. I only use firefox and have so many bookmarks I really don't want to uni

  • HP Pavilion DV3

    HI Have a serious problem with the sound on my lap top . Whenever i try using SKYPE the system throws up an error message whih reads as follows " Problem with Playback device " . Screeeching noise and bad disturbance just doesnot allow me to use skyp

  • I need part number 605364-001 for Pavilion dv7-4177nr

    HP Pavilion dv7-4177nr Part # 605364-001 Part type: DC Power Jack with cable attached This is the part I am looking for to replace any help would be nice.  I can not find a true HP replacement.

  • IMac "Retina" VRAM is it enough for Photoshop CC 2014?

    I want to get the new Retna iMac, but don't know how much video ram (VRAM) I need. I only do photo processing, not video. Does anyone have any experience yet? Thanks, Steve

  • Sold an iOS unit - forgot to logout from iCloud - will there be problems?

    So, I sold my iOS unit, and before you sell it, you are supposed to do the following steps, as instructed on the following website: What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support: Before you sell or give awa