You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ryan Wynn (JIRA)" <de...@myfaces.apache.org> on 2006/08/13 01:12:14 UTC

[jira] Created: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Duplicate id exception for HtmlDataScrollerRenderer
---------------------------------------------------

                 Key: TOMAHAWK-596
                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-596
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Data Scroller
    Affects Versions: 1.1.3
         Environment: Linux, Windows
            Reporter: Ryan Wynn
         Attachments: HtmlDataScrollerRenderer.patch

In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Marko Asplund (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559864#action_12559864 ] 

Marko Asplund commented on TOMAHAWK-596:
----------------------------------------

I'm also seeing this problem with a portlet I'm developing with JSF using the Tomahawk t:dataTable action in combination with t:dataScroller for implementing a pageable search results page.
The page includes a form for typing in search criteria and dataTable is used for representing the results.
Part of the time this is working as expected but occasionally I receive error messages about duplicate components in the component tree (see below).
I'm using Tomahawk 1.1.3 and the application runs on WebSphere Portal Server 6.0.
I've also tested this with Tomahawk 1.1.6 and the issue can be reproduced with that version as well.

Caused by: java.lang.IllegalStateException: Client-id : scrollerprevious is duplicated in the faces tree. Component : listForm:scrollerprevious, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /WEB-INF/jsp/acars/listReports.jsp][Class: org.apache.myfaces.custom.div.Div,Id: _idJsp0PC_7_BAQQI5230OL3C02
T1C1LCM30D2_][Class: javax.faces.component.html.HtmlForm,Id: listForm][Class: org.apache.myfaces.custom.div.Div,Id: _idJsp38PC_7_BAQQI5230OL3C02T1C1LCM30D2_][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp80PC_7_BAQQI5230OL3C02T1C1LCM30D2_][Class: org.apache.myfaces.custom.datascroller.HtmlDataScroller,Id: scroller][Class: javax.faces.component.html.HtmlCommandLink,Id: scrollerprevious]}
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled Code))
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled Code))
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled Code))
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled Code))
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled Code))
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled Code))
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled Code))
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:305)
       at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:122)
       at com.ibm._jsp._listReports._jspx_meth_f_view_0(_listReports.java:1671)
       at com.ibm._jsp._listReports._jspService(_listReports.java:89)
       at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java(Compiled Code))
       at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
       at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java(Compiled Code))
       at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
       at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java(Inlined Compiled Code))
       at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java(Compiled Code))
       at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java(Compiled Code))
       at org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:112)
       ... 170 more


> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Milan Majercik (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678043#action_12678043 ] 

milan_majercik edited comment on TOMAHAWK-596 at 3/2/09 9:37 AM:
-----------------------------------------------------------------

Attached is a fix that sorted out this issue in portlet environment. The fix prevents repeated addition if HTML link component to the data scroller that was a cause of having duplicate element inside the data scroller component. 


      was (Author: milan_majercik):
    This sorted out the issue in portlet environment
  
> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: datascroller-issue.txt, HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch, HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Marko Asplund (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559860#action_12559860 ] 

Marko Asplund commented on TOMAHAWK-596:
----------------------------------------

Is any work being done to fix this problem?

What's the recommended workaround?

> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated TOMAHAWK-596:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.9-SNAPSHOT
         Assignee: Leonardo Uribe
           Status: Resolved  (was: Patch Available)

The patch proposed by Milan Majercik has sense and does not cause the side effects of other patches like the one proposed on TOMAHAWK-1249.

I review it and did the necessary fixes, like remove links generated by paginator section and correct the section related to generated facet links (needed to solve TOMAHAWK-1249). Thanks to Milan Majercik for this patch.

> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.9-SNAPSHOT
>
>         Attachments: datascroller-issue.txt, HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch, HtmlDataScrollerRenderer.patch, TOMAHAWK-596.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-596?page=all ]

Mike Kienenberger updated TOMAHAWK-596:
---------------------------------------

    Status: Patch Available  (was: Open)

> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-596?page=comments#action_12428689 ] 
            
Mike Kienenberger commented on TOMAHAWK-596:
--------------------------------------------

This only renders the children of a facet.
It doesn't render the non-facet children of datascroller.

I haven't tested it (since I haven't installed your patch), but I'd guess it'd break this kind of DataScroller usage:

				<t:dataScroller id="scroll_information"
						for="searchResultsDataTable"
						rowsCountVar="rowsCount"
						displayedRowsCountVar="displayedRowsCountVar"
						firstRowIndexVar="firstRowIndex"
						lastRowIndexVar="lastRowIndex"
						pageCountVar="pageCount"
						pageIndexVar="pageIndex"
						>
					<h:panelGrid
						columns="1">
						<h:outputFormat value="{0} records found, displaying {1} records, from {2} to {3}. Page {4} / {5}" styleClass="standard" >
							<f:param value="#{rowsCount}" />
							<f:param value="#{displayedRowsCountVar}" />
							<f:param value="#{firstRowIndex}" />
							<f:param value="#{lastRowIndex}" />
							<f:param value="#{pageIndex}" />
							<f:param value="#{pageCount}" />
						</h:outputFormat>
					</h:panelGrid>
				</t:dataScroller>

Also, I don't have access to a portlet environment to test this.  Sorry about that, but I can only master so many technologies at once :-)

> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Ryan Wynn (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-596?page=comments#action_12428562 ] 
            
Ryan Wynn commented on TOMAHAWK-596:
------------------------------------

Sorry for my sloppiness, Mike.  I tested this patch on a different machine which was setup with Portal Server on it.  Then I created the patch by hand on a different machine and missed the typecast.  I realize this is not a good practice at all.

The children are being rendered in encodeEnd through the call to renderFacet...

   protected void renderFacet(FacesContext facesContext, HtmlDataScroller scroller,
                               UIComponent facetComp, String facetName) throws IOException
    {
        UIComponent link = getLink(facesContext, scroller, facetName);
        link.encodeBegin(facesContext);
        facetComp.encodeBegin(facesContext);
        if (facetComp.getRendersChildren())
            facetComp.encodeChildren(facesContext);
        facetComp.encodeEnd(facesContext);
        link.encodeEnd(facesContext);
    }

I will only submit from my development machine from now on.  By the way to replicate this problem use the datascroller inside a portlet.  Then click on a link inside another portlet on the same page or any link on the same page which is not part of the datascroller portlet.  



> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Milan Majercik (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678043#action_12678043 ] 

milan_majercik edited comment on TOMAHAWK-596 at 3/2/09 9:39 AM:
-----------------------------------------------------------------

Attached is a fix that sorted out this issue in portlet environment. The fix prevents repeated addition of HTML link component to the data scroller that was a cause of having duplicate element inside the data scroller component. 

The DIFF file was generated against version 1.1.8

      was (Author: milan_majercik):
    Attached is a fix that sorted out this issue in portlet environment. The fix prevents repeated addition if HTML link component to the data scroller that was a cause of having duplicate element inside the data scroller component. 

The DIFF file was generated against version 1.1.8
  
> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: datascroller-issue.txt, HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch, HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Michael Heinen (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-596?page=comments#action_12451965 ] 
            
Michael Heinen commented on TOMAHAWK-596:
-----------------------------------------

This patch works also only in a subset of the usecases.
Pls see http://issues.apache.org/jira/browse/TOMAHAWK-768

If the underlying datamodel is updated via ajax and the number of the displayed pager links is increased (e,.g a display filter removed), then these links are not precessed correctly. I think you need static ids build from 1 til paginatorMaxPages and even dummyLinks if your model contains less pages or if the scroller is even not rendered because the model contains only a single page.

What about the children ?
Is the summary still encoded or is it skipped due to the empty encodeChildren method?
I did not find a solution for this except splitting the datascroller into two tags with separate renderes.

Michael


> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-596?page=comments#action_12428284 ] 
            
Mike Kienenberger commented on TOMAHAWK-596:
--------------------------------------------

I don't see where it's rendering its children in encodeEnd.   I'm not an expert on renderers, though.

Also, if you could provide a full path in your patches in the future, it'd make applying them easier.
It's not always obvious where xyz.java is located.

It would also be useful if your patch compiled.   Since it doesn't, I'm a bit concerned about applying it :-)
It's missing typecasts from UIComponent to UICommandLink, and this makes me think I'm applying untested code.

-Mike


> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Milan Majercik (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678043#action_12678043 ] 

milan_majercik edited comment on TOMAHAWK-596 at 3/2/09 9:39 AM:
-----------------------------------------------------------------

Attached is a fix that sorted out this issue in portlet environment. The fix prevents repeated addition if HTML link component to the data scroller that was a cause of having duplicate element inside the data scroller component. 

The DIFF file was generated against version 1.1.8

      was (Author: milan_majercik):
    Attached is a fix that sorted out this issue in portlet environment. The fix prevents repeated addition if HTML link component to the data scroller that was a cause of having duplicate element inside the data scroller component. 

  
> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: datascroller-issue.txt, HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch, HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Milan Majercik (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678043#action_12678043 ] 

milan_majercik edited comment on TOMAHAWK-596 at 3/2/09 9:56 AM:
-----------------------------------------------------------------

Attached is a fix that sorted out this issue in portlet environment. The fix prevents repeated addition of HTML link component to the data scroller that was a cause of having duplicate element inside the data scroller component. 

The DIFF file was generated against version 1.1.8

The difference with the original patch issued by Ryan Wynn is that it doesn't comment out the the encodeChildren method although i think there is an ample reason for it as the data scroller is not supposed to have any children and UICommand components that wrap everything inside facets are not component children

      was (Author: milan_majercik):
    Attached is a fix that sorted out this issue in portlet environment. The fix prevents repeated addition of HTML link component to the data scroller that was a cause of having duplicate element inside the data scroller component. 

The DIFF file was generated against version 1.1.8
  
> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: datascroller-issue.txt, HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch, HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-596?page=comments#action_12428705 ] 
            
Mike Kienenberger commented on TOMAHAWK-596:
--------------------------------------------

If you use your patch in a non-portlet environment, what happens?

Between the two of us, you're the portlet expert, so if you say it works better in portlets with it commented out, I believe you :-)   But we also have to support all of the non-portlet users too :-)



> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Ryan Wynn (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-596?page=comments#action_12428702 ] 
            
Ryan Wynn commented on TOMAHAWK-596:
------------------------------------

I hear what you are saying about the facet and non-fact children.  But that is not the behavior I am experiencing.  What happens if I do not comment out the lines in the encodeChildren method is that I get 2 rows of paging links instead of 1.  Like this...

12345678910
1 2 3 4 5 6 7 8 9 10

underneath my table.  And for some reason the first row is rendered as one anchor with 123456 (all the pages)... inside it.  While the second row behaves properly with each page having it own anchor.

It's really weird but the patch seems to fix it.  It only happens when you force a nonFacesRequest in a portlet environment by clicking anywhere outside of your portlet.



> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>         Attachments: HtmlDataScrollerRenderer.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-596) Duplicate id exception for HtmlDataScrollerRenderer

Posted by "Razan Abbass (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834290#action_12834290 ] 

Razan Abbass commented on TOMAHAWK-596:
---------------------------------------

[buy cheap tramadol o|http://ptl.sys.virginia.edu/@api/deki/files/257]
[buy tramadol at a cheap price online|http://ptl.sys.virginia.edu/@api/deki/files/258]
[buy cheap tramadol online inurl|http://ptl.sys.virginia.edu/@api/deki/files/259]
[buy cheap tramadol online inurl|http://ptl.sys.virginia.edu/@api/deki/files/260]
[cheapest tramadol without prescription|http://ptl.sys.virginia.edu/@api/deki/files/261]
[buy tramadol cod|http://ptl.sys.virginia.edu/@api/deki/files/262]
[tramadol price|http://ptl.sys.virginia.edu/@api/deki/files/263]
[tramadol prescription from discount pharmacy|http://ptl.sys.virginia.edu/@api/deki/files/264]
[generic tramadol er dosage|http://ptl.sys.virginia.edu/@api/deki/files/265]
[tramadol next day|http://ptl.sys.virginia.edu/@api/deki/files/266]
[tramadol price|http://ptl.sys.virginia.edu/@api/deki/files/267]
[side effects of tramadol|http://ptl.sys.virginia.edu/@api/deki/files/268]
[tramadol hcl 50 mg tab mylan|http://ptl.sys.virginia.edu/@api/deki/files/269]
[tramadol 50mg|http://ptl.sys.virginia.edu/@api/deki/files/270]
[tramadol 50mg 180 pills|http://ptl.sys.virginia.edu/@api/deki/files/271]
[tramadol addiction properties|http://ptl.sys.virginia.edu/@api/deki/files/272]
[tramadol com|http://ptl.sys.virginia.edu/@api/deki/files/273]
[canine tramadol dosage|http://ptl.sys.virginia.edu/@api/deki/files/274]
[what is canine tramadol dose|http://ptl.sys.virginia.edu/@api/deki/files/275]
[drug reactions vicodin and tramadol|http://ptl.sys.virginia.edu/@api/deki/files/276]
[side effects of tramadol hydrochloride|http://ptl.sys.virginia.edu/@api/deki/files/277]
[tramadol sales|http://ptl.sys.virginia.edu/@api/deki/files/278]
[tramadol hcl 50 mg|http://ptl.sys.virginia.edu/@api/deki/files/279]
[tramadol hydrochloride|http://ptl.sys.virginia.edu/@api/deki/files/280]
[tramadol sale us no prescription required|http://ptl.sys.virginia.edu/@api/deki/files/281]
[tramadol hydrochloride 100mg|http://ptl.sys.virginia.edu/@api/deki/files/282]
[what is tramadol|http://ptl.sys.virginia.edu/@api/deki/files/283]
[tramadol 100 mg|http://ptl.sys.virginia.edu/@api/deki/files/284]
[buy tramadol with no prescription|http://ptl.sys.virginia.edu/@api/deki/files/285]
[buy cheap tramadol o|http://ptl.sys.virginia.edu/@api/deki/files/286]
[tramadol online|http://ptl.sys.virginia.edu/@api/deki/files/287]
[cod accepted tramadol order|http://ptl.sys.virginia.edu/@api/deki/files/288]
[buy tramadol cheap medication inurl|http://ptl.sys.virginia.edu/@api/deki/files/289]
[buy tramadol online overnight delivery|http://ptl.sys.virginia.edu/@api/deki/files/290]
[can i take tramadol pain pills if theyre a year old|http://ptl.sys.virginia.edu/@api/deki/files/291]
[canadian pharmacy that sells tramadol without a prescription|http://ptl.sys.virginia.edu/@api/deki/files/292]
[can i take tramadol pain pills if theyre a year old|http://ptl.sys.virginia.edu/@api/deki/files/293]
[best price tramadol|http://ptl.sys.virginia.edu/@api/deki/files/294]
[tramadol no prescription|http://ptl.sys.virginia.edu/@api/deki/files/295]
[tramadol hydrochloride|http://ptl.sys.virginia.edu/@api/deki/files/296]
[tramadol price|http://ptl.sys.virginia.edu/@api/deki/files/297]
[tramadol without a rx and prednisone|http://ptl.sys.virginia.edu/@api/deki/files/298]
[tramadol sales|http://ptl.sys.virginia.edu/@api/deki/files/299]
[tramadol tablets|http://ptl.sys.virginia.edu/@api/deki/files/300]
[tramadol hydrochloride use in dogs|http://ptl.sys.virginia.edu/@api/deki/files/301]
[tramadol withdrawals|http://ptl.sys.virginia.edu/@api/deki/files/302]
[tramadol hydrochloride|http://ptl.sys.virginia.edu/@api/deki/files/303]
[what is tramadol|http://ptl.sys.virginia.edu/@api/deki/files/304]
[ultram|http://ptl.sys.virginia.edu/@api/deki/files/305]


> Duplicate id exception for HtmlDataScrollerRenderer
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-596
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-596
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.3
>         Environment: Linux, Windows
>            Reporter: Ryan Wynn
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.9
>
>         Attachments: datascroller-issue.txt, HtmlDataScrollerRenderer.java, HtmlDataScrollerRenderer.java.example, HtmlDataScrollerRenderer.patch, HtmlDataScrollerRenderer.patch, TOMAHAWK-596.patch
>
>
> In a portlet environment a non-faces request produces an exception when the faces tree is rendered if the faces tree contains a DataScroller component.  The HtmlDataScroller renderer actually renders its children twice in this case, once in the encodeChildren method and once in the encodeEnd method.  Since rendering of the children is taken care of in encodeEnd I made the encodeChildren method a no-op.  Also, although the  CommandLinks which are rendered as children are marked as transient, they see to stick around.  I put a check in the getLink methods to make sure that the links are not added twice.  This seems to fix the duplicate id exception, but it might be necessary to further investigate why they are sticking around in the first place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.