on 05-31-2005 8:00 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let me be more specific:
The table should be a worker evaluation table.
Each row represents an evaluation parameter which can be: Excellent, Very Good, Poor ect. These values are at each coloum header.
A user should be able to select at each row (which represents a single evaluation parameter) one grade (Excellent, Very Good, Poor ect).
Ok, then applying this to my example:
1. Node in context (cardinality 1..1, selection 1..1) is Grades, with attributes Excellent (="Excellent"), VeryGood (="Very Good") etc
2. Your table node say has the following structure
EmployeeSkills
-- SkillName
-- Grade
3. Now in table you create columns with radio button cell editors, you are assignin keyToSelect property to Grades.Excellent, Grades.VeryGood et. (btw, you may just statically type this values with no binding and ommit step 1)
4. Also selectedKey property of every radio button is bound to EmployeeSkills.Grade attribute
VS
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
i think it'll work like this.
right click your table uielement and insert table column. then right click your table column and then insert tablecelleditor, then you'll get a list of uielements you can choose. from that choose radio button. then create two context attributes 'keytoselect' and 'selectedkey' and bind them to the keyToSelect and selectedKey property of the radio button. please make sure that the 'keytoselect' and 'selectedkey' context attributes are created under the node you have created for the table. When you set the other attributes of table node also set the value of 'keytoselect' attribute.
IPrivateTestView.ITable2Node tnode2 = wdContext.nodeTable2();
IPrivateTestView.ITable2Element telem2 = tnode2.createTable2Element();
telem2.setName("rahul");
telem2.setKeytoselect("r");
tnode2.addElement(telem2);
IPrivateTestView.ITable2Element telem3 = tnode2.createTable2Element();
telem3.setName("piyush");
telem3.setKeytoselect("p");
tnode2.addElement(telem3);
now in the onSelect property of the radio button write a function. under that function get the value of 'selectedkey' and write the code for the action you want to perform when appropriate row of table is created.
hope this will work.
regards
Rahul.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.