on 02-09-2007 9:43 PM
Hi All,
Please let me know is it possible to have Input Field in one cell and Text View in another cell of table column.
Thanks and Regards,
Gangadharayya.
Gangadharayya,
You may use different cell editors in same column only in NW04s (7.0) -- see API docs/tutorials about CellVariant feature. In NW04 (6.40) all rows may have only one type of editor for given column.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gangadharayya,
Fortunately, you do not need any programming, everything is done via designer, so I will not post any code
1. Create one type of cell editor on column, say InputField, and bind it to context attribute. This is regular procedure.
2. Right-click on column, add cell variant from menu (use standard cell variant). Set its name and remeber it (say, MyTextView).
3. In cell variant create TextView as cell editor and bind it to context attribute
4. Now in context node create attribute of type String, name it for example SelectedCellVariant
5. Bind property cellVariant of column to SelectedCellVariant attribute.
Now you need a bit of coding Either in supply function for node used as table data source or iteratevly via node elements set SelectedCellVariant either to null or to "MyTextView" string. Afterwards you will see at run-time InputField for rows where SelectedCellVariant is null and TextView where its value is MyTextView.
Valery Silaev
SaM Solutions
Hi,
Thanks for your reply.It has almost solved my problem. But can you please elaborate statement "<b>Either in supply function for node used as table data source or iteratevly via node elements set SelectedCellVariant either to null or to "MyTextView" string"</b>
Please explain me how we can do it in
1) supply function
2) iteratevly via node elements --in ViewController in which method (i.e. doInit or doModifyView ) we need to do this.
And for this, we need to have access to table in View Controller methods. But I dont know how to access table in View controller methods.
Thanks in advace,
Gangadharayya.
Gangadharayya,
First and foremost, you don't have to access Table (UI control) in view controller methods, you should just create/modify context node elements and WD binding (UI-control-properties -> context-node-attributes) do the rest.
Now the specific depends on how you populate your context node elements.
Say, you have defined supplyFunction for context node (laizy or on-demand controlled loading of elements). In this supply function you are adding elements to node. Just set an attribute value here.
Otherwise, you might adding elements "manually" in repsonse to user operations via wdContext.node<YourNode>.addElement() or you are using RFC model with supplying relation roles. In this case, you have just to iterate over all elements in node with java "for" loop and set attributes here.
Valery Silaev
SaM Solutions
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.