Ignore:
Timestamp:
2018-10-30T10:30:53+13:00 (5 years ago)
Author:
kjdon
Message:

receptionist now passes languageList (from interfaceConfig) to teh actions, so an action can add it into the page response if it needs to, rather than the receptionist adding it in to every page. its only ever used in prefs page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r31871 r32549  
    133133        setUpInterfaceOptions(config_elem);
    134134
     135        Element lang_list = (Element) GSXML.getChildByTagName(config_elem, "languageList");
     136        if (lang_list == null)
     137        {
     138            logger.error(" didn't find a language list in the config file!!");
     139        }
     140        else
     141        {
     142          this.language_list = lang_list;
     143        }
     144       
    135145        Element action_list = (Element) GSXML.getChildByTagName(config_elem, GSXML.ACTION_ELEM + GSXML.LIST_MODIFIER);
    136146        NodeList actions = action_list.getElementsByTagName(GSXML.ACTION_ELEM);
     
    156166            ac.configure();
    157167            ac.addActionParameters(this.params);
     168            ac.setLanguageList(this.language_list);
    158169            this.action_map.put(action_name, ac);
    159170
     
    175186                this.xslt_map.put(map_key, subxslt);
    176187            }
    177         }
    178         Element lang_list = (Element) GSXML.getChildByTagName(config_elem, "languageList");
    179         if (lang_list == null)
    180         {
    181             logger.error(" didn't find a language list in the config file!!");
    182         }
    183         else
    184         {
    185           //this.language_list = (Element) this.doc.importNode(lang_list, true);
    186           this.language_list = lang_list;
    187188        }
    188189
Note: See TracChangeset for help on using the changeset viewer.