Changeset 16065

Show
Ignore:
Timestamp:
19.06.2008 12:01:01 (12 years ago)
Author:
mdewsnip
Message:

(Adding dynamic classifiers) Changed the links generated for parent/current classifier nodes in vlistbrowserclass to use ".pr" instead of trying to work out the parent OID, to avoid this code needing to know about hierarchy separators.

Added code in dynamicclassifieraction for resolving the ".pr" bits.

Location:
gsdl/trunk/src/recpt
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/recpt/dynamicclassifieraction.cpp

    r16061 r16065  
    158158  textout << outconvert << disp << classifier_header_format_statement << "\n"; 
    159159 
     160  // Resolve any ".pr" bits at the end of the "dcn" argument 
     161  if (ends_with (args["dcn"], ".pr")) 
     162  { 
     163    // Change the "dcn" argument to be the OID of the parent of the specified classifier node 
     164    text_t::iterator parent_classifier_node_OID_end = findlastchar (args["dcn"].begin(), args["dcn"].end(), '|'); 
     165    if (parent_classifier_node_OID_end != args["dcn"].end()) 
     166    { 
     167      args["dcn"] = substr (args["dcn"].begin(), parent_classifier_node_OID_end); 
     168    } 
     169    else 
     170    { 
     171      args["dcn"] = ""; 
     172    } 
     173  } 
     174 
    160175  // Output the dynamic classifier, beginning with the (optional) grouping nodes 
    161176  text_t selected_grouping_node_OID = ""; 
  • gsdl/trunk/src/recpt/vlistbrowserclass.cpp

    r15950 r16065  
    394394      { 
    395395        icon = "_document:iconopenbookshelf_"; 
    396  
    397         // dcn value is the OID of this node's parent 
    398         text_t::iterator hierarchy_split_position = findchar(section.OID.begin(), section.OID.end(), '|'); 
    399         if (hierarchy_split_position != section.OID.end()) 
    400         { 
    401           classifier_node_dcn = substr (section.OID.begin(), hierarchy_split_position); 
    402         } 
     396        classifier_node_dcn = section.OID + ".pr"; 
    403397      } 
    404398      // Child node