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

Can this UI rendering can be created in DynPro?

Hello,

I would like to create the following UI:

A table which will contain X Rows.

Each row has a title and a liitle triangle at it's side. Pressing this triangle will open Y Rows, pressing the triangle again will hide these rows and show the title again.

I know this view can be created in .NET environment, my question is if it can also be created using the DynPro UI tools.

Roy

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 31, 2005 at 10:17 AM

    Hi Roy,

    If u have say three Radio Buttons a,b,c...

    In the value node create three attributes keytoselect A,keytoselect B,keytoselect C and assign each one to the key to select of each RB a,b,c.

    Create one more attribute in the value node called selectedKey and assign this to the selected Key of all the three RB(a,b,c).

    Regards

    Bharathwaj

    Message was edited by: Bharathwaj R

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2005 at 08:09 AM

    Hi ,

    You might be binding the node to value node. In that create a attribute of type boolean and set its value to false for all the elements.

    Bind it to keytoselect property of RB.

    Then create a context attribute outside the node and bind it to the selected key

    This will store the value of the RB selected.

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Do the following:

      1. In view context create node KeysToSelect with cardinality 1..1, selection 1..1 and supply function

      2. In node KeysToSelect add N string attributes, where N is number of columns with radio button, let us name them for example (N=3) KeyToSelect1, KeyToSelect2, KeyToSelect3

      3. Initialize attributes mentioned in supply function (create single element, set attributes and add it to node)

      4. In table node (0..n) create string attribute SelectedKey

      5. Create N columns with radio button cell editor.

      6. For i-th column bind radio button keyToSelect attribute to KeysToSelect.KeyToSelect<i> attribute, also bind selectedKey to SelectedKey attribute of table node.

      Done

      VS

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2005 at 07:53 AM

    Hi Roy,

    There is no direct way to do it. But we can simulate it in a very similar way. Go to the table column 's table header ->property: image source ,add the traingle image.

    In the table column define an action.

    Create a context attribute of type integer and set it to the no of rows u need for the table.

    IN modify view get the table element and set the property no of visible rows to the context attribute rows.

    IWDTable t = (IWDTable)view.getElement("Table");

    t.setVisibleRowCount(wdContext.currentContextElement().getRows());

    To toggle the no of rows in each press ..on action of the table column

    we can say

    if(wdContext.currentcontextelement.getnoofreows() == 20)

    {

    set it to 5

    }

    else {

    set it to 20

    }

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      1oq very much Bharathwaj.

      And I another q if you don't mind.

      Do you happen to know how do I create a table that each row will contain Radio buttons but in each row only one Radio button could be selected? In particular, How should the Context and the Table bindings should look like

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2005 at 08:59 AM

    Hi Roy,

    Bind keytoSelect and selectedKey to string attributes.

    Selectedkey of all the radio buttons should be bound to a single context attribute.

    Otherwise we cant select or toggle the RB's.

    SelectedKey will give the KeytoSelect 's value of the selected radio button

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Valery/Baharathwaj,

      It is working!

      while (true)

      {

      System.out.println("10q very very much!!!");

      }

      I really appriciate all your help and support at this post, if I could I'd give you as much points as this loop goes... 😊

      I think my main misunderstanding here was the cardinality and the selection, I don't think I deeply understand what it means and this is the key issue here right?

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2005 at 09:40 AM

    Hi Roy,

    I will tell u what i have understood.

    Assuming there are 5 rows and 5 columns.

    Each row will have more than one column with a radio button.

    You want each row to have one selected key .

    Then create the selected key attribute in the value node itself and bind it.That way each row will have one selected key which is common for all the RBs in that row.

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2005 at 10:52 AM

    u can do that using a UIElement in Table.

    in table uielement Insert MasterColumn -> TreeByNestingTableColumns.

    create a node that should contain a recursive node.

    now in TreeByNestingTableColumns property, map the necessary fields like :

    childrenLoaded - tells if the children are loaded.

    expanded - if the node is expanded.

    isLeaf - whether its the last node.

    with the value attributes in value node.

    now create an event and map it to onLoadChildren property. and include a parameter of type NodeElement in the onActionEvent()

    eg: public void onActionTestLoad(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.satyam.treetable.wdp.IPrivateTreeTableView.ITestElement element )

    populate the table with initial values by creating node elements of the node in doInit() or supplyFuction().

    the triangles that u where talking about are created automatically.

    onclicking the triangle onLoadChildren is called. create node elements and add it to the invoking element.

    now the sub nodes are populated under this invoking element. clicking on the triagle helps you to expand and collapse the subnodes.

    write this code in "wdDoModifyView()"

    if(firstTime)

    {

    IWDTreeByNestingTableColumn uiElement = (IWDTreeByNestingTableColumn) view.getElement("MasterColumnID");

    ele.mappingOfOnLoadChildren().addSourceMapping("path","element");

    }

    hope this might help you.

    note: make sure, after populating the subnodes make the childrenLoaded of the invoking element as true.

    regards,

    Piyush.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2005 at 11:18 AM

    Hi Roy,

    I have tried the scenario. Its working with the idea i had suggested. Since each row will have one selected key attribute it will satisfy ur requirement.(No of key to select will be equal to the no of radio button) Go through my previous post and if u cant still get it i can send u that sample project..But it is not that complex.

    No run time assignment required..

    Regards

    Bharathwaj

    Message was edited by: Bharathwaj R

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2005 at 11:54 AM

    Hi Roy,

    Where do i send it..email id ?

    When each row has its own selected key and key to select attributes it wont affect..

    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.