on 03-31-2010 10:35 AM
Hi,
I created one table view in that one colom created as link to action in this colom i displayed km folders data whenever i clicked on folder then subfolders will be disaplayed in the same table all these i got result but if there any file in folders they also display like link here i checked condition is resourse have collection enabled link to action otherwise linkto action disabled even after disable link to action also filenames display as link.How can i achive this requirement please provide me any idea.
Thanks and Regards,
surya.
For implementing a file browser you better use a TreeByNestingTableColumn as master column of the table which gives you a hierarchical table structure.
For displaying folders as links and files as non-clickable links you can either
- use table cell variants with LinkToAction and TextView as cell editors or
- just disable the link for the file rows and use type=WDLinkType.RESULT.
Example:
Context
+ Rows (table data source node)
+ dirEntry: File
+ linkEnabled (boolean, calculated=true)
+ linkType (LinkType, calculated=true)
Bind the "enabled" property of the LinkToAction to attribute "linkEnabled" and the "type" property to "linkType". Implement the calculated attributes like
boolean getRowsLinkEnabled(IRowsElement element)
{
return element.getDirEntry().isDirectory();
}
WDLinkType getRowsLinkType(IRowsElement element)
{
return element.getDirEntry().isDirectory() ? WDLinkType.NAVIGATION : WDLinkType.RESULT;
}
But as mentioned, I would prefer using TreeByNestingTableColumn or table cell variants.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
as I said, in this case, you will have to change the UI element programatically. How to do this, you can read in the following links:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0b8dd16-5d78-2c10-6f82-c88fe4a7cae1
Or you can search youself SDN for dynamic handling of UI Elements.
Best regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try not to disable the link. a disabled link is still visible. try the propery "visibility". there you can set visible, blank, or none. set blank or none if the resource != collection. so nothing will be displayed, if it is a file.
if you want he files not to appear as links, but as text, you have to change the UI element. then you should use TextView or Label.
Best regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.