Package com.esri.gpt.framework.jsf

Examples of com.esri.gpt.framework.jsf.FacesContextBroker


  throws NamingException {
  try{
    dirContext.modifyAttributes(objectDN,operation,attributes);
  }catch(javax.naming.directory.InvalidAttributeValueException iave){
    LogUtil.getLogger().severe(iave.getMessage());
    FacesContextBroker contextBroker = new FacesContextBroker();
    MessageBroker msgBroker = contextBroker.extractMessageBroker();
    String errMsg = "javax.naming.directory.InvalidAttributeValueException";
    if(msgBroker != null){
      errMsg = msgBroker.getMessage("javax.naming.directory.InvalidAttributeValueException").getSummary();
    }
    throw new LdapException(errMsg);
View Full Code Here


@Override
protected void execute(HttpServletRequest request,
                     HttpServletResponse response,
                     RequestContext context)
  throws Exception {
    msgBroker = new FacesContextBroker(request,response).extractMessageBroker();   
    StatisticsRequestContext statRequestCtx = null;
    String homePage = "/catalog/main/home.page";
  String contextPath = request.getContextPath();  
  checkRole(context);
  statRequestCtx = new StatisticsRequestContext();
View Full Code Here

*/
public String getUrl() {
  url = Val.chkStr(url);
  if(url != null && url.contains("{contextPath}") == true) {
     
      FacesContextBroker broker = new FacesContextBroker();
      if(broker != null){
        ExternalContext ec = broker.getExternalContext();
        if(ec != null){
          url = url.replace("{contextPath}",
              ec.getRequestContextPath());
        }
      }
View Full Code Here

        tocContext.setOutputFormat(format);
      }
      if (key.length() > 0) {
       
        // set the message broker
        FacesContextBroker fcb = new FacesContextBroker(request,response);
        tocContext.setMessageBroker(fcb.extractMessageBroker());
       
        RequestContext requestCtx = fcb.extractRequestContext();
        // determine the XML file path
        String relativePath = "";
        TocCollection tocs = requestCtx.getCatalogConfiguration().getConfiguredTocs();
        if(tocs!= null && tocs.containsKey(key)){
          relativePath = tocs.get(key);
View Full Code Here

   
  } else if (eventType.equals(SearchEvents.Event.EVENT_LOADSAVEDSEARCH.name())){   
    LOG.info("Loading Search Criteria");
    boolean success = false;
    try {
      FacesContextBroker facesBroker = new FacesContextBroker();
      Map requestMap = facesBroker.getExternalContext().getRequestParameterMap();
      String searchId = (String)
      requestMap.get(SearchEvents.Event.PARAM_UUID);
      doLoad(searchId)
      success = true;
      SearchCriteria searchCriteria = this.getSearchCriteria();
      searchCriteria.getSearchFilterPageCursor().setCurrentPage(1);
      this.getSearchResult().reset();
      for(ISearchFilter iSearchFilter
          : searchCriteria.getMiscelleniousFilters()) {
        if(iSearchFilter instanceof SearchFilterHarvestSites) {
          SearchFilterHarvestSites sfHvSites =
            (SearchFilterHarvestSites) iSearchFilter;
          try {
            String url = sfHvSites.getSearchUrl();
            if (!url.equals("")) {
              url = url.replaceAll("(?i)F=[^&]*", "f=searchpage"  );
              facesBroker.getExternalContext().redirect(url);
              FacesContext facesContext = facesBroker.getFacesContext();
              context.onExecutionPhaseCompleted();
              facesContext.responseComplete();
              return;
            }
          } catch (MalformedURLException ex) {
            // Not a url, use the other workflow
          }
        }
      }
     
    } finally {
      // either redo current search if unsuccessful, or do new loaded search
      // if successful
      redoSearch(event, success);
    }
   
  } else if(eventType.equals(SearchEvents.Event.EVENT_DELTESAVEDSEARCH.name())){
    LOG.info("Deleting Search Criteria");
    FacesContextBroker facesBroker = new FacesContextBroker();
    Map requestMap = facesBroker.getExternalContext().getRequestParameterMap();
    try {
      String searchId = (String)
      requestMap.get(SearchEvents.Event.PARAM_UUID);
      ISearchSaveRepository searchSaveRepository =
        SearchSaveRpstryFactory.getSearchSaveRepository();
View Full Code Here

  Map attributeMap = comp.getAttributes();
  Map requestMap = null;

  String eventType = Val.chkStr((String) attributeMap.get(SearchEvents.Event.EVENT.name()));
  if (eventType.length() == 0) {
    FacesContextBroker facesBroker = new FacesContextBroker();
    requestMap = facesBroker.getExternalContext().getRequestParameterMap();
    Object obj = (requestMap != null) ?
    requestMap.get(SearchEvents.Event.EVENT) : null;
    if (obj != null) {
      eventType = Val.chkStr(obj.toString());
    }
View Full Code Here

@SuppressWarnings("unchecked")
private void redoSearch(ActionEvent event,
    boolean doPrefetch)
throws SearchException {

  FacesContextBroker facesBroker = new FacesContextBroker();
  Map requestMap = facesBroker.getExternalContext().getRequestParameterMap();

  String dosearch = (String) requestMap.get
  (SearchEvents.Event.PARAM_EXECUTE_SEARCH);
  if("".equals(Val.chkStr(dosearch)) && event != null
      && event.getComponent() != null) {
View Full Code Here

protected ASearchEngine getSearchDao() throws SearchException {
  ASearchEngine dao = SearchEngineFactory.createSearchEngine(
      this.getSearchCriteria(),
      this.getSearchResult(), this.extractRequestContext(),
      SearchEngineLocal.ID,
      (new FacesContextBroker()).extractMessageBroker());
  return dao;
}
View Full Code Here

   * Appends live data section.
   * @param sectionsComponent the active UI component for the section
   */
  @SuppressWarnings("unchecked")
  private void appendLiveDataSection(UIComponent sectionsComponent) {
    FacesContextBroker broker = new FacesContextBroker();
    String contextPath = broker.extractHttpServletRequest().getContextPath();
    String imgOpen = contextPath + "/catalog/images/section_open.gif";
    String imgClosed = contextPath + "/catalog/images/section_closed.gif";
    String caption = broker.extractMessageBroker().retrieveMessage("catalog.search.viewMetadataDetails.liveData");

    String sScript =
      "<script>" +
      "function onCreatePlaceholder(node) {" +
      "node.innerHTML = \"<span class=\\\"section\\\">" +
View Full Code Here

      }
     
      // ensure a message broker if required
      if (context.getOperation().getUIResources() != null) {
        if ((request != null) && (response != null)) {
          FacesContextBroker fcb = new FacesContextBroker(request,response);
          context.setMessageBroker(fcb.extractMessageBroker());
        }
      }
     
      // handle the operation
      handler.handle(context);
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.jsf.FacesContextBroker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.