cancel
Showing results for 
Search instead for 
Did you mean: 

link to action in table view

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

By using [cell variants|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0310fd2-f40d-2a10-b288-bcbe0810a961?quicklink=index&overridelayout=true] its possible.

Regards,

surya.

Edited by: surya narayana on Apr 1, 2010 10:39 AM

christiansche
Active Participant
0 Kudos

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

christiansche
Active Participant
0 Kudos

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

Former Member
0 Kudos

Hi,

No, here i want to display files also on same colom as text and if there folders they as links.

Regards,

surya.