You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Marek Hawrylczak (JIRA)" <de...@myfaces.apache.org> on 2009/10/15 11:52:31 UTC
[jira] Created: (TOMAHAWK-1463) Data Scroller renders the paginator
twice.
Data Scroller renders the paginator twice.
-------------------------------------------
Key: TOMAHAWK-1463
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1463
Project: MyFaces Tomahawk
Issue Type: Bug
Components: Data Scroller
Affects Versions: 1.1.9
Environment: Spring 2.5, MyFaces orchestra. Backing beans reagistred as Spring beans (request and conversation scopes).
Reporter: Marek Hawrylczak
Attachments: HtmlDataScrollerRenderer.java
In my environment every subsequent request causes a paginator renders the page links twice.
The links are renderd twice, once by encodeChildren method then by renderPaginator method.
I had to create a simple patch to ignore page links in encodeChildren method.
{code}
public void encodeChildren(FacesContext facescontext, UIComponent uicomponent)
throws IOException
{
RendererUtils.checkParamValidity(facescontext, uicomponent, HtmlDataScroller.class);
if (uicomponent.getChildCount() > 0)
{
HtmlDataScroller scroller = (HtmlDataScroller) uicomponent;
String scrollerIdPagePrefix = scroller.getId() + HtmlDataScrollerRenderer.PAGE_NAVIGATION;
for (Iterator it = uicomponent.getChildren().iterator(); it.hasNext(); )
{
UIComponent child = (UIComponent)it.next();
String childId = child.getId();
if (childId != null && !childId.startsWith(scrollerIdPagePrefix)){
RendererUtils.renderChild(facescontext, child);
}
}
}
}
{code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TOMAHAWK-1463) Data Scroller renders the paginator
twice.
Posted by "Marek Hawrylczak (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marek Hawrylczak updated TOMAHAWK-1463:
---------------------------------------
Status: Patch Available (was: Open)
> Data Scroller renders the paginator twice.
> -------------------------------------------
>
> Key: TOMAHAWK-1463
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-1463
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Data Scroller
> Affects Versions: 1.1.9
> Environment: Spring 2.5, MyFaces orchestra. Backing beans reagistred as Spring beans (request and conversation scopes).
> Reporter: Marek Hawrylczak
> Attachments: HtmlDataScrollerRenderer.java
>
>
> In my environment every subsequent request causes a paginator renders the page links twice.
> The links are renderd twice, once by encodeChildren method then by renderPaginator method.
> I had to create a simple patch to ignore page links in encodeChildren method.
> {code}
> public void encodeChildren(FacesContext facescontext, UIComponent uicomponent)
> throws IOException
> {
> RendererUtils.checkParamValidity(facescontext, uicomponent, HtmlDataScroller.class);
> if (uicomponent.getChildCount() > 0)
> {
> HtmlDataScroller scroller = (HtmlDataScroller) uicomponent;
> String scrollerIdPagePrefix = scroller.getId() + HtmlDataScrollerRenderer.PAGE_NAVIGATION;
> for (Iterator it = uicomponent.getChildren().iterator(); it.hasNext(); )
> {
> UIComponent child = (UIComponent)it.next();
> String childId = child.getId();
> if (childId != null && !childId.startsWith(scrollerIdPagePrefix)){
> RendererUtils.renderChild(facescontext, child);
> }
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TOMAHAWK-1463) Data Scroller renders the paginator
twice.
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated TOMAHAWK-1463:
-------------------------------------
Status: Resolved (was: Patch Available)
Assignee: Leonardo Uribe
Fix Version/s: 1.1.10-SNAPSHOT
Resolution: Fixed
Thanks to Marek Hawrylczak for provide this patch. In theory that should not happen, because transient components should be removed from the tree before save state, but a check on encodeChildren does not harm.
> Data Scroller renders the paginator twice.
> -------------------------------------------
>
> Key: TOMAHAWK-1463
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-1463
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Data Scroller
> Affects Versions: 1.1.9
> Environment: Spring 2.5, MyFaces orchestra. Backing beans reagistred as Spring beans (request and conversation scopes).
> Reporter: Marek Hawrylczak
> Assignee: Leonardo Uribe
> Fix For: 1.1.10-SNAPSHOT
>
> Attachments: HtmlDataScrollerRenderer.java
>
>
> In my environment every subsequent request causes a paginator renders the page links twice.
> The links are renderd twice, once by encodeChildren method then by renderPaginator method.
> I had to create a simple patch to ignore page links in encodeChildren method.
> {code}
> public void encodeChildren(FacesContext facescontext, UIComponent uicomponent)
> throws IOException
> {
> RendererUtils.checkParamValidity(facescontext, uicomponent, HtmlDataScroller.class);
> if (uicomponent.getChildCount() > 0)
> {
> HtmlDataScroller scroller = (HtmlDataScroller) uicomponent;
> String scrollerIdPagePrefix = scroller.getId() + HtmlDataScrollerRenderer.PAGE_NAVIGATION;
> for (Iterator it = uicomponent.getChildren().iterator(); it.hasNext(); )
> {
> UIComponent child = (UIComponent)it.next();
> String childId = child.getId();
> if (childId != null && !childId.startsWith(scrollerIdPagePrefix)){
> RendererUtils.renderChild(facescontext, child);
> }
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.