コード例 #1
0
  private void _renderStationIconBlock(
      FacesContext context, RenderingContext arc, UIXProcess process, Station station)
      throws IOException {
    process.setRowIndex(station.getRowIndex());

    String baseStyleClass = station.getBaseStyleClass();

    _renderIconBlock(
        context,
        arc,
        station.getIconNames(),
        station.getLabel(),
        baseStyleClass,
        baseStyleClass + _SUFFIX_ICON_CELL,
        station.getStates());
  }
コード例 #2
0
  private void _renderStationContent(
      FacesContext context,
      RenderingContext arc,
      UIXProcess process,
      UIComponent stamp,
      Station station)
      throws IOException {
    ResponseWriter writer = context.getResponseWriter();

    writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null);

    writer.writeAttribute(XhtmlConstants.COLSPAN_ATTRIBUTE, "3", null);

    String baseStyleClass = station.getBaseStyleClass();

    List<String> stateStyleClasses = station.getStates();
    stateStyleClasses.add(baseStyleClass);
    stateStyleClasses.add(baseStyleClass + _SUFFIX_CONTENT);

    renderStyleClasses(context, arc, stateStyleClasses.toArray(_EMPTY_STRING_ARRAY));

    /* -= Simon =-
     * FIXME HACK for MSIE CSS bug involving composite style classes.
     *       Since the bug is most obvious with join background images
     *       I hard code background-image to none to fix it.
     *       See Jira for issue ADFFACES-206.
     */
    if (arc.getAgent().getAgentName().equalsIgnoreCase(Agent.AGENT_IE)) {
      writer.writeAttribute(XhtmlConstants.STYLE_ATTRIBUTE, "background-image:none;", null);
    }

    Map<String, String> originalMap = arc.getSkinResourceKeyMap();

    // Init the model
    process.setRowIndex(station.getRowIndex());
    try {
      arc.setSkinResourceKeyMap(_RESOURCE_KEY_MAP);
      encodeChild(context, stamp);
    } finally {
      arc.setSkinResourceKeyMap(originalMap);
    }

    writer.endElement(XhtmlConstants.TABLE_DATA_ELEMENT);
  }