0

Is there any way i can get handle on value from views Column header??

I have one view and i have to display only selected column values inside a table with respect to the selected column header.

var colNames = new Array(); var Title=sessionScope.dbTitle; 
var vwName =     sessionScope.vwTitle;     
print ("view name"+ vwName);
if ((vwName != null) & (vwName != "Select")) { //var vwName="vwDbConfig";
print (vwName); 
var dbpath=@DbLookup("","vwDbConfig",Title,3);
var serName=@DbLookup("","vwDbConfig",Title,2);
var ArchDb:NotesDatabase = session.getDatabase(serName,dbpath);
//var ArchDb:NotesDatabase= database;
var Archvw:NotesView = ArchDb.getView(vwName);
var names:java.util.Vector = Archvw.getColumnNames(); 
TRR
  • 1,637
  • 2
  • 26
  • 43
  • 1
    please, add more details to your question – Frantisek Kossuth Nov 06 '12 at 11:33
  • var colNames = new Array(); var Title=sessionScope.dbTitle; var vwName = sessionScope.vwTitle; print ("view name"+ vwName); if ((vwName != null) & (vwName != "Select")) { //var vwName="vwDbConfig"; print (vwName); var dbpath=@DbLookup("","vwDbConfig",Title,3); var serName=@DbLookup("","vwDbConfig",Title,2); var ArchDb:NotesDatabase = session.getDatabase(serName,dbpath); //var ArchDb:NotesDatabase= database; var Archvw:NotesView = ArchDb.getView(vwName); var names:java.util.Vector = Archvw.getColumnNames(); – user1802880 Nov 06 '12 at 11:39
  • 1
    You should edit the question to include the source code. The comment makes it incredibly difficult to read it. – Henrik Aasted Sørensen Nov 06 '12 at 11:46
  • Still don't get it. But let me guess: you want to select from list of column titles and show view/table with values of selected columns only? – Frantisek Kossuth Nov 06 '12 at 11:48
  • @Frantisek Kossuth Yes..thats what my question is. – user1802880 Nov 06 '12 at 11:57

1 Answers1

0

Answer is: two repeats. Outermost repeat will iterate through view entries of binded view data source, variable "row". Inner repeat will iterate through collection of numbers - each represents index of selected column, variable "column". Repeat will render inside <td> tag computed text with binding row.getColumnValues().get(column). Adopt it to proper data type if necessary. Don't forget to add proper tags for header and rows.

Frantisek Kossuth
  • 3,524
  • 2
  • 23
  • 42