Package com.esri.gpt.framework.jsf

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


  Publisher publisher = null;
  HttpClientRequest httpClient = HttpClientRequest.newRequest();
  httpClient.setCredentialProvider(info.newCredentialProvider());
  ProcessingContext processingContext = new ProcessingContext(requestContext, publisher, httpClient, null, false);

  FacesContextBroker contextBroker = new FacesContextBroker();
  MessageBroker msgBroker = contextBroker.extractMessageBroker();
  processingContext.setMessageBroker(msgBroker);

  return processingContext;
}
View Full Code Here


   * @param query query
   * @return records
   * @throws Exception if searching fails
   */
  protected IFeedRecords doSearch(HttpServletRequest request, HttpServletResponse response, RequestContext context, RestQuery query) throws Exception {
    MessageBroker msgBroker = new FacesContextBroker(request, response).extractMessageBroker();
    final Map<DiscoveredRecord, Map<String, List<String>>> mapping = new HashMap<DiscoveredRecord, Map<String, List<String>>>();

    List<IFeedRecords.FieldMeta> fields = new ArrayList<IFeedRecords.FieldMeta>();
    loadStdFieldMeta(fields);

View Full Code Here

        sMsg = "Invalid metadata document.";
      }
      String json = Val.chkStr(request.getParameter("errorsAsJson"));
      if (json.length()>0) {
        json = Val.escapeXmlForBrowser(json);
        FacesContextBroker fcb = new FacesContextBroker(request, response);
        MessageBroker msgBroker = fcb.extractMessageBroker();
       
        ArrayList<String> validationMessages = new ArrayList<String>();
        e.getValidationErrors().buildMessages(msgBroker, validationMessages, true);
       
        StringBuilder sb = new StringBuilder();
View Full Code Here

* Read controller from the request.
*
* @return the search controller
*/
private SearchController readController() {
  FacesContextBroker broker = new FacesContextBroker();
  @SuppressWarnings("unused")
  FacesContext fc = broker.getFacesContext();
  // intentionally not used
  SearchController controller =
    (SearchController) broker.resolveManagedBean(JSFBEAN_SEARCH_CONTROLLER);
  controller.setSearchCriteria(this.getCriteria());
  return controller;
}
View Full Code Here

* Read SearchCriteria from the session.
*
* @return the search controller
*/
private SearchCriteria readSessionCriteria() {
  FacesContextBroker broker = new FacesContextBroker();
  @SuppressWarnings("unused")
  FacesContext fc = broker.getFacesContext();
  fc.getApplication().getViewHandler().createView(fc, SEARCH_PAGE);
 
  // intentionally not used
  SearchCriteria criteria =
    (SearchCriteria) broker.resolveManagedBean(JSFBEAN_SEARCH_CRITERIA);

  return criteria;
 
}
View Full Code Here

*
* @throws Exception
*           the exception
*/
protected void showResults() throws Exception {
  FacesContextBroker broker = new FacesContextBroker();
  String dispatchTo = "";
  String tagName = "com.esri.gpt.control.filter.EncodingFilterTag";
  // will prevent going to front page
  this.getRequestContext().addToSession(tagName, "tag");
  HttpServletRequest httpReq = broker.extractHttpServletRequest();
  HttpServletResponse httpResp = broker.extractHttpServletResponse();
  FacesContext fctx = broker.getFacesContext();
  Application application = fctx.getApplication();
 
  if (this.isResultsOnly()) {
    dispatchTo = SEARCH_RESULTS_PAGE;

View Full Code Here

   * @return records
   * @throws Exception if searching fails
   */
  @Override
  public IFeedRecords doSearch(HttpServletRequest request, HttpServletResponse response, RequestContext context, RestQuery query) throws Exception {
    MessageBroker msgBroker = new FacesContextBroker(request, response).extractMessageBroker();
    final Map<DiscoveredRecord, Map<String, List<String>>> mapping = new HashMap<DiscoveredRecord, Map<String, List<String>>>();

    List<IFeedRecords.FieldMeta> fields = new ArrayList<IFeedRecords.FieldMeta>();
    loadStdFieldMeta(fields);

View Full Code Here

      binding.invoke(context, null);
    }
   
  } catch (Throwable t) {
    MessageBroker messageBroker =
      new FacesContextBroker().extractMessageBroker();
    messageBroker.addErrorMessage(t);
    LogUtil.getLogger().log(Level.SEVERE,"Exception raised.",t);
  }
}
View Full Code Here

  try {
    String url = getUrl();

    if (url.length()>0) {
      HttpServletRequest request = (new FacesContextBroker()).extractHttpServletRequest();
      String contextPath = request.getContextPath();
      String proxy = contextPath + "/catalog/livedata/liveDataProxy.page";

      ResponseWriter writer = context.getResponseWriter();

      writer.write(
        "<div dojoType=\"gpt.LiveData\" " +
        "proxy=\"" + proxy + "\" " +
        "url=\"" + url + "\" " +
        "mapStyle=\"" +getMapStyle()+ "px\" " +
        "mapService=\"" +getMapService()+ "\" " +
        "geometryService=\"" +getGeometryService()+ "\" " +
        "verbose=\"" +getVerbose()+ "\" " +
        "errorMessage=\"" +getErrorMessage()+ "\" " +
        "basemapLabel=\"" +getBasemapLabel()+ "\" " +
        "tooltips=\"" +getTooltips()+ "\" " +
        "onCreatePlaceholder=\"" +getOnCreatePlaceholder()+ "\"></div>"
        );
    }

  } catch (Throwable t) {
    MessageBroker messageBroker =
      new FacesContextBroker().extractMessageBroker();
    messageBroker.addErrorMessage(t);
    LogUtil.getLogger().log(Level.SEVERE, "Exception raised.", t);
  }
}
View Full Code Here

    boolean doInit = false;
    boolean doClear = false;

    if (UuidUtil.isUuid(uuid)) {
      if (!getEditor().getRepository().getUuid().equals(uuid) || reload) {
        RequestContext rc = new FacesContextBroker().extractRequestContext();
        HrSelectRequest request = new HrSelectRequest(rc, uuid);
        request.execute();
        HrRecords records = request.getQueryResult().getRecords();
        if (records.size() == 1) {
          record = records.get(0);
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.