Changeset 4144


Ignore:
Timestamp:
2003-04-15T10:50:26+12:00 (21 years ago)
Author:
kjdon
Message:

all stuff for the page generated by teh Receptionist (config and display) is now put into a pageExtra element, so actions only need to append one extra piece to the page

Location:
trunk/gsdl3/src/java/org/greenstone/gsdl3
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/AppletAction.java

    r3996 r4144  
    7777    Element page = doc_.createElement(GSXML.PAGE_ELEM);
    7878    page.setAttribute(GSXML.LANG_ATT, lang);
    79     // add the lang stuff from message
    80     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.DISPLAY_ELEM), true));
    81     // add the config stuff from message
    82     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true));
     79    // add the page extra stuff from message
     80    page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.PAGE_EXTRA_ELEM), true));
    8381
    8482    // add in the page Request
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/BrowseAction.java

    r4080 r4144  
    3333    Element page = doc_.createElement(GSXML.PAGE_ELEM);
    3434    page.setAttribute(GSXML.LANG_ATT, request.getAttribute(GSXML.LANG_ATT));
    35     // add the lang stuff from message
    36     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.DISPLAY_ELEM), true));
    37     // add the system stuff from message
    38     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true));
     35    // add the page extra stuff from message
     36    page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.PAGE_EXTRA_ELEM), true));
    3937
    4038    return classifierBrowse(page, request);
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r4036 r4144  
    8787    page.setAttribute(GSXML.LANG_ATT, lang);
    8888
    89     // Add the display element, config stuff, and original request from the message
    90     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.DISPLAY_ELEM), true));
    91     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true));
     89    // Add the page extra element,  and original request from the message
     90    page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.PAGE_EXTRA_ELEM), true));
    9291    Element page_request = GSXML.duplicateWithNewName(doc_, request, GSXML.PAGE_REQUEST_ELEM, true);
    9392    page.appendChild(page_request);
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/PageAction.java

    r3987 r4144  
    3030    Element page = doc_.createElement(GSXML.PAGE_ELEM);
    3131    page.setAttribute(GSXML.LANG_ATT, request.getAttribute(GSXML.LANG_ATT));
    32     // add the lang stuff from message
    33     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.DISPLAY_ELEM), true));
    34     // add the system stuff from message
    35     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true));
     32    // add the page extra stuff from message
     33    page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.PAGE_EXTRA_ELEM), true));
    3634    // add the cgi args request
    3735    Element page_request = GSXML.duplicateWithNewName(doc_, request, "pageRequest", true);
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/ProcessAction.java

    r4001 r4144  
    107107    }
    108108   
    109     // add the lang stuff from message
    110     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.DISPLAY_ELEM), true));
    111     // add the system stuff from message
    112     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true));
    113    
     109    // add the page extra stuff from message
     110    page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.PAGE_EXTRA_ELEM), true));
    114111
    115112    // another part of the page is the service description
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/QueryAction.java

    r4093 r4144  
    2929    Element page = doc_.createElement(GSXML.PAGE_ELEM);
    3030    page.setAttribute(GSXML.LANG_ATT, request.getAttribute(GSXML.LANG_ATT));
    31     // add the lang stuff from message
    32     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.DISPLAY_ELEM), true));
    33     // add the system stuff from message
    34        page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true));
     31    // add the page extra stuff from message
     32    page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.PAGE_EXTRA_ELEM), true));
    3533
    3634    // part of the data for the page is the cgi-params
     
    7775    String to = GSPath.appendLink(collection, service_name);
    7876
    79     //create teh pageREsponse
     77    //create the pageResponse
    8078    Element page_response = doc_.createElement(GSXML.PAGE_RESPONSE_ELEM);
    8179    page.appendChild(page_response);
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/SystemAction.java

    r4106 r4144  
    3030    page.setAttribute(GSXML.LANG_ATT, lang);
    3131
    32     // add the lang stuff from message
    33     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.DISPLAY_ELEM), true));
    34     // add the system stuff from message
    35     page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true));
     32    // add the page extra stuff from message
     33    page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.PAGE_EXTRA_ELEM), true));
    3634
    3735    String coll = (String)params.get(GSCGI.COLLECTION_ARG);
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/core/Receptionist.java

    r4095 r4144  
    189189    }
    190190
    191     // add in the  system stuff - display and config
     191    // add in the  system stuff - display and config - this all goes into
     192    // a pageExtra element
    192193    Document message_doc = message.getOwnerDocument();
     194    Element page_extra = message_doc.createElement(GSXML.PAGE_EXTRA_ELEM);
     195    message.appendChild(page_extra);
    193196    String lang = request.getAttribute(GSXML.LANG_ATT);
    194197    Element display = getDisplayElement(lang);
    195     message.appendChild(message_doc.importNode(display, true));
    196     message.appendChild(message_doc.importNode(config_.config_xml_, true));
     198    page_extra.appendChild(message_doc.importNode(display, true));
     199    page_extra.appendChild(message_doc.importNode(config_.config_xml_, true));
    197200
    198201    Element page = a.process(message);
Note: See TracChangeset for help on using the changeset viewer.