[
https://issues.apache.org/jira/browse/TRINIDAD-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adam Winer resolved TRINIDAD-675.
---------------------------------
Resolution: Duplicate
Duplicate of TRINIDAD-674.
> Component selectRangeChoiceBar not properly rendered
> ----------------------------------------------------
>
> Key: TRINIDAD-675
> URL: https://issues.apache.org/jira/browse/TRINIDAD-675
> Project: MyFaces Trinidad
> Issue Type: Bug
> Affects Versions: 1.0.1-core, 1.0.2-core
> Reporter: Tomas Havelka
>
> When component selectRangeChoiceBar is rendered for the last page and model
> row count is not known (-1), the link for the navigation to next page should
> be rendered as disabled (now it's rendered as enabled even if no onclick
> event is attached).
> Solution:
> Modify _renderLink method of SelectRangeChoiceBarRenderer similarly to
> _renderArrow method. For example like this.
> String text = getBlockString(arc, isNext, records);
> boolean isEnabled = ((records > 0) && (onclick != null)); // here is the
> place to check whether link is to be rendered as disabled
> ResponseWriter writer = context.getResponseWriter();
> if (isEnabled)
> {
> writer.startElement("a", null);
> writer.writeURIAttribute("href", "#", null);
> writer.writeAttribute("onclick", onclick, null);
> // The navBar needs its initial focus to be on the Next button,
> // according to the BLAF. Render a special id on the Next button
> // if this navBar is to have the initial focus. (unless it needs
> // initial focus, the Next button does not have an id on it)
> if (isNext)
> {
> String linkID = _getIDForFocus(arc, id);
> writer.writeAttribute("id", linkID, null);
> }
> renderStyleClass(context, arc, SkinSelectors.NAV_BAR_ALINK_STYLE_CLASS);
> }
> else
> {
> writer.startElement("span", null);
> renderStyleClass(context, arc, SkinSelectors.NAV_BAR_ILINK_STYLE_CLASS);
> }
> writer.writeText(text, null);
> if (isEnabled)
> {
> writer.endElement("a");
> }
> else
> {
> writer.endElement("span");
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.