Package org.apache.myfaces.trinidad.component.core.output

Examples of org.apache.myfaces.trinidad.component.core.output.CoreOutputText


    // link to the frames!
    String returnId = requestParameters.get(_RETURN_ID_PARAM);
    if (returnId != null)
      CoreRenderKit.saveDialogPostbackValues(returnId);

    CoreOutputText headStart = new CoreOutputText();
    root.getChildren().add(headStart);
    headStart.setEscape(false);
    headStart.setValue("<head>");

    CoreImportScript cis = new CoreImportScript();
    cis.setNames(new String[]{"Core"});
    root.getChildren().add(cis);

    // The block-reload script only happens to work on IE, but may someday
    // work on Mozilla as well.
    HtmlScript script = new HtmlScript();
    script.setText(_BLOCK_RELOAD_TEXT + _FIX_DIALOG_TITLE);
    root.getChildren().add(script);

    CoreOutputText headEnd = new CoreOutputText();
    root.getChildren().add(headEnd);
    headStart.setEscape(false);
    headStart.setValue("</head>");

    HtmlFrame contentFrame = new HtmlFrame();
    String contentStr = arc.getTranslatedString(_FRAME_CONTENT);
    if (contentStr == null)
      contentStr = _DEFAULT_CONTENT_STRING;

    contentFrame.setShortDesc(contentStr); // for accessibility
    contentFrame.setLongDescURL("#");     // for accessibility
    contentFrame.setHeight("100%");
    contentFrame.setWidth("100%");

    // Get the query string.
    // trim out any "_t" parameter, which was only used to get here.
    // trim out any sizing parameters
    // trim out any redirect parameters
    String queryString = _getQueryString(
       context.getExternalContext().getRequestParameterValuesMap());

    // grab any sizing parameters
    String widthParam = requestParameters.get(_MIN_WIDTH_PARAM);
    boolean gotWidth = (widthParam != null);

    String heightParam = requestParameters.get(_MIN_HEIGHT_PARAM);
    boolean gotHeight = (heightParam != null);

    String viewIdRedirect = requestParameters.get(_VIEW_ID_REDIRECT_PARAM);
    if (viewIdRedirect != null)
    {
      ViewHandler vh =
        context.getApplication().getViewHandler();
      // Prepend an extra slash to avoid re-prepending the context path
      String redirectString = "/" + vh.getActionURL(context,
                                                    viewIdRedirect);
      // if redirectString contains ?, append queryString with &,
      // otherwise append queryString with &
      char sep = (redirectString.indexOf('?') != -1) ? '&' : '?';
      contentFrame.setSource(redirectString + sep + queryString);
    }
    else
    {
      String internalRedirect = requestParameters.get("_red");
      if (internalRedirect != null)
      {
        String path = GenericEntry.getGenericEntryURL(context,
                                                      internalRedirect);
        // Prepend an extra slash to avoid re-prepending the context path
        contentFrame.setSource("/" + path + "&" + queryString);
      }
    }

    HtmlFrameBorderLayout frameSet = new HtmlFrameBorderLayout();
    frameSet.setShortDesc(contentStr); // for accessibility
    frameSet.setCenter(contentFrame);
    // this border attribute is a "secret" attribute set to fix
    // 4339153 DIALOGS IN FIREFOX HAVE WHITE LINE AT THE BOTTOM
    frameSet.getAttributes().put("border", Boolean.FALSE);
    // see bug 3198336 apss accessibility violations
    CoreOutputText alternateContent = new CoreOutputText();
    alternateContent.setValue(arc.getTranslatedString("NO_FRAMES_MESSAGE"));
    frameSet.setAlternateContent(alternateContent);

    // Set the title to the title of the content, and then shrink (or expand)
    // the window to fit the content.  The 25 pixel fudge factor is purely
    // a hack to handle calendarDialog, which regularly needs to grow
View Full Code Here


    // link to the frames!
    String returnId = requestParameters.get(_RETURN_ID_PARAM);
    if (returnId != null)
      CoreRenderKit.saveDialogPostbackValues(returnId);

    CoreOutputText headStart = new CoreOutputText();
    root.getChildren().add(headStart);
    headStart.setEscape(false);
    headStart.setValue("<head>");

    CoreImportScript cis = new CoreImportScript();
    cis.setNames(new String[]{"Core"});
    root.getChildren().add(cis);

    // The block-reload script only happens to work on IE, but may someday
    // work on Mozilla as well.
    HtmlScript script = new HtmlScript();
    script.setText(_BLOCK_RELOAD_TEXT + _FIX_DIALOG_TITLE);
    root.getChildren().add(script);

    CoreOutputText headEnd = new CoreOutputText();
    root.getChildren().add(headEnd);
    headEnd.setEscape(false);
    headEnd.setValue("</head>");

    HtmlFrame contentFrame = new HtmlFrame();
    String contentStr = arc.getTranslatedString(_FRAME_CONTENT);
    if (contentStr == null)
      contentStr = _DEFAULT_CONTENT_STRING;

    contentFrame.setShortDesc(contentStr); // for accessibility
    contentFrame.setLongDescURL("#");     // for accessibility
    contentFrame.setHeight("100%");
    contentFrame.setWidth("100%");

    // Get the query string.
    // trim out any "_t" parameter, which was only used to get here.
    // trim out any sizing parameters
    // trim out any redirect parameters
    String queryString = _getQueryString(
       context.getExternalContext().getRequestParameterValuesMap());

    // grab any sizing parameters
    String widthParam = requestParameters.get(_MIN_WIDTH_PARAM);
    boolean gotWidth = (widthParam != null);

    String heightParam = requestParameters.get(_MIN_HEIGHT_PARAM);
    boolean gotHeight = (heightParam != null);

    String viewIdRedirect = requestParameters.get(_VIEW_ID_REDIRECT_PARAM);
    if (viewIdRedirect != null)
    {
      ViewHandler vh =
        context.getApplication().getViewHandler();
      // Prepend an extra slash to avoid re-prepending the context path
      String redirectString = "/" + vh.getActionURL(context,
                                                    viewIdRedirect);

      // if redirectString contains ?, append queryString with &,
      // otherwise append queryString with &
      char sep = (redirectString.indexOf('?') != -1) ? '&' : '?';
      contentFrame.setSource(redirectString + sep + queryString);
    }
    else
    {
      String internalRedirect = requestParameters.get("_red");
      if (internalRedirect != null)
      {
        String path = GenericEntry.getGenericEntryURL(context,
                                                      internalRedirect);
        // Prepend an extra slash to avoid re-prepending the context path
        contentFrame.setSource("/" + path + "&" + queryString);
      }
    }

    HtmlFrameBorderLayout frameSet = new HtmlFrameBorderLayout();
    frameSet.setShortDesc(contentStr); // for accessibility
    frameSet.setCenter(contentFrame);
    // this border attribute is a "secret" attribute set to fix
    // 4339153 DIALOGS IN FIREFOX HAVE WHITE LINE AT THE BOTTOM
    frameSet.getAttributes().put("border", Boolean.FALSE);
    // see bug 3198336 apss accessibility violations
    CoreOutputText alternateContent = new CoreOutputText();
    alternateContent.setValue(arc.getTranslatedString("NO_FRAMES_MESSAGE"));
    frameSet.setAlternateContent(alternateContent);

    // Set the title to the title of the content, and then shrink (or expand)
    // the window to fit the content.  The 25 pixel fudge factor is purely
    // a hack to handle calendarDialog, which regularly needs to grow
View Full Code Here

  // A proper implementation would create a separator appropriate
  // to the current locale
  private CoreOutputText _createSeparator(FacesContext context)
  {
    CoreOutputText output = new CoreOutputText();
    output.setValue("/");
    output.setTransient(true);
    return output;
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  public void add(ActionEvent event)
  {
    List<UIComponent> children = _panel.getChildren();
    CoreOutputText output = new CoreOutputText();
    output.setValue("Item " + (children.size() + 1));
    children.add(0, output);
  }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  public void setSeparator(ActionEvent event)
  {
    CoreOutputText output = new CoreOutputText();
    output.setValue("New Separator");
    _panel.getFacets().put("separator", output);
  }
View Full Code Here

 
  public void addComponent(ActionEvent ae)
  {
    System.out.println("Adding a showDetail child");
    CoreShowDetail showDetail = new CoreShowDetail();
    CoreOutputText outputText = new CoreOutputText();
    outputText.setValue("showDetail Content");
    showDetail.getChildren().add(outputText);
    FacesContext context = FacesContext.getCurrentInstance();
    context.getViewRoot().findComponent("groupLayout").getChildren().add(showDetail);
 
View Full Code Here

 
  public void addComponent(ActionEvent ae)
  {
    System.out.println("Adding a showDetail child");
    CoreShowDetail showDetail = new CoreShowDetail();
    CoreOutputText outputText = new CoreOutputText();
    outputText.setValue("showDetail Content");
    showDetail.getChildren().add(outputText);
    FacesContext context = FacesContext.getCurrentInstance();
    context.getViewRoot().findComponent("groupLayout").getChildren().add(showDetail);
 
View Full Code Here

    else
    {
      returnIdString = null;
    }
   
    CoreOutputText headStart = new CoreOutputText();
    root.getChildren().add(headStart);
    headStart.setEscape(false);
    headStart.setValue("<head>");

    CoreImportScript cis = new CoreImportScript();
    cis.setNames(new String[]{"Core"});
    root.getChildren().add(cis);

    // The block-reload script only happens to work on IE, but may someday
    // work on Mozilla as well.
    HtmlScript script = new HtmlScript();
    script.setText(_BLOCK_RELOAD_TEXT + _FIX_DIALOG_TITLE);
    root.getChildren().add(script);

    CoreOutputText headEnd = new CoreOutputText();
    root.getChildren().add(headEnd);
    headEnd.setEscape(false);
    headEnd.setValue("</head>");

    HtmlFrame contentFrame = new HtmlFrame();
    String contentStr = arc.getTranslatedString(_FRAME_CONTENT);
    if (contentStr == null)
      contentStr = _DEFAULT_CONTENT_STRING;

    contentFrame.setShortDesc(contentStr); // for accessibility
    contentFrame.setLongDescURL("#");     // for accessibility
    contentFrame.setHeight("100%");
    contentFrame.setWidth("100%");

    // Get the query string.
    // trim out any "_t" parameter, which was only used to get here.
    // trim out any sizing parameters
    // trim out any redirect parameters
    String queryString = _getQueryString(
       context.getExternalContext().getRequestParameterValuesMap());

    // grab any sizing parameters.  We convert these to their parsed parameters to avoid
    // cross site scripting injects attacks
    Integer width = JspUtils.integerValueOfParam(requestParameters, _MIN_WIDTH_PARAM);
    boolean gotWidth = (width != null);

    Integer height = JspUtils.integerValueOfParam(requestParameters, _MIN_HEIGHT_PARAM);
    boolean gotHeight = (height != null);

    String viewIdRedirect = requestParameters.get(_VIEW_ID_REDIRECT_PARAM);
    if (viewIdRedirect != null)
    {
      ViewHandler vh =
        context.getApplication().getViewHandler();
      // Prepend an extra slash to avoid re-prepending the context path
      String redirectString = "/" + vh.getActionURL(context,
                                                    viewIdRedirect);

      // if redirectString contains ?, append queryString with &,
      // otherwise append queryString with &
      char sep = (redirectString.indexOf('?') != -1) ? '&' : '?';
      contentFrame.setSource(redirectString + sep + queryString);
    }
    else
    {
      String internalRedirect = requestParameters.get("_red");
      if (internalRedirect != null)
      {
        String path = GenericEntry.getGenericEntryURL(context,
                                                      internalRedirect);
        // Prepend an extra slash to avoid re-prepending the context path
        contentFrame.setSource("/" + path + "&" + queryString);
      }
    }

    HtmlFrameBorderLayout frameSet = new HtmlFrameBorderLayout();
    frameSet.setShortDesc(contentStr); // for accessibility
    frameSet.setCenter(contentFrame);
    // this border attribute is a "secret" attribute set to fix
    // 4339153 DIALOGS IN FIREFOX HAVE WHITE LINE AT THE BOTTOM
    frameSet.getAttributes().put("border", Boolean.FALSE);
    // see bug 3198336 apss accessibility violations
    CoreOutputText alternateContent = new CoreOutputText();
    alternateContent.setValue(arc.getTranslatedString("NO_FRAMES_MESSAGE"));
    frameSet.setAlternateContent(alternateContent);

    // Set the title to the title of the content, and then shrink (or expand)
    // the window to fit the content.  The 25 pixel fudge factor is purely
    // a hack to handle calendarDialog, which regularly needs to grow
View Full Code Here

    else
    {
      returnIdString = null;
    }
   
    CoreOutputText headStart = new CoreOutputText();
    root.getChildren().add(headStart);
    headStart.setEscape(false);
    headStart.setValue("<head>");

    CoreImportScript cis = new CoreImportScript();
    cis.setNames(new String[]{"Core"});
    root.getChildren().add(cis);

    // The block-reload script only happens to work on IE, but may someday
    // work on Mozilla as well.
    HtmlScript script = new HtmlScript();
    script.setText(_BLOCK_RELOAD_TEXT + _FIX_DIALOG_TITLE);
    root.getChildren().add(script);

    CoreOutputText headEnd = new CoreOutputText();
    root.getChildren().add(headEnd);
    headEnd.setEscape(false);
    headEnd.setValue("</head>");

    HtmlFrame contentFrame = new HtmlFrame();
    String contentStr = arc.getTranslatedString(_FRAME_CONTENT);
    if (contentStr == null)
      contentStr = _DEFAULT_CONTENT_STRING;

    contentFrame.setShortDesc(contentStr); // for accessibility
    contentFrame.setLongDescURL("#");     // for accessibility
    contentFrame.setHeight("100%");
    contentFrame.setWidth("100%");

    // Get the query string.
    // trim out any "_t" parameter, which was only used to get here.
    // trim out any sizing parameters
    // trim out any redirect parameters
    String queryString = _getQueryString(
       context.getExternalContext().getRequestParameterValuesMap());

    // grab any sizing parameters.  We convert these to their parsed parameters to avoid
    // cross site scripting injects attacks
    Integer width = JspUtils.integerValueOfParam(requestParameters, _MIN_WIDTH_PARAM);
    boolean gotWidth = (width != null);

    Integer height = JspUtils.integerValueOfParam(requestParameters, _MIN_HEIGHT_PARAM);
    boolean gotHeight = (height != null);

    String viewIdRedirect = requestParameters.get(_VIEW_ID_REDIRECT_PARAM);
    if (viewIdRedirect != null)
    {
      ViewHandler vh =
        context.getApplication().getViewHandler();
      // Prepend an extra slash to avoid re-prepending the context path
      String redirectString = "/" + vh.getActionURL(context,
                                                    viewIdRedirect);

      // if redirectString contains ?, append queryString with &,
      // otherwise append queryString with &
      char sep = (redirectString.indexOf('?') != -1) ? '&' : '?';
      contentFrame.setSource(redirectString + sep + queryString);
    }
    else
    {
      String internalRedirect = requestParameters.get("_red");
      if (internalRedirect != null)
      {
        String path = GenericEntry.getGenericEntryURL(context,
                                                      internalRedirect);
        // Prepend an extra slash to avoid re-prepending the context path
        contentFrame.setSource("/" + path + "&" + queryString);
      }
    }

    HtmlFrameBorderLayout frameSet = new HtmlFrameBorderLayout();
    frameSet.setShortDesc(contentStr); // for accessibility
    frameSet.setCenter(contentFrame);
    // this border attribute is a "secret" attribute set to fix
    // 4339153 DIALOGS IN FIREFOX HAVE WHITE LINE AT THE BOTTOM
    frameSet.getAttributes().put("border", Boolean.FALSE);
    // see bug 3198336 apss accessibility violations
    CoreOutputText alternateContent = new CoreOutputText();
    alternateContent.setValue(arc.getTranslatedString("NO_FRAMES_MESSAGE"));
    frameSet.setAlternateContent(alternateContent);

    // Set the title to the title of the content, and then shrink (or expand)
    // the window to fit the content.  The 25 pixel fudge factor is purely
    // a hack to handle calendarDialog, which regularly needs to grow
View Full Code Here

  @SuppressWarnings("unchecked")
  public void add(ActionEvent event)
  {
    List<UIComponent> children = _panel.getChildren();
    CoreOutputText output = new CoreOutputText();
    output.setValue("Item " + (children.size() + 1));
    children.add(0, output);
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.component.core.output.CoreOutputText

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.