CPD Results
The following document contains the results of PMD's CPD 4.1.
Duplications
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/MessageBoxRenderer.java | 157 |
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SideBarRenderer.java | 176 |
_renderFilterChild(context, node); } // End the table row with the contents private void _endContentsRow( FacesContext fContext, RenderingContext arc, IconData icons ) throws IOException { ResponseWriter writer = fContext.getResponseWriter(); writer.endElement(TABLE_DATA_ELEMENT); if (icons.endBackground != null) { writer.startElement(TABLE_DATA_ELEMENT, null); org.apache.myfaces.trinidadinternal.renderkit.core.skin.CoreSkinUtils.__renderBackgroundIcon(fContext, arc, icons.endBackground); writer.endElement(TABLE_DATA_ELEMENT); } writer.endElement(TABLE_ROW_ELEMENT); } // Tests whether this contentContainer has a bottom row private boolean _hasBottomRow(IconData icons) { // We have a bottom row if we have a bottom start/end icon return ((icons.bottomStart != null) || (icons.bottomEnd != null)); } // Renders the bottom row private void _renderBottomRow( FacesContext fContext, RenderingContext arc, IconData icons, int columnCount ) throws IOException { ResponseWriter writer = fContext.getResponseWriter(); // Render the contents inside of its own table row writer.startElement(TABLE_ROW_ELEMENT, null); // If we've got a start icon, render it if (icons.bottomStart != null) { writer.startElement(TABLE_DATA_ELEMENT, null); OutputUtils.renderIcon(fContext, arc, icons.bottomStart, "", null); writer.endElement(TABLE_DATA_ELEMENT); } // Render the cell with the bottom background icon. We first // need to determine how many columns the background cell should // fill. Integer colspan = _getBottomBackgroundColumnCount(icons, columnCount); writer.startElement(TABLE_DATA_ELEMENT, null); writer.writeAttribute(COLSPAN_ATTRIBUTE, colspan, null); writer.writeAttribute(WIDTH_ATTRIBUTE, "100%", null); org.apache.myfaces.trinidadinternal.renderkit.core.skin.CoreSkinUtils.__renderBackgroundIcon(fContext, arc, icons.bottomBackground); writer.endElement(TABLE_DATA_ELEMENT); // If we've got an end icon, render it if (icons.bottomEnd != null) { writer.startElement(TABLE_DATA_ELEMENT, null); OutputUtils.renderIcon(fContext, arc, icons.bottomEnd, "", null); writer.endElement(TABLE_DATA_ELEMENT); } writer.endElement(TABLE_ROW_ELEMENT); } // Tests whether this contentContainer has a top row private boolean _hasTopRow(IconData icons) { // We have a top row if we have a top start/end icon return ((icons.topStart != null) || (icons.topEnd != null)); } // Renders the top row private void _renderTopRow( FacesContext fContext, RenderingContext arc, IconData icons, int columnCount ) throws IOException { ResponseWriter writer = fContext.getResponseWriter(); // Render the contents inside of its own table row writer.startElement(TABLE_ROW_ELEMENT, null); // If we've got a start icon, render it if (icons.topStart != null) { writer.startElement(TABLE_DATA_ELEMENT, null); OutputUtils.renderIcon(fContext, arc, icons.topStart, "", null); writer.endElement(TABLE_DATA_ELEMENT); } // Render the cell with the top background icon. We first // need to determine how many columns the background cell should // fill. Integer colspan = _getTopBackgroundColumnCount(icons, columnCount); writer.startElement(TABLE_DATA_ELEMENT, null); writer.writeAttribute(COLSPAN_ATTRIBUTE, colspan, null); writer.writeAttribute(WIDTH_ATTRIBUTE, "100%", null); org.apache.myfaces.trinidadinternal.renderkit.core.skin.CoreSkinUtils.__renderBackgroundIcon(fContext, arc, icons.topBackground); writer.endElement(TABLE_DATA_ELEMENT); // If we've got an end icon, render it if (icons.topEnd != null) { writer.startElement(TABLE_DATA_ELEMENT, null); OutputUtils.renderIcon(fContext, arc, icons.topEnd, "", null); writer.endElement(TABLE_DATA_ELEMENT); } writer.endElement(TABLE_ROW_ELEMENT); } // Renders the filter named child private void _renderFilterChild( |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/expl/ColorPaletteUtils.java | 58 |
org/apache/myfaces/trinidadinternal/ui/expl/ColorPaletteUtils.java | 464 |
new Color(255,255,255), new Color(255,204,204), new Color(255,204,153), new Color(255,255,204), new Color(153,255,153), new Color(204,255,255), new Color(255,204,255), // 2nd-row new Color(255,255,255), new Color(255,102,102), new Color(255,204,51), new Color(255,255,153), new Color(102,255,153), new Color(102,255,255), new Color(255,153,255), // 3rd-row new Color(204,204,204), new Color(255,0,0), new Color(255,153,0), new Color(255,255,0), new Color(51,255,51), new Color(51,204,255), new Color(204,102,204), // 4th-row new Color(153,153,153), new Color(204,0,0), new Color(255,102,0), new Color(255,204,0), new Color(0,204,0), new Color(51,102,255), new Color(204,51,204), // 5th-row new Color(102,102,102), new Color(153,0,0), new Color(204,102,0), new Color(153,153,0), new Color(0,153,0), new Color(51,51,255), new Color(153,51,102), // 6th-row new Color(51,51,51), new Color(102,0,0), new Color(153,51,0), new Color(102,102,0), new Color(0,102,0), new Color(0,0,153), new Color(102,51,102), // 7th-row new Color(0,0,0), new Color(51,0,0), new Color(102,51,0), new Color(51,51,0), new Color(0,51,0), new Color(0,0,102), new Color(51,0,51), }; // ArrayMap-style Object array which maps color palette names // to DataObjectLists which contain the colors private static final Object[] _PALETTE_ARRAY = new Object[] |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/BreadCrumbsRenderer.java | 333 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationPathRenderer.java | 306 |
} // // Renders (almost) everything that goes before the link // private void _renderStartOfLink( UIXRenderingContext context, boolean vertical, boolean isLastChild) throws IOException { ResponseWriter writer = context.getResponseWriter(); if (vertical) { writer.startElement(DIV_ELEMENT, null); } // Breadcrumbs wrap within a page depending on the size of the // browser window. The wrap occurs to the right of the greater-than // symbol that follows after the breadcrumb text string, // and not within the text string itself. writer.startElement(XhtmlLafConstants.NO_BREAK_ELEMENT, null); } // // Renders everything that goes after the link // private void _renderEndOfLink( UIXRenderingContext context, boolean vertical ) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.endElement(XhtmlLafConstants.NO_BREAK_ELEMENT); if(vertical) { writer.endElement(DIV_ELEMENT); } } /** * gets the orientation attribute from the link. If this attr is not set, * defaults to horizontal. * @return true if the orientation is vertical */ private static boolean _getOrientation(UIXRenderingContext context, UINode breadCrumbs) { Object orientation = breadCrumbs.getAttributeValue(context, ORIENTATION_ATTR); return (orientation != null) && ORIENTATION_VERTICAL.equals(orientation); } // # of hard spaces to use in indenting vertical breadcrumbs private static final int _INDENT_SPACES = 10; // // BetweenRenderer is used to render everything that goes "between" // links. Really, it gets called _before_ each link, so we have to specially // handle the first time it gets called. // /** * @deprecated This class comes from the old Java 1.2 UIX codebase and should not be used anymore. */ @Deprecated private class BetweenRenderer implements Renderer { public BetweenRenderer( UINode breadCrumbs, boolean vertical, int totalCrumbs, Icon separatorIcon) { _vertical = vertical; _totalCrumbs = totalCrumbs; // We stash away the separator Icon so we don't // have to look it up repeatedly. _separatorIcon = separatorIcon; } public void render(UIXRenderingContext context, UINode node) throws IOException { ResponseWriter writer = context.getResponseWriter(); // Special handling for when we're the first or last child boolean isLastChild; if (_totalCrumbs >= 0) isLastChild = ((_renderedCount + 1) >= _totalCrumbs); else isLastChild = _isLastChild(context); boolean isFirstChild = (_renderedCount == 0); if (!isFirstChild) { // render the separator if (_separatorIcon != null) { RenderingContext arc = RenderingContext.getCurrentInstance(); FacesContext fContext = context.getFacesContext(); OutputUtils.renderIcon(fContext, arc, _separatorIcon, "", null); } // and render everything that goes after the previous link. // We'll take care of also rendering this content in prerender() _renderEndOfLink(context, _vertical); } _renderStartOfLink(context, _vertical, isLastChild); // if breadcrumbs are oriented vertically, then indent the levels if(!isFirstChild && _vertical) { char[] chars = new char[1]; chars[0] = NBSP_CHAR; for(int i = 0; i < _renderedCount * _INDENT_SPACES; i++) { writer.writeText(chars, 0, 1); } } _renderedCount++; if (isLastChild) LinkRenderer.setDisabled(context, true); } private boolean _isLastChild(UIXRenderingContext context) { // See if BreadCrumbs has taken responsibility for determining // this. This code's here so that our "BetweenRenderer" strategy // doesn't break anything - in practice, the other code path will usually // produce the same results (albeit a bit more expensively) Object o = getRenderingProperty(context, _IS_LAST_CHILD_KEY); return (o != null); } private final boolean _vertical; private int _totalCrumbs; private int _renderedCount; private Icon _separatorIcon; } static private final Object _IS_LAST_CHILD_KEY = new Object(); static private final Object _BETWEEN_RENDERER_KEY = new Object(); private static final Map<String, String> _RESOURCE_KEY_MAP; static { _RESOURCE_KEY_MAP = new HashMap<String, String>(); _RESOURCE_KEY_MAP.put( XhtmlLafConstants.LINK_STYLE_CLASS, XhtmlLafConstants.AF_NAVIGATION_PATH_STEP_STYLE_CLASS); // the selected step is disabled, which is why we map these two styles _RESOURCE_KEY_MAP.put( XhtmlLafConstants.LINK_DISABLED_STYLE_CLASS, XhtmlLafConstants.AF_NAVIGATION_PATH_SELECTED_STEP_STYLE_CLASS); } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/validator/DoubleRangeValidator.java | 65 |
org/apache/myfaces/trinidadinternal/validator/LongRangeValidator.java | 66 |
String minStr = min == Long.MIN_VALUE ? "null" : IntegerUtils.getString(min); String messageDetailMax = this.getMessageDetailMaximum(); String messageDetailMin = this.getMessageDetailMinimum(); String messageDetailRange = this.getMessageDetailNotInRange(); String hintMax = this.getHintMaximum(); String hintMin = this.getHintMinimum(); String hintRange = this.getHintNotInRange(); Map<String, String> cMessages = null; if(messageDetailMax != null || messageDetailMin != null || messageDetailRange != null || hintMax != null || hintMin != null|| hintRange != null) { cMessages = new HashMap<String, String>(); cMessages.put("max", messageDetailMax); cMessages.put("min", messageDetailMin); cMessages.put("range", messageDetailRange); cMessages.put("hintMax", hintMax); cMessages.put("hintMin", hintMin); cMessages.put("hintRange", hintRange); } return _getTrRangeValidator(context, component, maxStr, minStr, cMessages); } public String getClientLibrarySource( FacesContext context) { return null; } private static String _getTrRangeValidator( FacesContext context, UIComponent component, String max, String min, Map<String, String> messages) { StringBuilder outBuffer = new StringBuilder(); outBuffer.append("new TrRangeValidator("); outBuffer.append(max); outBuffer.append(','); outBuffer.append(min); outBuffer.append(','); if(messages == null) { outBuffer.append("null"); } else { try { JsonUtils.writeMap(outBuffer, messages, false); } catch (IOException e) { outBuffer.append("null"); } } outBuffer.append(")"); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/image/laf/browser/ButtonImageRenderer.java | 113 |
org/apache/myfaces/trinidadinternal/image/laf/browser/CompositeButtonImageRenderer.java | 110 |
((ProxyContext)context).flush(); } /** * Returns the foreground color to use when painting an image * with the specified dictionary. */ @Override protected Color getPaintForeground( ImageContext context, Map<Object, Object> d) { Color foreground = super.getPaintForeground(context, d); if (foreground != null) return foreground; return ButtonPainter.getDefaultForeground(context, _isDisabled(d)); } /** * Returns the background color to use when painting an image * with the specified dictionary. */ @Override protected Color getPaintBackground( ImageContext context, Map<Object, Object> d) { Color background = super.getPaintBackground(context, d); if (background != null) return background; return ButtonPainter.getDefaultBackground(context, _isDisabled(d)); } /** * Returns the font color to use when painting an image * with the specified dictionary. */ @Override protected Font getPaintFont(Map<Object, Object> d) { Font font = super.getPaintFont(d); if (font != null) return font; return ButtonPainter.getDefaultFont().getFont(); } private String _getFontName(Map<Object, Object> requestedProperties) { // Make sure we've got a valid font Object o = requestedProperties.get(FONT_KEY); String name = null; if (o instanceof FontProxy) name = ((FontProxy)o).getName(); else if (o instanceof Font) name = ((Font)o).getName(); return name; } private boolean _isDisabled(Map<Object, Object> properties) { Boolean disabled = (Boolean)properties.get(DISABLED_KEY); if (disabled == null) return false; return disabled.booleanValue(); } private static class ProxyContext extends PaintContextProxy { public ProxyContext( PaintContext context, |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MenuListRenderer.java | 108 |
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/MenuListRenderer.java | 107 |
if (style != null ) { inlineStyleBuffer = new StringBuffer( _LIST_STYLE_TYPE.length() + style.length()); inlineStyleBuffer.append(_LIST_STYLE_TYPE).append(style); } if ( inlineStyleBuffer != null && inlineStyleBuffer.length() > 0 ) writer.writeAttribute("style", inlineStyleBuffer.toString(), null); } } protected UIXHierarchy getHierarchyBase( UIXRenderingContext context, UINode node ) { return (UIXHierarchy) node.getUIComponent(); } protected UINode getStamp( UIXRenderingContext context, UINode node ) { return node.getNamedChild(context, NODE_STAMP_CHILD); } protected boolean setNewPath( UIXRenderingContext context, UINode node, UIXHierarchy component ) { int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0); return ModelRendererUtils.setNewPath(component, startDepth, ((UIXNavigationLevel)component).getFocusRowKey()); } @Override protected void renderContent( UIXRenderingContext context, UINode node ) throws IOException { UIXHierarchy component = getHierarchyBase(context, node); UINode stamp = getStamp(context, node); if(stamp != null) { // Save the current key Object oldPath = component.getRowKey(); boolean isNewPath = setNewPath(context, node, component); if (isNewPath) { int size = component.getRowCount(); int rowIndex = component.getRowIndex(); for (int i = 0; i < size; i++) { component.setRowIndex(i); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/MessageBoxRenderer.java | 279 |
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SideBarRenderer.java | 316 |
} // Gets the number of columns that this sideBar renders private int _getColumnCount( IconData icons ) { int columnCount = 1; if ((icons.bottomStart != null) || (icons.topStart != null) || (icons.startBackground != null)) columnCount++; if ((icons.bottomEnd != null) || (icons.bottomEnd != null) || (icons.endBackground != null)) columnCount++; return columnCount; } // Returns the number of columns that the body cell should occupy private static Integer _getBodyColumnCount( IconData icons, int columnCount ) { int bodyColumnCount = columnCount; // If we have a start background icon, leave room for it if (icons.startBackground != null) bodyColumnCount--; // If we have an end background icon, leave room for it if (icons.endBackground != null) bodyColumnCount--; if (bodyColumnCount == 1) return null; return bodyColumnCount; } // Returns the number of columns for the bottom background cell private static Integer _getBottomBackgroundColumnCount( IconData icons, int columnCount ) { int backgroundColumnCount = columnCount; if (icons.bottomStart != null) backgroundColumnCount--; if (icons.bottomEnd != null) backgroundColumnCount--; if (backgroundColumnCount == 1) return null; return backgroundColumnCount; } // Returns the number of columns for the top background cell private static Integer _getTopBackgroundColumnCount( IconData icons, int columnCount ) { int backgroundColumnCount = columnCount; if (icons.topStart != null) backgroundColumnCount--; if (icons.topEnd != null) backgroundColumnCount--; if (backgroundColumnCount == 1) return null; return backgroundColumnCount; } // Get the IconData to use for rendering this sideBar private IconData _getIconData( UIXRenderingContext context ) { // Check to see whether we have already created // the IconData for this background color Skin skin = context.getSkin(); IconData icons = (IconData)skin.getProperty(_ICONS_KEY); Icon bottomStart = context.getIcon( |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MessageBoxRenderer.java | 183 |
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/MessageBoxRenderer.java | 208 |
} private void _renderMessages( UIXRenderingContext context, ResponseWriter writer, boolean isGlobal, boolean useList ) throws IOException { BaseMutableUINode currentChild = null; String summary; String detail; Iterator<MessageWrapper> itr = (isGlobal ? MessageBoxUtils.sGetGlobalsIterator(context) : MessageBoxUtils.sGetClientsIterator(context)); while (itr.hasNext()) { MessageWrapper msg = itr.next(); if (useList) writer.startElement("li", null); summary = msg.getSummary(); detail = msg.getDetail(); if (isGlobal) _writeGlobalMsg(context, writer, summary, detail); else currentChild = _writeClientMsg(context, writer, summary, msg, currentChild); if (useList) writer.endElement("li"); } } private void _writeGlobalMsg( UIXRenderingContext context, ResponseWriter writer, String summary, String detail ) throws IOException { String text = MessageUtils.getGlobalMessage(context, summary, detail); if (isTextFormatted(text)) renderFormattedText(context, text); else if (text != null) writer.writeText(text, null); } private BaseMutableUINode _writeClientMsg( UIXRenderingContext context, ResponseWriter writer, String summary, MessageWrapper msg, BaseMutableUINode currentChild ) throws IOException { String description; if (summary != null) { String pattern; String[] parameters; parameters = new String[] {summary}; pattern = getTranslatedString(context, "af_messages.LIST_FORMAT_private"); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaFrameBorderLayoutRenderer.java | 72 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FrameBorderLayoutRenderer.java | 122 |
writer.startElement("frameset", component); renderId(context, component); renderAllAttributes(context, arc, bean); String leftName = HtmlFrameBorderLayout.LEFT_FACET; String innerLeftName = HtmlFrameBorderLayout.INNER_LEFT_FACET; String rightName = HtmlFrameBorderLayout.RIGHT_FACET; String innerRightName = HtmlFrameBorderLayout.INNER_RIGHT_FACET; UIComponent center = getFacet(component, HtmlFrameBorderLayout.CENTER_FACET); UIComponent top = getFacet(component, HtmlFrameBorderLayout.TOP_FACET); UIComponent bottom = getFacet(component, HtmlFrameBorderLayout.BOTTOM_FACET); UIComponent left = getFacet(component, leftName); UIComponent right = getFacet(component, rightName); UIComponent innerLeft = getFacet(component, innerLeftName); UIComponent innerRight = getFacet(component, innerRightName); boolean r2l = arc.getLocaleContext().isRightToLeft(); if (left == null) { leftName = r2l ? HtmlFrameBorderLayout.END_FACET : HtmlFrameBorderLayout.START_FACET; left = getFacet(component, leftName); } if (right == null) { rightName = r2l ? HtmlFrameBorderLayout.START_FACET : HtmlFrameBorderLayout.END_FACET; right = getFacet(component, rightName); } if (innerLeft == null) { innerLeftName = r2l ? HtmlFrameBorderLayout.INNER_END_FACET : HtmlFrameBorderLayout.INNER_START_FACET; innerLeft = getFacet(component, innerLeftName); } if (innerRight == null) { innerRightName = r2l ? HtmlFrameBorderLayout.INNER_START_FACET : HtmlFrameBorderLayout.INNER_END_FACET; innerRight = getFacet(component, innerRightName); } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlFormattedText.java | 120 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlFormattedText.java | 120 |
super.writeStyleClass(context, styleClass); // XhtmlLafRenderer.renderStyleClassAttribute(context, styleClass); } /*else if (XhtmlLafRenderer.renderStyleElements(context)) { // =-= Darn annoying to do given the current API for // ElementInfo; we could start the style elements here // easily enough, but how do we know when to end the style elements? }*/ } } static private final FormattedTextParser _sParser = new FormattedTextParser(); static { // Register all the allowed elements _sParser.addElement(new XhtmlFormattedText.XhtmlElement("br", true, true)); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("hr", true, true)); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("li", false, false)); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("p", false, false)); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("b")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("i")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("tt")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("big")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("small")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("span")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("pre")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("ul")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("ol")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("em")); _sParser.addElement(new XhtmlFormattedText.XhtmlElement("a")); _sParser.addElement(new XhtmlFormattedText.FontElement("font")); } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlFormattedText.java | 35 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlFormattedText.java | 35 |
class XhtmlFormattedText { static public FormattedTextParser getFormattedTextParser() { return _sParser; } private XhtmlFormattedText() { } // This is for the font element. Only size is the allowed attribute. static private class FontElement extends FormattedTextParser.DefaultElementInfo { public FontElement(String name) { super(name); } public FontElement(String name, boolean empty, boolean closeRequired) { super(name, empty, closeRequired); } @Override public void writeInlineStyle(FacesContext context, String style) { } @Override public void writeStyleClass(FacesContext context, String styleClass) { } @Override public void writeHRef(FacesContext context, String href) { } @Override public void writeSize(FacesContext context, String fontSize) throws IOException { context.getResponseWriter().writeAttribute("size", fontSize, null); } } static private class XhtmlElement extends FormattedTextParser.DefaultElementInfo { public XhtmlElement(String name) { super(name); } public XhtmlElement(String name, boolean empty, boolean closeRequired) { super(name, empty, closeRequired); } @Override public void writeInlineStyle(FacesContext context, String style) throws IOException { // if (XhtmlLafRenderer.supportsStyleAttributes(context)) { super.writeInlineStyle(context, style); } /*else if (XhtmlLafRenderer.renderStyleElements(context)) { // ??? =-=AEW How do we get a Style object??? }*/ } @Override public void writeStyleClass(FacesContext context, String styleClass) throws IOException { // if (XhtmlLafRenderer.supportsStyleAttributes(context)) { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyCheckboxRenderer.java | 265 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRadioRenderer.java | 255 |
} @Override protected void renderId( FacesContext context, UIComponent component) throws IOException { if (shouldRenderId(context, component)) { String clientId = getClientId(context, component); context.getResponseWriter().writeAttribute("id", clientId, "id"); } } /** * Disable rendering the form event handlers on the parent. * In Gecko, they bubble up, but in IE, they don't, so * they have to go on the items. */ @Override protected void renderFormEventHandlers( FacesContext context, FacesBean bean) throws IOException { } /** * Disable rendering "onclick" on the parent; it needs to * go on the individual radio buttons */ @Override protected String getOnclick( FacesBean bean ) { return null; } /** * Render the per-item event handlers */ protected void renderItemFormEventHandlers( FacesContext context, FacesBean bean) throws IOException { super.renderFormEventHandlers(context, bean); } /** * Get the onclick for the individual radio buttons. */ protected String getItemOnclick(RenderingContext arc, FacesBean bean) { // Get the overall onclick, and merge in any needed autosubmit script String onclick = super.getOnclick(bean); if (isAutoSubmit(bean)) { String source = LabelAndMessageRenderer.__getCachedClientId(arc); boolean immediate = isImmediate(bean); String auto = AutoSubmitUtils.getSubmitScript(arc, source, XhtmlConstants.AUTOSUBMIT_EVENT, immediate); onclick = XhtmlUtils.getChainedJS(onclick, auto, true); } return onclick; } protected Object getAccessKey(FacesBean bean) { return bean.getProperty(_accessKeyKey); } protected String getLayout(FacesBean bean) { return toString(bean.getProperty(_layoutKey)); } @Override protected String getUnselectedLabel(FacesBean bean) |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java | 66 |
org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java | 68 |
} @Override public void startDocument() throws IOException { } @Override public void endDocument() throws IOException { _out.flush(); } @Override public void flush() throws IOException { _closeStartIfNecessary(); _out.flush(); } @Override public void close()throws IOException { flush(); _out.close(); } @Override public void startElement(String name, UIComponent component) throws IOException { // =-=AEW Should we force all lowercase? if (name.charAt(0) == 's') { // Optimization (see bug 2009019): our code has a tendency // to write out unnecessary empty <span> elements. So, // when we start a "span" HTML element, don't actually write // out anything just yet; mark it pending. if ("span".equals(name)) { // push any pending element onto the stack of skipped elements _markPendingElements(); // make this the current pending element _pendingElement = name; return; } else if ("script".equals(name) || "style".equals(name)) { _dontEscape = true; } } // start writing the element _startElementImpl(name); } @Override public void endElement(String name) throws IOException { // eliminate any <pending></pending> combinations if (_pendingElement != null) { // we need to return immedediately because in this // case, the element was never pushed onto the // element stack. _pendingElement = null; return; } // get the name of the last outputted element String element = _popSkippedElement(); // non-null names indicate that the element was ouput, so its // end tag should be output as well if (element != null) { if (!element.equals(name)) { _LOG.severe("ELEMENT_END_NAME_NOT_MATCH_START_NAME", new Object[]{name, element}); } Writer out = _out; // always turn escaping back on once an element ends _dontEscape = false; if (_closeStart) { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java | 291 |
org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java | 337 |
int versionEndIndex = agent.indexOf("("); String version = agent.substring(versionStartIndex,versionEndIndex); agentObj.setAgentVersion(version); //parse agentName int agentNameStartIndex = agent.indexOf(":",versionEndIndex) +1; //find end of agentName (ie. when we see a semicolon int agentNameEndIndex = agentNameStartIndex; for (;agent.charAt(agentNameEndIndex)!=';' && agent.charAt(agentNameEndIndex) !=')'; agentNameEndIndex++); String agentName = agent.substring(agentNameStartIndex,agentNameEndIndex); agentObj.setAgent(agentName); if (agent.charAt(agentNameEndIndex) == ')') return; //now parse remaining request specific capabilities int capabilityNameStartIndex; int capabilityNameEndIndex; int capabilityValueStartIndex; int capabilityValueEndIndex = agentNameEndIndex; while(agent.charAt(capabilityValueEndIndex)!= ')') { capabilityNameStartIndex = capabilityValueEndIndex + 1; capabilityNameEndIndex = agent.indexOf(":",capabilityNameStartIndex); String capabilityName = agent.substring(capabilityNameStartIndex,capabilityNameEndIndex); capabilityValueStartIndex = capabilityNameEndIndex +1; capabilityValueEndIndex = agent.indexOf(";",capabilityValueStartIndex); if (capabilityValueEndIndex == -1) { capabilityValueEndIndex = agent.indexOf(")",capabilityValueEndIndex); } String capabilityValue = agent.substring(capabilityValueStartIndex,capabilityValueEndIndex); agentObj.__addRequestCapability(CapabilityKey.getCapabilityKey(capabilityName,true),capabilityValue); } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TrainRenderer.java | 92 |
org/apache/myfaces/trinidadinternal/renderkit/uix/ProcessRenderer.java | 66 |
Object sizeObject = requestMap.get("size"); if ( valueObject != null) { int value = -1; try { value = Integer.parseInt(valueObject.toString()); } catch ( NumberFormatException nfe) { _LOG.severe(nfe); } int size = 0; try { size = Integer.parseInt(sizeObject.toString()); } catch ( NumberFormatException nfe) { _LOG.warning(nfe); } if (size < 0) size = 0; if ( value >= 0 ) { UIXProcess process = (UIXProcess)component; Object oldPath = process.getRowKey(); Object focusPath = process.getFocusRowKey(); process.setRowKey(focusPath); UIComponent stamp = process.getNodeStamp(); int index = process.getRowIndex(); if (size == 0) { index = ProcessUtils.getBackIndex(process, stamp, index); } else { index = ProcessUtils.getNextIndex(process, stamp, index); } process.setRowIndex(index); new ActionEvent(stamp).queue(); process.setRowKey(oldPath); } } } } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/image/xml/parse/BaseImageProviderRequestParser.java | 415 |
org/apache/myfaces/trinidadinternal/util/nls/StringUtils.java | 127 |
public static String stripMnemonic(String string) { if (string == null) { return null; } int length = string.length(); // Single character (or empty) strings can't have a mnemonic if (length <= 1) return string; StringBuffer buffer = null; int i = 0; while (i < length) { int index = string.indexOf(_MNEMONIC_INDICATOR, i); // We've reached the append. Append the rest of the // string to the buffer, if one exists, then exit if ((index < 0) || (index >= length - 1)) { if (buffer != null) buffer.append(string.substring(i)); break; } if (buffer == null) { // If the string starts with an ampersand, but not a double // ampersand, then we just want to return // stripMnemonic(string.substring(1)). This is basically // what we do here, only I've optimized the tail recursion away. if ((index == 0) && (string.charAt(1) != _MNEMONIC_INDICATOR)) { string = string.substring(1); length--; continue; } else { // Allocate the buffer. We can reserve only space // (length - 1), because, by now, we know there's at least // 1 ampersand buffer = new StringBuffer(length - 1); } } // Append the bits of the string before the ampersand buffer.append(string.substring(i, index)); // And append the character after the ampersand buffer.append(string.charAt(index + 1)); // And skip to after that character i = index + 2; } // If we never allocated a buffer, then there's no mnemonic // at all, and we can just return the whole string if (buffer == null) return string; return new String(buffer); } private static final char _MNEMONIC_INDICATOR = '&'; |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/config/upload/ActionUploadRequestWrapper.java | 81 |
org/apache/myfaces/trinidadinternal/config/upload/UploadRequestWrapper.java | 91 |
if (encoding.equals(_encoding)) return; // Don't call super.setCharacterEncoding() - it's too late // and we'll get a warning _encoding = encoding; if (_LOG.isFine()) _LOG.fine("Switching encoding of wrapper to " + encoding); _extractedAndDecodedParams = new HashMap<String, String[]>(_extractedParams.size()); byte[] buffer = new byte[256]; // FIXME: decodeRequestParameter() assumes the incoming // character set is ISO-8859-1 - but this is not // necessarily true! for(Map.Entry<String, String[]> entry : _extractedParams.entrySet()) { String key = entry.getKey(); key = CaboHttpUtils.decodeRequestParameter(key, encoding, buffer); String[] oldValue = entry.getValue(); int length = oldValue.length; String[] newValue = new String[length]; for (int i = 0; i < length; i++) { newValue[i] = CaboHttpUtils.decodeRequestParameter(oldValue[i], encoding, buffer); if (_LOG.isFinest()) _LOG.finest("Parameter " + key + ":" + newValue[i]); } _extractedAndDecodedParams.put(key, newValue); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 164 |
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 276 |
if (ch < 0xA0) { // If "?" or over... if (ch >= 0x3f) { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } // If "'" or over... else if (ch >= 0x27) { if (ch < 0x3c) { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } else if (ch == '<') { buffIndex = _flushBuffer(out, buff, buffIndex); out.write("<"); } else if (ch == '>') { buffIndex = _flushBuffer(out, buff, buffIndex); out.write(">"); } else { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } } else { if (ch == '&') { buffIndex = _flushBuffer(out, buff, buffIndex); out.write("&"); } else if (ch == 0x0A) { buffIndex = _flushBuffer(out, buff, buffIndex); _println(out); if ((i + 1 < length) && (text.charAt(i + 1) == 0x0D)) |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MessageBoxRenderer.java | 252 |
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/MessageBoxRenderer.java | 276 |
pattern = getTranslatedString(context, "af_messages.LIST_FORMAT_private"); description = formatString(context, pattern, parameters); } else { description = ""; } // get (or generate) the current child currentChild = _generateChild(msg, currentChild); currentChild.render(context); if (isTextFormatted(summary)) renderFormattedText(context, description); else if (description != null) writer.writeText(description, null); return currentChild; } private BaseMutableUINode _generateChild( MessageWrapper msg, BaseMutableUINode cachedChild) { if (cachedChild == null) cachedChild = new BaseMutableUINode(MARLIN_NAMESPACE, LINK_NAME); // link text String label = msg.getLabel(); cachedChild.setAttributeValue(TEXT_ATTR, label); String anchor = null; String summary = null; if (label != null) { // If the text is null, no need to actually collect these values anchor = MessageUtils.getAnchor(msg.getId().toString()); if (anchor != null) anchor = "#"+anchor; summary = msg.getSummary(); } // However, we always have to update the anchor and description because // they were possibly set the last time this link was used. Even if they // don't render in the page, they'll be in the HTML. cachedChild.setAttributeValue(DESTINATION_ATTR, anchor); cachedChild.setAttributeValue(LONG_DESC_ATTR, summary); return cachedChild; } private String _getMessageTextStyle( |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MenuListRenderer.java | 201 |
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/MenuListRenderer.java | 196 |
String style = PdaHtmlLafUtils.getStringAttributeValue(context, node, LIST_STYLE_ATTR); if (LIST_STYLE_LOWER_ALPHA.equals(style) || LIST_STYLE_UPPER_ALPHA.equals(style) || LIST_STYLE_DECIMAL.equals(style) ) { writer.endElement("ol"); } else { writer.endElement("ul"); } super.postrender( context, node); } @Override protected void renderIndexedChild( UIXRenderingContext context, UINode node, int childIndex ) throws IOException { UINode child = node.getIndexedChild(context, childIndex); boolean selected = isSelected(context, child); renderNode(context, child, selected); } protected void renderNode( UIXRenderingContext context, UINode node, boolean selected ) throws IOException { if (selected ) { // set the selected property to true StyledItemUtils.setSelected(context, true); } ResponseWriter writer = context.getResponseWriter(); writer.startElement( LIST_ITEM_ELEMENT, null ); writer.startElement(SPAN_ELEMENT, null); if ( StyledItemUtils.isSelected(context, node) ) renderStyleClassAttribute(context, AF_MENU_LIST_SELECTED_STYLE_CLASS); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/InstallLafIconProvider.java | 86 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/IconArrayLafIconProvider.java | 98 |
IconArrayLafIconProvider iconProvider ) { int maxIndex = iconProvider._icons.length; _icons = new Icon[maxIndex]; // copy the icon array of the iconProvider passed in System.arraycopy(iconProvider._icons, 0, _icons, 0 , maxIndex); } /* * icons are put into array of icons at the index specified by the * corresponding iconKey. */ private void _setIcons( Object[] iconInfo ) { int numIcons = iconInfo.length / 2; IconKey[] keys = new IconKey[ numIcons ]; Icon[] icons = new Icon[ numIcons ]; for (int i = 0; i < keys.length; i ++) { keys[i] = (IconKey)iconInfo[i * 2]; icons[i] = (Icon)iconInfo[(i * 2) + 1]; } // // Assign the values // for (int i = 0; i < numIcons; i++) { if ( keys[i] != null ) _icons[ keys[i].getKeyIndex()] = icons[i]; } } /** * Returns the URI to the icon indentified by the icon key */ @Override public String getIconURI( UIXRenderingContext context, IconKey iconKey ) { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MenuListRenderer.java | 119 |
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TabBarRenderer.java | 82 |
} protected UIXHierarchy getHierarchyBase( UIXRenderingContext context, UINode node ) { return (UIXHierarchy) node.getUIComponent(); } protected UINode getStamp( UIXRenderingContext context, UINode node ) { return node.getNamedChild(context, NODE_STAMP_CHILD); } protected boolean setNewPath( UIXRenderingContext context, UINode node, UIXHierarchy component ) { int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0); return ModelRendererUtils.setNewPath(component, startDepth, ((UIXNavigationLevel)component).getFocusRowKey()); } /** * @todo - deal with rendered=false on model nodes */ @Override protected void renderContent( UIXRenderingContext context, UINode node ) throws IOException { UIXHierarchy component = getHierarchyBase(context, node); UINode stamp = getStamp(context, node); if(stamp != null) { // Save the current key Object oldPath = component.getRowKey(); boolean isNewPath = setNewPath(context, node, component); if (isNewPath) { int size = component.getRowCount(); int rowIndex = component.getRowIndex(); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 313 |
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 427 |
out.write("""); } else if (ch == 0x0A) { buffIndex = _flushBuffer(out, buff, buffIndex); _println(out); if ((i + 1 < length) && (text.charAt(i + 1) == 0x0D)) i++; } else if (ch == 0x0D) { buffIndex = _flushBuffer(out, buff, buffIndex); _println(out); if ((i + 1 < length) && (text.charAt(i + 1) == 0x0A)) i++; } else { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } } } else if (ch <= 0xff) { buffIndex = _flushBuffer(out, buff, buffIndex); out.write('&'); out.write(_sISO8859_1_Entities[ch - 0xA0]); out.write(';'); } else { buffIndex = _flushBuffer(out, buff, buffIndex); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/image/cache/ColorizedIconNameProvider.java | 34 |
org/apache/myfaces/trinidadinternal/image/cache/FlippedIconNameProvider.java | 34 |
public class FlippedIconNameProvider implements NameProvider { public String getName( ImageContext context, Map<Object, Object> properties) { String name = (String)properties.get(ImageConstants.NAME_KEY); if (name == null) { String source = (String)properties.get(ImageConstants.SOURCE_KEY); // Get just the file name out of the imageName int lastSepIndex = source.lastIndexOf(File.separatorChar); if ((lastSepIndex == -1) && (File.separatorChar != '/')) lastSepIndex = source.lastIndexOf('/'); int dotIndex = source.lastIndexOf('.'); if ((dotIndex == -1) || (dotIndex <= lastSepIndex)) dotIndex = source.length(); name = source.substring(lastSepIndex+1, dotIndex); } // Tack on a "-r" suffix if this is a RTL image String directionName = ""; if (CacheUtils.getReadingDirection(context, properties) == LocaleUtils.DIRECTION_RIGHTTOLEFT) { directionName = "-r"; } return _PREFIX + name + directionName; } static private final String _PREFIX = "f"; |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 201 |
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 546 |
out.write("""); } else if (ch == 0x0A) { buffIndex = _flushBuffer(out, buff, buffIndex); _println(out); if ((i + 1 < end) && (text[i + 1] == 0x0D)) i++; } else if (ch == 0x0D) { buffIndex = _flushBuffer(out, buff, buffIndex); _println(out); if ((i + 1 < end) && (text[i + 1] == 0x0A)) i++; } else { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } } } else if (ch <= 0xff) { buffIndex = _flushBuffer(out, buff, buffIndex); out.write('&'); out.write(_sISO8859_1_Entities[ch - 0xA0]); out.write(';'); } else { buffIndex = _flushBuffer(out, buff, buffIndex); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/GlobalHeaderRenderer.java | 305 |
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/TabBarRenderer.java | 280 |
super.renderChild( context, node); writer.endElement("span"); } } } private boolean _isSelected( UIXRenderingContext context, UINode node ) { Object selectedAttr = node.getAttributeValue(context, SELECTED_ATTR); if (selectedAttr == null) { selectedAttr = context.getLocalProperty(0, _SELECTED_KEY, null); if (selectedAttr != null) return true; return false; } return ((Boolean)selectedAttr).booleanValue(); } protected UIXHierarchy getHierarchyBase( UIXRenderingContext context, UINode node ) { return (UIXHierarchy) node.getUIComponent(); } protected UINode getStamp( UIXRenderingContext context, UINode node ) { return node.getNamedChild(context, NODE_STAMP_CHILD); } protected boolean setNewPath( UIXRenderingContext context, UINode node, UIXHierarchy component ) { int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0); return ModelRendererUtils.setNewPath(component, startDepth, ((UIXNavigationLevel)component).getFocusRowKey()); } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java | 225 |
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TreeRenderer.java | 186 |
UIXHierarchy tree) { tree.setRowKey(null); return true; } private boolean _isShownSelected( UIXHierarchy tree, Map<Object, Boolean> selectedPaths, Object currPath ) { boolean selected = false; if (tree instanceof UIXTree) selected = ((UIXTree)tree).getSelectedRowKeys().isContained(); if (selected) return true; Object value = selectedPaths.get(currPath); if (value != null) return true; return false; } protected Map<Object, Boolean> getSelectedPaths(Object focusPath) { if ( focusPath == null) return new HashMap<Object, Boolean>(0); Map<Object, Boolean> selectedPaths = new HashMap<Object, Boolean>(1); selectedPaths.put(focusPath, Boolean.TRUE); return selectedPaths; } protected RowKeySet getExpandedRowKeys(UIXHierarchy tree) { return ((UIXTree)tree).getDisclosedRowKeys(); } protected String getConnectingBackgroundIcon( |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java | 2414 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessChoiceBarRenderer.java | 641 |
context.getResponseWriter().writeText(chars, 0, 1); } /** * Writes the separator between two elements */ private void _renderSpacerCell( UIXRenderingContext context ) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("td", null); renderItemSpacer(context); writer.endElement("td"); } /* * render the "td". * we only want to render the ID in the "td" if renderAsTable is false. * we only render the baseID if isBaseID is true. Otherwise we render the * subID. * This logic is so for the Visual Editor to know * the pieces are one UINode. See bug 2222541. */ private void _renderStartTableCell( UIXRenderingContext context, UINode node, ResponseWriter writer, boolean renderAsTable, boolean isBaseID ) throws IOException { writer.startElement("td", null); if (!renderAsTable) { if (isBaseID) { renderID(context, node); } } } // Gets the encoded partial targets for the specified node private static String _getPartialTargets( UIXRenderingContext context, UINode node ) { if (!supportsPartialRendering(context)) return null; String[] partialTargets = (String[])node.getAttributeValue(context, PARTIAL_TARGETS_ATTR); // Convert the partial targets to the encoded form return PartialPageRendererUtils.encodePartialTargets(partialTargets); } private String _getIDForFocus( UIXRenderingContext context, UINode node |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormInputRenderer.java | 157 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/InputLabelAndMessageRenderer.java | 194 |
if(labelShowRequired(bean)) { requiredStyleClass = SkinSelectors.STATE_REQUIRED; } List<String> parsedStyleClasses = OutputUtils.parseStyleClassList(styleClass); int userStyleClassCount; if (parsedStyleClasses == null) userStyleClassCount = (styleClass == null) ? 0 : 1; else userStyleClassCount = parsedStyleClasses.size(); String[] styleClasses = new String[userStyleClassCount + 4]; int i=0; if (parsedStyleClasses != null) { while (i < userStyleClassCount) { styleClasses[i] = parsedStyleClasses.get(i); i++; } } else if (styleClass != null) { styleClasses[i++] = styleClass; } styleClasses[i++] = contentStyleClass; styleClasses[i++] = disabledStyleClass; styleClasses[i++] = readOnlyStyleClass; styleClasses[i++] = requiredStyleClass; renderStyleClasses(context, arc, styleClasses); renderInlineStyle(context, arc, bean); } protected boolean isDisabled(FacesBean bean) |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/ButtonRenderer.java | 39 |
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/ResetButtonRenderer.java | 39 |
{ /** * Tests whether the button should be rendered as an image. */ @Override protected boolean doRenderImageContent( UIXRenderingContext context, UINode node ) { // Check with superclass first (screen reader mode). if (!super.doRenderImageContent(context, node)) return false; // We only render buttons as images if we have all // of the button icons. return SimpleButtonUtils.doRenderImageButton(context); } /** * Creates the ImageProviderRequest to use when looking up the * button image. */ @Override protected ImageProviderRequest createImageProviderRequest( UIXRenderingContext context, Object name, Object text, Color foreground, Color background, Color surroundingColor, FontProxy font, boolean disabled, boolean textAntialias, boolean startRounded, boolean endRounded, char accessKey ) { return SimpleButtonUtils.createButtonRequest( context, (name != null) ? name.toString() : null, (text != null) ? text.toString() : null, foreground, background, surroundingColor, font, disabled, textAntialias, accessKey); } /** * Returns the name of the server-side style for styling * button text. */ @Override protected String getServerStyleName( UIXRenderingContext context, UINode node, boolean disabled ) { return SimpleButtonUtils.getButtonStyleName(disabled); } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/MessageBoxRenderer.java | 392 |
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/SideBarRenderer.java | 434 |
AF_PANEL_SIDE_BAR_END_BACKGROUND_ICON_NAME); icons = new IconData(bottomStart, bottomEnd, bottomBackground, topStart, topEnd, topBackground, startBackground, endBackground); // Stash away the IconData so that we don't have to re-create // it on the next render skin.setProperty(_ICONS_KEY, icons); } return icons; } // A class that we use for storing Icon-related info private static class IconData { public final Icon bottomStart; public final Icon bottomEnd; public final Icon bottomBackground; public final Icon topStart; public final Icon topEnd; public final Icon topBackground; public final Icon startBackground; public final Icon endBackground; public IconData( Icon bottomStart, Icon bottomEnd, Icon bottomBackground, Icon topStart, Icon topEnd, Icon topBackground, Icon startBackground, Icon endBackground ) { this.bottomStart = bottomStart; this.bottomEnd = bottomEnd; this.bottomBackground = bottomBackground; this.topStart = topStart; this.topEnd = topEnd; this.topBackground = topBackground; this.startBackground = startBackground; this.endBackground = endBackground; } } // Keys for looking up IconData properties on the Skin private static final Object _ICONS_KEY = new Object(); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java | 798 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java | 1458 |
boolean maxUnknown = (maxValue == MAX_VALUE_UNKNOWN); // Zero-indexed block index. long blockIndex = (value - minValue + blockSize - 1L) / blockSize; // sometimes a record set won't start on a multiple of blockSize. So // remember to add any offset: // this can safely be an int because it is an index into the blockSize, // which is itself an int: int offset = (int) (value - (minValue + (blockIndex * blockSize))); if (offset < 0) offset = offset + blockSize; // Total number of blocks (again, zero-indexed) long maxBlockIndex; if (maxUnknown) maxBlockIndex = blockIndex + 1; else { maxBlockIndex = (maxValue - minValue - offset) / blockSize; if (offset > 0) maxBlockIndex++; } // Calculate the first block that should be shown. The order goes: // Group 0: 0-28 + More // Group 1:Previous + 29-56 + More // Group 2:Previous + 57-84 + More // etc.. long firstBlockIndex; // If everything is visible, or we're in the first group, start at zero. if ((maxBlockIndex <= (_MAX_VISIBLE_OPTIONS - 1L)) || (blockIndex <= (_MAX_VISIBLE_OPTIONS - 2L))) firstBlockIndex = 0; else firstBlockIndex = ((blockIndex - 1L) / (_MAX_VISIBLE_OPTIONS - 2L)) * (_MAX_VISIBLE_OPTIONS - 2L); // And we always show a total of 30 groups (or straight to the end) long lastBlockIndex = firstBlockIndex + (_MAX_VISIBLE_OPTIONS - 1L); if (lastBlockIndex > maxBlockIndex) lastBlockIndex = maxBlockIndex; |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/validator/DateTimeRangeValidator.java | 103 |
org/apache/myfaces/trinidadinternal/validator/DoubleRangeValidator.java | 67 |
String messageDetailMax = this.getMessageDetailMaximum(); String messageDetailMin = this.getMessageDetailMinimum(); String messageDetailRange = this.getMessageDetailNotInRange(); String hintMax = this.getHintMaximum(); String hintMin = this.getHintMinimum(); String hintRange = this.getHintNotInRange(); Map<String, String> cMessages = null; if(messageDetailMax != null || messageDetailMin != null || messageDetailRange != null || hintMax != null || hintMin != null|| hintRange != null) { cMessages = new HashMap<String, String>(); cMessages.put("max", messageDetailMax); cMessages.put("min", messageDetailMin); cMessages.put("range", messageDetailRange); cMessages.put("hintMax", hintMax); cMessages.put("hintMin", hintMin); cMessages.put("hintRange", hintRange); } return _getTrRangeValidator(context, component, maxStr, minStr, cMessages); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java | 328 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRenderer.java | 232 |
} // // ENCODE BEHAVIOR // /* */ @Override protected void encodeAllAsElement( FacesContext context, RenderingContext arc, UIComponent component, FacesBean bean) throws IOException { Converter converter = getConverter(bean); if ( converter == null) converter = getDefaultConverter(context, bean); boolean valuePassThru = getValuePassThru(bean); if (isAutoSubmit(bean)) AutoSubmitUtils.writeDependencies(context, arc); // Only add in validators and converters when we're in valuePassThru // mode; otherwise, there's not enough on the client to even consider FormData fData = arc.getFormData(); if (fData != null) { ((CoreFormData) fData).addOnSubmitConverterValidators(component, valuePassThru ? converter : null, valuePassThru ? getValidators(bean) : null, getClientId(context, component), isImmediate(bean), getRequired(bean), getRequiredMessageKey()); } List<SelectItem> selectItems = getSelectItems(component, converter, false); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyCheckboxRenderer.java | 74 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRadioRenderer.java | 75 |
int selectedIndex, Converter converter, boolean valuePassThru) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("span", component); renderId(context, component); // Render all generic attributes, except styles (they go on the item), // and onclick (also on the item, see below) renderAllAttributes(context, arc, bean, false /*no styles*/); boolean applyFieldSet = _applyFieldSetWrapper(arc); if (applyFieldSet) { String shortDesc = getShortDesc(bean); if (shortDesc == null) { applyFieldSet = false; } else { writer.startElement("fieldset", null); writer.writeAttribute("style", "border:none;margin:0px;padding:0px;", null); writer.startElement("legend", null); renderStyleClass(context, arc, SkinSelectors.HIDDEN_LABEL_STYLE_CLASS); writer.writeText(shortDesc, "shortDesc"); writer.endElement("legend"); } } encodeSelectItems(context, arc, component, bean, selectItems, selectedIndex, converter, |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/GlobalHeaderRenderer.java | 64 |
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/TabBarRenderer.java | 83 |
renderStyleClassAttribute(context, _TAB_BAR_STYLE_CLASS); } @Override protected void renderContent( UIXRenderingContext context, UINode node ) throws IOException { boolean initialLinkSelectedStatus = LinkUtils.isSelected(context); UIXHierarchy component = getHierarchyBase(context, node); UINode stamp = getStamp(context, node); if(stamp != null) { // Save the current key Object oldPath = component.getRowKey(); boolean isNewPath = setNewPath(context, node, component); if (isNewPath) { int size = component.getRowCount(); int rowIndex = component.getRowIndex(); for (int i = 0; i < size; i++) { component.setRowIndex(i); renderStamp(context, stamp,i == rowIndex); if ( i < (size - 1)) renderBetweenIndexedChildren(context,node,i); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/config/upload/ActionUploadRequestWrapper.java | 113 |
org/apache/myfaces/trinidadinternal/config/upload/UploadRequestWrapper.java | 125 |
_extractedAndDecodedParams.put(key, newValue); } // Let the UploadedFiles know, so it can fix up filenames UploadedFiles.setCharacterEncoding(this, encoding); } @Override public String getParameter(String param) { String[] value = _getParameterValues(param); if (value == null) return null; return value[0]; } @Override public Map<String, String[]> getParameterMap() { Map<String, String[]> map = _getMap(); return Collections.unmodifiableMap(map); } @Override public Enumeration<String> getParameterNames() { return Collections.enumeration(_getMap().keySet()); } @Override public String[] getParameterValues(String param) { String[] value = _getParameterValues(param); if (value == null) return null; return value.clone(); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java | 855 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafRenderer.java | 1272 |
renderID(context, id, false); } // write a reference to the transparent gif function writer.write("t("); if ((width != null) || (height != null)) { String widthParam = "void 0"; if (width != null) { widthParam = width; if (needsQuoting) { writer.write("'"); } } writer.write(widthParam); if (needsQuoting && (width != null)) { writer.write("'"); } if (height != null) { writer.write(","); if (needsQuoting) { writer.write("'"); } writer.write(height); if (needsQuoting) { writer.write("'"); } } } writer.write(")"); writer.endElement("script"); } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyCheckboxRenderer.java | 157 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRadioRenderer.java | 160 |
i, selectedIndex == i, disabled, renderedOne && isVertical, itemOnclick)) { renderedOne = true; } } } protected boolean encodeSelectItem( FacesContext context, RenderingContext arc, UIComponent component, SelectItem item, Converter converter, boolean valuePassThru, Object accessKey, int index, boolean isSelected, boolean isDisabled, boolean renderBreak, String itemOnclick) throws IOException { if (item == null) return false; String id = arc.getCurrentClientId(); if (id == null) return false; // Create the per-item ID, necessary for generating the <label> // tag. We use "parentid:_[index]" StringBuffer subidBuffer = new StringBuffer(id.length() + 4); subidBuffer.append(id); subidBuffer.append(":_"); subidBuffer.append(IntegerUtils.getString(index)); String subid = subidBuffer.toString(); Object itemValue = getItemValue(context, |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/desktop/DesktopTableRenderer.java | 701 |
org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java | 550 |
} /** * @todo Reconsider our choice of style for this element! */ private void _renderTableHeader( FacesContext context, RenderingContext arc, TableRenderingContext tContext, UIComponent component) throws IOException { // implement header facet on table: see bug 3788610 ResponseWriter writer = context.getResponseWriter(); UIComponent header = getFacet(component, CoreTable.HEADER_FACET); if (header != null) { writer.startElement("thead", null); writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null); writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null); writer.writeAttribute(XhtmlConstants.COLSPAN_ATTRIBUTE, tContext.getActualColumnCount(), null); renderStyleClass(context, arc, SkinSelectors.AF_COLUMN_SORTABLE_HEADER_ICON_STYLE_CLASS); encodeChild(context, header); writer.endElement(XhtmlConstants.TABLE_DATA_ELEMENT); writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT); writer.endElement("thead"); } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 383 |
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 502 |
if (ch < 0xA0) { // If "?" or over... if (ch >= 0x3f) { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } // If "'" or over... else if (ch >= 0x27) { if (ch < 0x3c) { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } // Note - "<" isn't escaped in attributes, as per HTML spec else if (ch == '>') { buffIndex = _flushBuffer(out, buff, buffIndex); out.write(">"); } else { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } } else { if (ch == '&') { buffIndex = _flushBuffer(out, buff, buffIndex); // HTML 4.0, section B.7.1: ampersands followed by // an open brace don't get escaped if ((i + 1 < end) && |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 216 |
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 328 |
if ((i + 1 < length) && (text.charAt(i + 1) == 0x0A)) i++; } else { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } } } else if (ch <= 0xff) { buffIndex = _flushBuffer(out, buff, buffIndex); out.write('&'); out.write(_sISO8859_1_Entities[ch - 0xA0]); out.write(';'); } else { buffIndex = _flushBuffer(out, buff, buffIndex); // See above for what _UNICODE_LINE_BREAK means... if (ch == _UNICODE_LINE_BREAK) out.write("<br>"); else if (ch == _UNICODE_HYPHENATION_POINT) out.write("<wbr>"); else _writeDecRef(out, ch); } } _flushBuffer(out, buff, buffIndex); } /** * Write a string attribute. Note that this code * is duplicated below for character arrays - change both * places if you make any changes!!! */ static public void writeAttribute( |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesNodeParser.java | 131 |
org/apache/myfaces/trinidadinternal/agent/parse/ComponentNodeParser.java | 91 |
ArrayList<IncludeNode> nodesWithRefList = new ArrayList<IncludeNode>(_includeNodes.size()); ArrayList<IncludeNode> nodesWithSrcList = new ArrayList<IncludeNode>(_includeNodes.size()); for (int i = 0; i < _includeNodes.size(); i++) { IncludeNode node = _includeNodes.get(i); if (node.__getRefId() != null) nodesWithRefList.add(node); else nodesWithSrcList.add(node); } IncludeNode[] nodesWithRef = nodesWithRefList.toArray(new IncludeNode[nodesWithRefList.size()]); IncludeNode[] nodesWithSrc = nodesWithSrcList.toArray(new IncludeNode[nodesWithSrcList.size()]); return new DeviceComponentNode(_type, nodesWithRef, nodesWithSrc); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/LinkDataObject.java | 53 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/LinkDataObject.java | 164 |
for (int childIndex = 0; childIndex < indexedChildCount; childIndex++) { UINode child = parent.getIndexedChild(context, childIndex); // needed for TrainRenderer. It is important to know what child index // this is, not just the index of the visible children. BaseLafUtils.setRenderingProperty(context, _CURRENT_INDEX_KEY, childIndex); if ((child != null) && !Boolean.FALSE.equals( child.getAttributeValue(context, UIConstants.RENDERED_ATTR))) { context.pushChild(child, null, childIndex); context.pushRenderedChild(context, child); try { child.render(context); } finally { context.popRenderedChild(context); context.popChild(); } } BaseLafUtils.setRenderingProperty(context, _CURRENT_INDEX_KEY, null); } BaseLafUtils.setRenderingProperty(context, _DATA_OBJECT_LIST_KEY, null); __setDataObjectUsedMode(context, false); return list; } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java | 437 |
org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java | 369 |
_out.write('>'); _closeStart = false; } } /** * Flushes out any pending element, celaring the pending * entry. */ private void _outputPendingElements() throws IOException { String pendingElement = _pendingElement; if (pendingElement != null) { // we clear the pending element BEFORE calling // startElementImpl to prevent _startElementImpl's indirect call // to _markPendingElements from pushing our element onto // the skipped stack, imbalancing the stack _pendingElement = null; // start the pending element _startElementImpl(pendingElement); } } /** * If an element is pending, push it onto the stack of skipped * elements because it doesn't have any attributes */ private void _markPendingElements() { String pendingElement = _pendingElement; if (pendingElement != null) { _pushSkippedElement(); _pendingElement = null; } } /** * Retrieves the name of the last output element. If it is null, * that element was skipped and thus its end tag should be suppressed * as well */ private String _popSkippedElement() { int size = _skippedElements.size(); if (size == 0) return null; return _skippedElements.remove(size - 1); } /** * Marks the skipped element so that the output of its * end tag can also be suppressed */ private void _pushSkippedElement() { _skippedElements.add(null); } /** * Marks that we have outputted a real element so that the ordering of * the outputted and skipped elements can be maintained. This * also aids debuggin by ensuring that the element being ended matches * the actual ouputted name. */ private void _pushOutputtedElement( String name ) { _skippedElements.add(name); } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 148 |
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 487 |
static public void writeAttribute( Writer out, char[] buff, char[] text, int start, int length) throws IOException { int buffLength = buff.length; int buffIndex = 0; int end = start + length; for (int i = start; i < end; i++) { char ch = text[i]; if (ch < 0xA0) { // If "?" or over... if (ch >= 0x3f) { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } // If "'" or over... else if (ch >= 0x27) { if (ch < 0x3c) { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } // Note - "<" isn't escaped in attributes, as per HTML spec else if (ch == '>') |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/PageMenuButtonsRenderer.java | 31 |
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/PageMenuButtonsRenderer.java | 32 |
@Deprecated public class PageMenuButtonsRenderer extends GlobalButtonBarRenderer { @Override protected UIXHierarchy getHierarchyBase( UIXRenderingContext context, UINode node ) { UINode pageNode = context.getParentContext().getAncestorNode(0); return (UIXPage) pageNode.getUIComponent(); } @Override protected UINode getStamp( UIXRenderingContext context, UINode node ) { UINode pageNode = context.getParentContext().getAncestorNode(0); return getNamedChild(context, pageNode, NODE_STAMP_CHILD); } @Override protected boolean setNewPath( UIXRenderingContext context, UINode node, UIXHierarchy component ) { int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0); return PageRendererUtils.setNewPath(context, component, startDepth); } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java | 648 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessUtils.java | 201 |
UIConstants.GOTO_EVENT); String encodedSource = XhtmlLafUtils.getFormEncodedParameter(formEncoder, form, sourceKey, name); String encodedPartialTargets = XhtmlLafUtils.getFormEncodedParameter(formEncoder, form, partialTargetsKey, partialTargets); int initialSize = _CHOICE_ON_CHANGE_FORM_START.length() + form.length() + 13 + encodedSource.length() + _CHOICE_ON_CHANGE_FORM_END.length(); // Make room for partialTargets if we've got any if (encodedPartialTargets != null) initialSize += (encodedPartialTargets.length() + 2); StringBuffer buffer = new StringBuffer(initialSize); buffer.append(_CHOICE_ON_CHANGE_FORM_START); buffer.append(form); buffer.append("','"); buffer.append(encodedGotoEvent); buffer.append("','"); buffer.append(encodedSource); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ProcessUtils.java | 154 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessUtils.java | 279 |
UIXCollection component, UIComponent stamp, int startIndex ) { int i = startIndex + 1; int rowCount = component.getRowCount(); while (i < rowCount) { component.setRowIndex(i); boolean disabled = Boolean.TRUE.equals( stamp.getAttributes().get("disabled")); boolean readOnly = Boolean.TRUE.equals( stamp.getAttributes().get("readOnly")); boolean rendered = stamp.isRendered(); // if this node is rendered and not disabled and not readOnly // then it can be used as the back button node. if (!disabled && !readOnly && rendered) { component.setRowIndex(startIndex); return i; } i++; } component.setRowIndex(startIndex); return NO_INDEX; } public static void renderNavSubmitScript( |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 261 |
org/apache/myfaces/trinidadinternal/io/HTMLEscapes.java | 368 |
static public void writeAttribute( Writer out, char[] buff, String text ) throws IOException { int buffLength = buff.length; int buffIndex = 0; int length = text.length(); for (int i = 0; i < length; i++) { char ch = text.charAt(i); if (ch < 0xA0) { // If "?" or over... if (ch >= 0x3f) { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); } // If "'" or over... else if (ch >= 0x27) { if (ch < 0x3c) { buffIndex = _addToBuffer(out, buff, buffIndex, buffLength, ch); // Note - "<" isn't escaped in attributes, as per HTML spec } else if (ch == '>') |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectBooleanRadioRenderer.java | 184 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java | 498 |
rw.writeAttribute("ondblclick", getOndblclick(bean), "ondblclick"); rw.writeAttribute("onkeydown", getOnkeydown(bean), "onkeydown"); rw.writeAttribute("onkeyup", getOnkeyup(bean), "onkeyup"); rw.writeAttribute("onkeypress", getOnkeypress(bean), "onkeypress"); rw.writeAttribute("onmousedown", getOnmousedown(bean), "onmousedown"); rw.writeAttribute("onmousemove", getOnmousemove(bean), "onmousemove"); rw.writeAttribute("onmouseout", getOnmouseout(bean), "onmouseout"); rw.writeAttribute("onmouseover", getOnmouseover(bean), "onmouseover"); rw.writeAttribute("onmouseup", getOnmouseup(bean), "onmouseup"); } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/binding/AccessKeyBinding.java | 62 |
org/apache/myfaces/trinidadinternal/binding/StripAccessKeyBinding.java | 55 |
return StringUtils.stripMnemonic(text); } @Override public void setValue(ELContext context, Object value) { throw new PropertyNotWritableException(); } @Override public Class<?> getType(ELContext context) { return Character.class; } @Override public Class<?> getExpectedType() { return Character.class; } @Override public boolean isReadOnly(ELContext context) { return true; } @Override public boolean isLiteralText() { return false; } @Override public String getExpressionString() { return null; } public int hashCode() { return 0; } public boolean equals(Object o) { return (o == this); } private ValueExpression _base; } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java | 87 |
org/apache/myfaces/trinidadinternal/renderkit/uix/TreeRenderer.java | 66 |
String source = parameters.get(UIConstants.SOURCE_PARAM); if (!component.getClientId(context).equals(source)) return; TreeUtils.decodeExpandEvents(parameters, component, Collections.emptyList()); String currencyStrParam = source + NamingContainer.SEPARATOR_CHAR + SELECTED_PARAM; String currencyStr = parameters.get(currencyStrParam); if ((currencyStr != null) && (!"".equals(currencyStr))) { UIXTree tree = (UIXTree) component; Object oldPath = tree.getRowKey(); tree.setClientRowKey(currencyStr); tree.getSelectedRowKeys().clear(); tree.getSelectedRowKeys().add(); tree.setRowKey(oldPath); } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/share/url/EncoderUtils.java | 703 |
org/apache/myfaces/trinidadinternal/share/url/EncoderUtils.java | 781 |
out.write(ch); } } else { if (buf == null) { buf = new ByteArrayOutputStream(_MAX_BYTES_PER_CHAR); if (encoding != null) writer = new OutputStreamWriter(buf, encoding); else writer = new OutputStreamWriter(buf); charArray = new char[1]; } // convert to external encoding before hex conversion try { // An inspection of OutputStreamWriter reveals // that write(char) always allocates a one element // character array. We can reuse our own. charArray[0] = ch; writer.write(charArray, 0, 1); writer.flush(); } catch(IOException e) { buf.reset(); continue; } byte[] ba = buf.toByteArray(); for (int j = 0; j < ba.length; j++) { _writeDoubleHex(out, ba[j] + 256); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandLinkRenderer.java | 58 |
org/apache/myfaces/trinidadinternal/renderkit/uix/CommandRenderer.java | 40 |
@SuppressWarnings("unchecked") @Override public void decode(FacesContext context, UIComponent component) { RequestContext afContext = RequestContext.getCurrentInstance(); ReturnEvent returnEvent = afContext.getDialogService().getReturnEvent(component); if (returnEvent != null) { returnEvent.queue(); } else { Map<String, String> parameterMap = context.getExternalContext().getRequestParameterMap(); Object source = parameterMap.get("source"); String clientId = component.getClientId(context); if ((source != null) && source.equals(clientId)) { (new ActionEvent(component)).queue(); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java | 626 |
org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java | 680 |
agentObj.setAgentVersion(agent.substring(operaIndex + 6,firstSpace)); } int paren = agent.indexOf('('); if (paren >= 0) { // try to determine the OS if (agent.indexOf("Win", paren) > 0) { agentObj.setPlatform(Agent.PLATFORM_WINDOWS); } else if (agent.indexOf("Mac", paren) > 0) { agentObj.setPlatform(Agent.PLATFORM_MACOS); } else if (agent.indexOf("Linux", paren) > 0) { agentObj.setPlatform(Agent.PLATFORM_LINUX); } else if (agent.indexOf("Sun", paren) > 0) { agentObj.setPlatform(Agent.PLATFORM_SOLARIS); } } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/PageMenuListRenderer.java | 38 |
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/PageMenuTabsRenderer.java | 37 |
{ @Override protected UIXHierarchy getHierarchyBase( UIXRenderingContext context, UINode node ) { UINode pageNode = context.getParentContext().getAncestorNode(0); return (UIXPage) pageNode.getUIComponent(); } @Override protected UINode getStamp( UIXRenderingContext context, UINode node ) { UINode pageNode = context.getParentContext().getAncestorNode(0); return getNamedChild(context, pageNode, NODE_STAMP_CHILD); } @Override protected boolean setNewPath( UIXRenderingContext context, UINode node, UIXHierarchy component ) { int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0); return PageRendererUtils.setNewPath(context, component, startDepth); } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/PageMenuListRenderer.java | 38 |
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/PageMenuBarRenderer.java | 35 |
{ @Override protected UIXHierarchy getHierarchyBase( UIXRenderingContext context, UINode node ) { UINode pageNode = context.getParentContext().getAncestorNode(0); return (UIXPage) pageNode.getUIComponent(); } @Override protected UINode getStamp( UIXRenderingContext context, UINode node ) { UINode pageNode = context.getParentContext().getAncestorNode(0); return getNamedChild(context, pageNode, NODE_STAMP_CHILD); } @Override protected boolean setNewPath( UIXRenderingContext context, UINode node, UIXHierarchy component ) { int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0); return PageRendererUtils.setNewPath(context, component, startDepth); } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/GlobalHeaderRenderer.java | 191 |
org/apache/myfaces/trinidadinternal/ui/laf/simple/desktop/GlobalHeaderRenderer.java | 195 |
renderItemStyleAttrs(context, node, index, selected); // Render the tab link super.renderIndexedChild( context, node, index); writer.endElement(TABLE_DATA_ELEMENT); } protected void renderStamp( UIXRenderingContext context, UINode stamp, boolean selected )throws IOException { ResponseWriter writer = context.getResponseWriter(); // Start the table cell writer.startElement(TABLE_DATA_ELEMENT, null); // todo - the index isn't used so putting -1 for now renderItemStyleAttrs(context, stamp, -1, selected); //Record the selected status so that in case this child happens to be // a link, some special aspects like accessibility are taken care of. LinkUtils.setSelected(context, selected); stamp.render(context); writer.endElement(TABLE_DATA_ELEMENT); } /** * Override of renderBetweenIndexedChildren() which * renders the separator Icon. */ @Override protected void renderBetweenIndexedChildren( UIXRenderingContext context, UINode node ) throws IOException { renderBetweenNodes(context); } /** * Override of renderBetweenIndexedChildren() which * renders the separator Icon. */ protected void renderBetweenNodes( UIXRenderingContext context ) throws IOException { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/PanelTabbedRenderer.java | 169 |
org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PanelTabbedRenderer.java | 125 |
PdaHtmlLafConstants.LINK_CONTAINER_PARTIAL_TARGETS_PROPERTY, partialTargets); } /** * Returns the index of the first avilable showItem child that has its * 'selected' property set to true. * If none of children are selected, the index of first such child that is * enabled is returned. * Returns -1 if both of these fail. * * @todo pudupa: XhtmlLafRenderer.getResolvedSelectedIndex() is not a clear * reusable code for 3.0, consolidate for code reuse at a later stage when * the selection model (whether parent has this info or the children) is clear. */ private static int _getResolvedSelectedIndex( UIXRenderingContext context, UINode parentNode) { int childCount = parentNode.getIndexedChildCount(context); int firstEnabledChildIndex = -1; for (int childIndex=0; childIndex<childCount; childIndex++) { UINode childNode = parentNode.getIndexedChild(context, childIndex); if (Boolean.TRUE.equals( childNode.getAttributeValue(context, DISCLOSED_ATTR))) { return childIndex; } if (firstEnabledChildIndex == -1 && !Boolean.TRUE.equals( childNode.getAttributeValue(context, DISABLED_ATTR))) { firstEnabledChildIndex = childIndex; } } return firstEnabledChildIndex; } } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/uinode/UIXComponentUINode.java | 217 |
org/apache/myfaces/trinidadinternal/uinode/UIXComponentUINode.java | 278 |
public void postrenderInternal(UIXRenderingContext context, UINode dataNode) throws IOException { Renderer renderer = null; try { renderer = getRenderer(context, dataNode); } catch( UndeclaredThrowableException e ) { if (_LOG.isWarning()) _LOG.warning(e.getMessage()); return; } assert(renderer instanceof PreAndPostRenderer); // =-=AEW PUSH-POP-CATCH??? if (renderer != null) { // See if we need to push/pop ourselves. This should only // happen in two cases: // - We're the root of the tree. // - We're a private bean, and a Renderer called render() directly // instead of using composite widgets. boolean pushAndPop = (context.getRenderedAncestorNode(0) != dataNode); if (pushAndPop) { context.pushChild(dataNode, null, -1); context.pushRenderedChild(context, dataNode); } try { ((PreAndPostRenderer) renderer).postrender(context, dataNode); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ProcessUtils.java | 85 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessUtils.java | 247 |
UIXCollection component, UIComponent stamp, int startIndex ) { int i = startIndex - 1; while (i >= 0) { component.setRowIndex(i); boolean disabled = Boolean.TRUE.equals( stamp.getAttributes().get("disabled")); boolean readOnly = Boolean.TRUE.equals( stamp.getAttributes().get("readOnly")); boolean rendered = stamp.isRendered(); // if this node is rendered and not disabled and not readOnly // then it can be used as the back button node. if (!disabled && !readOnly && rendered) { component.setRowIndex(startIndex); return i; } i--; } component.setRowIndex(startIndex); return NO_INDEX; } public static int getNextIndex( |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PanelAccordionRenderer.java | 60 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailItemRenderer.java | 54 |
_disclosedKey = type.findKey("disclosed"); } @SuppressWarnings("unchecked") @Override public void decode(FacesContext context, UIComponent component) { Map<String, String> parameters = context.getExternalContext().getRequestParameterMap(); Object event = parameters.get(XhtmlConstants.EVENT_PARAM); if (XhtmlConstants.HIDE_EVENT.equals(event) || XhtmlConstants.SHOW_EVENT.equals(event)) { Object source = parameters.get(XhtmlConstants.SOURCE_PARAM); String id = component.getClientId(context); if (id.equals(source)) { boolean isDisclosed = XhtmlConstants.SHOW_EVENT.equals(event); |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java | 112 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafConstants.java | 493 |
public static final String TABLE_BORDER_0001_STYLE = "OraTableBorder0001"; public static final String TABLE_BORDER_0010_STYLE = "OraTableBorder0010"; public static final String TABLE_BORDER_0011_STYLE = "OraTableBorder0011"; public static final String TABLE_BORDER_0100_STYLE = "OraTableBorder0100"; public static final String TABLE_BORDER_0101_STYLE = "OraTableBorder0101"; public static final String TABLE_BORDER_0110_STYLE = "OraTableBorder0110"; public static final String TABLE_BORDER_0111_STYLE = "OraTableBorder0111"; public static final String TABLE_BORDER_1000_STYLE = "OraTableBorder1000"; public static final String TABLE_BORDER_1001_STYLE = "OraTableBorder1001"; public static final String TABLE_BORDER_1010_STYLE = "OraTableBorder1010"; public static final String TABLE_BORDER_1011_STYLE = "OraTableBorder1011"; public static final String TABLE_BORDER_1100_STYLE = "OraTableBorder1100"; public static final String TABLE_BORDER_1101_STYLE = "OraTableBorder1101"; public static final String TABLE_BORDER_1110_STYLE = "OraTableBorder1110"; public static final String TABLE_BORDER_1111_STYLE = "OraTableBorder1111"; // HIDE SHOW STYLES public static final String HIDE_SHOW_DISCLOSED_SYMBOL_STYLE_CLASS = |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesDocument.java | 222 |
org/apache/myfaces/trinidadinternal/agent/parse/CapabilitiesDocument.java | 264 |
IncludeNode[] uriIncludes = dcNode.__getIncludesByUri(); Object[][] uriCaps = null; if (uriIncludes != null) { uriCaps = new Object[uriIncludes.length][]; for (int i = 0; i < uriIncludes.length; i++) { assert (uriIncludes[i].__getSrcUrl() != null); uriCaps[i] = _getCapabilities(uriIncludes[i].__getSrcUrl()); assert (uriCaps[i] != null); } } return _mergeCaps(refCaps, uriCaps); } /** * get capabilties of node using a node refid */ private Object[][] _getCapabilities(Agent agent, CapabilitiesNode[] capNodes, |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/image/laf/browser/ButtonPainter.java | 85 |
org/apache/myfaces/trinidadinternal/image/laf/browser/CompositeButtonPainter.java | 228 |
topHeight, bottomHeight); } public static Color getDefaultForeground( ImageContext context, boolean disabled ) { // First, try to get the color from the StyleMap String styleName = (disabled) ? _DISABLED_STYLE_NAME : _STYLE_NAME; Color color = BlafImageUtils.__getNamedForeground(context, styleName); // If we didn't get a color from the style, just use defaults if (color == null) color = (disabled) ? _DEFAULT_DISABLED_FOREGROUND : _DEFAULT_FOREGROUND; return color; } public static Color getDefaultBackground( ImageContext context, boolean disabled ) { // First, try to get the color from the StyleMap String styleName = (disabled) ? _DISABLED_STYLE_NAME : _STYLE_NAME; Color color = BlafImageUtils.__getNamedBackground(context, styleName); // If we didn't get a color from the style, just use defaults if (color == null) color = _DEFAULT_BACKGROUND; return color; } public static FontProxy getDefaultFont() { return _DEFAULT_FONT_PROXY; } |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TabBarRenderer.java | 81 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/GlobalButtonBarRenderer.java | 48 |
super.prerender(context, node); } protected UIXHierarchy getHierarchyBase( UIXRenderingContext context, UINode node ) { return (UIXHierarchy) node.getUIComponent(); } protected UINode getStamp( UIXRenderingContext context, UINode node ) { return node.getNamedChild(context, NODE_STAMP_CHILD); } protected boolean setNewPath( UIXRenderingContext context, UINode node, UIXHierarchy component ) { int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0); return ModelRendererUtils.setNewPath(component, startDepth, ((UIXNavigationLevel)component).getFocusRowKey()); } @Override protected void renderContent( UIXRenderingContext context, UINode node ) throws IOException { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MenuListRenderer.java | 119 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/GlobalButtonBarRenderer.java | 49 |
} protected UIXHierarchy getHierarchyBase( UIXRenderingContext context, UINode node ) { return (UIXHierarchy) node.getUIComponent(); } protected UINode getStamp( UIXRenderingContext context, UINode node ) { return node.getNamedChild(context, NODE_STAMP_CHILD); } protected boolean setNewPath( UIXRenderingContext context, UINode node, UIXHierarchy component ) { int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0); return ModelRendererUtils.setNewPath(component, startDepth, ((UIXNavigationLevel)component).getFocusRowKey()); } @Override protected void renderContent( UIXRenderingContext context, UINode node ) throws IOException { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputColorRenderer.java | 129 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputDateRenderer.java | 155 |
if ((returnValue instanceof Date) || fac.isConvertible(returnValue, Date.class)) { FacesBean bean = getFacesBean(component); Converter converter = getConverter(bean); if (converter == null) converter = getDefaultConverter(context, bean); if (converter != null) { returnValue = converter.getAsString(context, component, returnValue); } else { returnValue = returnValue.toString(); } event = new ReturnEvent(component, returnValue, event.getReturnParameters()); } event.queue(); } @Override protected void encodeAllAsElement( FacesContext context, RenderingContext arc, UIComponent component, FacesBean bean) throws IOException { if (!_dateScriptletsRegistered) |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/context/PartialVisitContext.java | 319 |
org/apache/myfaces/trinidadinternal/renderkit/core/ppr/PartialPageContextImpl.java | 293 |
} // Given a single client id, populate the subtree map with all possible // subtree client ids private void _addSubtreeClientId(String clientId) { // Loop over the client id and find the substring corresponding to // each ancestor NamingContainer client id. For each ancestor // NamingContainer, add an entry into the map for the full client // id. char separator = NamingContainer.SEPARATOR_CHAR; int length = clientId.length(); for (int i = 0; i < length; i++) { if (clientId.charAt(i) == separator) { // We found an ancestor NamingContainer client id - add // an entry to the map. String namingContainerClientId = clientId.substring(0, i); // Check to see whether we've already ids under this // NamingContainer client id. If not, create the // Collection for this NamingContainer client id and // stash it away in our map Collection<String> c = _subtreeClientIds.get(namingContainerClientId); if (c == null) { // TODO: smarter initial size? c = new ArrayList<String>(); _subtreeClientIds.put(namingContainerClientId, c); } // Stash away the client id c.add(clientId); } } } /** * Internal implementation of VisitContext used for optimised PPR rendering * ensuring a single source of truth by delegating back to the PartialPageContext * so that additions to the PartialPageContext's partial targets are reflected * in the set of visited components */ private class PartialPageVisitContext extends VisitContext |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/validator/DateRestrictionValidator.java | 46 |
org/apache/myfaces/trinidadinternal/validator/DateTimeRangeValidator.java | 45 |
} @Override public void validate( FacesContext context, UIComponent component, Object value) throws ValidatorException { if (value == null) return; if (!(value instanceof Date)) { GenericConverterFactory fac = GenericConverterFactory.getCurrentInstance(); value = fac.convert(value, Date.class); } super.validate(context, component, value); } public Collection<String> getClientImportNames() { return _IMPORT_NAMES; } public String getClientScript( FacesContext context, UIComponent component) { return null; } /** * @todo this should have not_in_range messages, not just max and min! * @todo Format these numbers properly. */ public String getClientValidation( FacesContext context, UIComponent component) { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java | 1027 |
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TreeRenderer.java | 762 |
writer.endElement(IMAGE_ELEMENT); } } // add a boolean flag to the chain of icons. // the chain is rendered before each icon private Boolean[] _appendIcon( Boolean[] prepend, Boolean isLine ) { int currLength = prepend.length; if (prepend[currLength - 1] != null) { // resize, incrementing should be fine Boolean[] newBools = new Boolean[currLength + _DEFAULT_TREE_INCREMENT]; System.arraycopy(prepend, 0, newBools, 0, currLength); prepend = newBools; } for (int i = 0; i < currLength; i++) { if (prepend[i] == null) { prepend[i] = isLine; break; } } return prepend; } private void _prependIcons( |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/CommandButtonRenderer.java | 212 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/GoButtonRenderer.java | 245 |
arc.setCurrentClientId(null); } /** * Override to return any state-based (selected, disabled, etc.) * CSS style markers. HINT: use an immutable, cached List<String> * for better performance. */ protected List<String> getStateStyleClasses( FacesContext context, RenderingContext arc, FacesBean bean) { if (getDisabled(bean)) return _DISABLED_STATE_LIST; return null; } // FIXME: move this implementation to XhtmlRenderer @Override protected void renderStyleAttributes( FacesContext context, RenderingContext arc, FacesBean bean, String defaultStyleClass) throws IOException { String styleClass = getStyleClass(bean); // -= Simon =- // FIXME: How come inlineStyle is never read //String inlineStyle = getInlineStyle(bean); List<String> stateStyleClasses = getStateStyleClasses(context, arc, bean); if ((styleClass==null) && (defaultStyleClass != null) && (stateStyleClasses == null)) { renderStyleClass(context, arc, defaultStyleClass); } else { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.java | 184 |
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java | 883 |
writeInlineStyles(rw, toString(itemData.get("inlineStyle")), appendedStyle); // user's style + what we must have on top of it rw.writeAttribute("title", itemData.get("shortDesc"), null); StringBuilder itemStyleClass = new StringBuilder(); String userStyleClass = toString(itemData.get("styleClass")); if (userStyleClass != null) { itemStyleClass.append(userStyleClass); itemStyleClass.append(" "); // more style classes are appended below } // Assign the event handlers: boolean isDisabled = getBooleanFromProperty(itemData.get("isDisabled")); boolean isActive = getBooleanFromProperty(itemData.get("isActive")); if (isActive) { if (isDisabled) { |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java | 326 |
org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java | 268 |
XMLEscapes.writeText(_out, text, off, len); } } @Override public void write(char cbuf[], int off, int len) throws IOException { _closeStartIfNecessary(); _out.write(cbuf, off, len); } @Override public void write(String str) throws IOException { _closeStartIfNecessary(); _out.write(str); } @Override public void write(int c) throws IOException { _closeStartIfNecessary(); _out.write((char) c); } @Override public ResponseWriter cloneWithWriter(Writer writer) { try { return new XhtmlResponseWriter(writer, getContentType(), |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/image/xml/parse/FontParser.java | 179 |
org/apache/myfaces/trinidadinternal/style/util/CSSUtils.java | 736 |
} // Strips whitespace from start/end of the string private static String _stripWhitespace(String str) { if (str == null) return null; int length = str.length(); int startIndex = 0; while (startIndex < length) { if (Character.isWhitespace(str.charAt(startIndex))) startIndex++; else break; } int endIndex = length; while (endIndex > 0) { if (Character.isWhitespace(str.charAt(endIndex - 1))) endIndex--; else break; } if ((startIndex == 0) && (endIndex == length)) return str; |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/NavigationBarRenderer.java | 2191 |
org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ProcessUtils.java | 140 |
int bufferSize = _LINK_ON_CHANGE_FORM_START.length() + form.length() + 34 + encodedGotoEvent.length() + encodedSource.length() + encodedValue.length() + encodedSize.length(); if (partialTargets != null) bufferSize += (partialTargets.length() + 2); StringBuffer buffer = new StringBuffer(bufferSize); buffer.append(_LINK_ON_CHANGE_FORM_START); buffer.append(form); buffer.append("', '"); buffer.append(encodedGotoEvent); buffer.append("', '"); buffer.append(encodedSource); if (doValidate) |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java | 950 |
org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/TreeRenderer.java | 664 |
{ tree.enterContainer(); int childCount = tree.getRowCount(); if (childCount > 0) { // prepare the prepended icons for the child nodes prepend = _appendIcon(prepend, (isLastSibling) ? Boolean.FALSE : Boolean.TRUE); Boolean[] currClone; ++nodeDepth; // increment the depth of the child from the root int oldIndex = tree.getRowIndex(); for (int i = 0; i < childCount; i++) { currClone = new Boolean[prepend.length]; System.arraycopy(prepend, 0, currClone, 0, prepend.length); tree.setRowIndex(i); _renderNode(context, |
File | Line |
---|---|
org/apache/myfaces/trinidadinternal/image/laf/browser/ButtonImageRenderer.java | 215 |
org/apache/myfaces/trinidadinternal/image/laf/browser/CompositeButtonImageRenderer.java | 249 |
} @Override protected PaintContext getPaintContext() { return _context; } private Integer _getMnemonicIndex() { Object o = super.getPaintData(ImageConstants.ACCESS_KEY_KEY); if (!(o instanceof Character)) return null; char c = ((Character)o).charValue(); String text = (String)super.getPaintData(ImageConstants.TEXT_KEY); if (text == null) return null; int index = BlafImageUtils.__getMnemonicIndex(text, c); if (index < 0) return null; return index; } private PaintContext _context; |