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

Dynamic Web Dynpro Project

Noufal,

I am working on a WD app wherein I need to dynamically populate dropdownlists, input fields. Dynamic values are contained in an object that has propertiy values such as id, text (could be a value set), read-only flag, labelid flag etc.....

My issue is depending on the UI element type (dropdownlsit, input field, checkbox etc..) I may have to populate UI element corresponingly. I do not want to yse context nodes to bind values, as I have way too many fields to populate. My question to you is as follows:

1) How do I know the type of the element ?

2) How do I populate the dropdown list ?

3) Show the view manipulation be done only in the wdDoModifyView method only ?

If you have posted code for some of my questions, please paste in your response once again....

Thanks,

Sri

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 13, 2005 at 06:07 AM

    Can you please give some more details?

    Are the UI elements statically defined or do you want to create them programmatically from some configuration data?

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      To add up to the above post you can also get the attribute by specifying the attribute name.

      wdContext.getChildNode(nodename,int index).getElementAt(int index).getAttributeValue(String attribute);

      Hope that helps.

      Regards

      Noufal

  • author's profile photo Former Member
    Former Member
    Posted on May 13, 2005 at 05:55 AM

    Hi srikanth ,

    1, For getting the type of the element use the generic UI element object.getClass()

    IWDUIElement a[] = t.getChildren();

    for(int i =0;i<a.length;i++){

    wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(a<i>.getId());

    IWDUIElement i1 = (IWDUIElement)view.getElement(a<i>.getId());

    wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(""+i1.getClass());

    }

    2. To populate a drop downlist

    ISimpleTypeModifiable stmObj =(ISimpleTypeModifiable)wdThis.wdGetAPI().getContext().getModifiableTypeOf(<"attr name which is mapped to drop down">);

    IModifiableSimpleValueSet valueSet =(IModifiableSimpleValueSet) stmObj.getSVServices().getModifiableSimpleValueSet();

    valueSet.put(id1,id1);

    3.Yes ,anything and everything related to UI element properties should be accessed and modified only in wdDoModifyView

    Regards

    Bharathwaj

    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.