You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mike Kienenberger (JIRA)" <my...@incubator.apache.org> on 2005/07/13 18:50:16 UTC

[jira] Created: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
------------------------------------------------------------------------------------------

         Key: MYFACES-331
         URL: http://issues.apache.org/jira/browse/MYFACES-331
     Project: MyFaces
        Type: Bug
    Versions: Nightly Build    
    Reporter: Mike Kienenberger


Mathias, I still have to use the BEFORE_SVN_REORG version as your new
dataTable code still isn't working with programmically-created
UIColumns elements -- they get lost after a page refresh, probably due
to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.


-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mathias Broekelmann (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12315826 ] 

Mathias Broekelmann commented on MYFACES-331:
---------------------------------------------

I´ve tried your example and saw that the refresh don´t work. I analysed your code of RowAndColumnRelationshipsHtmlDataTable.saveState and saw that you don´t save the state of the dynamically added components as I would expect. You have to save the state of the valuebindings (don´t set them to null before calling super.saveState()). That´s the reason why the UIColumns component has a null value ofter refreshing.

You use some custom valuebinding implementations which don´t implement saveState and restoreState Methods.

Maybe you can save a lot of trouble if you use the x:columns component in the jsf page b/c I don´t see any reasons for the dynamic way you did (at least for this example). 
Take a look into the myfaces-wiki for x:columns: http://wiki.apache.org/myfaces/Dynamic_Columns


> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mathias Broekelmann (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12316078 ] 

Mathias Broekelmann commented on MYFACES-331:
---------------------------------------------

I´ve fixed the new uidata and uicolumns implementation. But that doen´t solve your problem.

IMO the main reason is that new new uidata and uicolumns implementation uses the saveState and restoreState mothods to hold the state for each row (cell for uicolumns) while the iteration is done in the jsf-phases.

Your custom value- and methodbindings don´t save their state which is the reason why your component is not working.

Try to rewrite your component or create a plugable subview and use the aliasbean (which is the better solution IMO) to solve this issue.

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mathias Broekelmann (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12315843 ] 

Mathias Broekelmann commented on MYFACES-331:
---------------------------------------------

I´ve found a problem with UIColumns (nested UIDatas). I will fix this first to see if that´s the cause for your problems.

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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] Closed: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mathias Broekelmann (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-331?page=all ]
     
Mathias Broekelmann closed MYFACES-331:
---------------------------------------

    Fix Version: Nightly Build
     Resolution: Fixed

I´ve changed the behavior for setRowIndex(int) back to save and restore only the state of the EditableValueHolder instances. Using saveState/restoreState is not longer needed and it is narroed by the spec to handle EditableValueHolder only.

I´ve tested your sample application and it works again.

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>      Fix For: Nightly Build
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mike Kienenberger (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12316166 ] 

Mike Kienenberger commented on MYFACES-331:
-------------------------------------------

If this gets marked "WON'T FIX", at minimum, the UIColumns documentation should note the requirement that all children and bindings must be able to save and restore state during the rendering phase and explain how children are cloned for each cell.

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mike Kienenberger (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12316148 ] 

Mike Kienenberger commented on MYFACES-331:
-------------------------------------------

Your change isn't backward-compatible, but I do understand what you're trying to accomplish, and unfortunately, I don't yet have a better alternative to suggest.

I guess I'll have to subclass UISelectBoolean and change how it performs saveState/restoreState since it's not possible for my indirect value and method bindings to save state (which was how they provided the flexibility I needed).

To me, it feels incorrect to be saving/restoring state in setRowIndex() rather than saveState/restoreState.  There's no user-hook to customize the save/restore behavior.

I may also go the aliasbean route, but I really didn't want to have to start all over with another component and figure out all of the idiosyncrasies with it too.

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mike Kienenberger (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12316138 ] 

Mike Kienenberger commented on MYFACES-331:
-------------------------------------------

Ok.  The initialization issue is caused by my custom value- and method-bindings not saving their state.
So the ball is back in my court.

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mathias Broekelmann (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12316210 ] 

Mathias Broekelmann commented on MYFACES-331:
---------------------------------------------

Apparently we violate the spec if we use saveState/restoreState in UIData.setRowIndex to handle the component state. Even though IMO it´s better to do it with saveState/restoreState which is able to handle not only EditableValueHolder instances. 

We may change the current implementation for setRowIndex back to only save and restore the EditableValueHolder instances and reset the clientId through the shaky setId(getId()).

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mike Kienenberger (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12316133 ] 

Mike Kienenberger commented on MYFACES-331:
-------------------------------------------

I understand what you've done now and why it breaks my code.

However, I can't really comment on it further because the latest changes have also broken the initialization of my component, so I never get to the save/restore issue.

If you run my example code, you'll see that the UIColumns column headers are all there, but none of the checkboxes in the UIColumns component.

When my data model tag is initialized, I assign a value binding to my UIColumn's UISelectBoolean.
However, before it can be rendered, UIColumn's setRowIndex method "restores" null back to my value binding.  This is happening when HtmlTableRenderer's renderColumnChildHeaderOrFooterRow is called.   As far as I know, this is also before any state was ever saved for UIColumns' children.

This means you can no longer programmically assign value bindings to a child of UIColumns, if I understand what's happening correctly, because they'll be erased during rendering.

============STACK TRACE OF INITIALIZATION===========================
Thread [SocketListener0-1] (Suspended (breakpoint at line 248 in jsf.component.RowAndColumnRelationshipsHtmlDataTable))
	jsf.component.RowAndColumnRelationshipsHtmlDataTable.initializeDataModels() line: 248
	jsf.component.RowAndColumnRelationshipsHtmlDataTable.setRowAndColumnRelationshipDataValueBindingString(java.lang.String) line: 205
	jsf.component.taglib.RowAndColumnRelationshipsHtmlDataTableTag.setProperties(javax.faces.component.UIComponent) line: 43
	jsf.component.taglib.RowAndColumnRelationshipsHtmlDataTableTag(javax.faces.webapp.UIComponentTag).findComponent(javax.faces.context.FacesContext) line: 392
	jsf.component.taglib.RowAndColumnRelationshipsHtmlDataTableTag(javax.faces.webapp.UIComponentTag).doStartTag() line: 219
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx._jspx_meth_example_rowAndColumnRelationshipsHtmlDataTable_0(javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.PageContext) line: 32
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx._jspx_meth_h_form_0(javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.PageContext) line: not available
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx._jspx_meth_f_view_0(javax.servlet.jsp.PageContext) line: 16
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: not available
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx(org.apache.jasper.runtime.HttpJspBase).service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 94
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx(javax.servlet.http.HttpServlet).service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 689
	org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) line: 324
	org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) line: 292
	org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 236
	org.apache.jasper.servlet.JspServlet(javax.servlet.http.HttpServlet).service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 689
	org.mortbay.jetty.servlet.ServletHolder.handle(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 427
	org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.mortbay.jetty.servlet.ServletHolder, int) line: 475
	org.mortbay.jetty.servlet.Dispatcher.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, int) line: 275
	org.mortbay.jetty.servlet.Dispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 169
	org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(java.lang.String) line: 415
	org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot) line: 226
	org.apache.myfaces.lifecycle.LifecycleImpl.render(javax.faces.context.FacesContext) line: 299
	javax.faces.webapp.FacesServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 95
=======================================


=================STACK TRACE OF RESTORE-TO-NULL BEHAVIOR======================
Thread [SocketListener0-1] (Suspended (breakpoint at line 753 in javax.faces.component.UIComponentBase))
	javax.faces.component.UISelectBoolean(javax.faces.component.UIComponentBase).restoreValueBindingMap(javax.faces.context.FacesContext, java.lang.Object) line: 753
	javax.faces.component.UISelectBoolean(javax.faces.component.UIComponentBase).restoreState(javax.faces.context.FacesContext, java.lang.Object) line: 695
	javax.faces.component.UISelectBoolean(javax.faces.component.UIOutput).restoreState(javax.faces.context.FacesContext, java.lang.Object) line: 91
	javax.faces.component.UISelectBoolean(javax.faces.component.UIInput).restoreState(javax.faces.context.FacesContext, java.lang.Object) line: 384
	javax.faces.component.UISelectBoolean(javax.faces.component.UIComponentBase).processRestoreState(javax.faces.context.FacesContext, java.lang.Object) line: 508
	org.apache.myfaces.custom.crosstable.UIColumns(javax.faces.component.UIComponentBase).processRestoreState(javax.faces.context.FacesContext, java.lang.Object) line: 499
	org.apache.myfaces.custom.crosstable.UIColumns.setRowIndex(int) line: 171
	org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.renderColumnChildHeaderOrFooterRow(javax.faces.context.FacesContext, javax.faces.context.ResponseWriter, javax.faces.component.UIComponent, java.lang.String, boolean) line: 82
	org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer(org.apache.myfaces.renderkit.html.HtmlTableRendererBase).renderColumnHeaderOrFooterRow(javax.faces.context.FacesContext, javax.faces.context.ResponseWriter, javax.faces.component.UIComponent, java.lang.String, boolean) line: 449
	org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer(org.apache.myfaces.renderkit.html.HtmlTableRendererBase).renderColumnHeaderRow(javax.faces.context.FacesContext, javax.faces.context.ResponseWriter, javax.faces.component.UIComponent, java.lang.String) line: 397
	org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer(org.apache.myfaces.renderkit.html.HtmlTableRendererBase).renderFacet(javax.faces.context.FacesContext, javax.faces.context.ResponseWriter, javax.faces.component.UIComponent, boolean) line: 311
	org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer(org.apache.myfaces.renderkit.html.HtmlTableRendererBase).encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent) line: 75
	jsf.component.RowAndColumnRelationshipsHtmlDataTable(javax.faces.component.UIComponentBase).encodeBegin(javax.faces.context.FacesContext) line: 303
	jsf.component.RowAndColumnRelationshipsHtmlDataTable(javax.faces.component.UIData).encodeBegin(javax.faces.context.FacesContext) line: 372
	jsf.component.RowAndColumnRelationshipsHtmlDataTable(org.apache.myfaces.component.html.ext.HtmlDataTableHack).encodeBegin(javax.faces.context.FacesContext) line: 122
	jsf.component.RowAndColumnRelationshipsHtmlDataTable(org.apache.myfaces.component.html.ext.HtmlDataTable).encodeBegin(javax.faces.context.FacesContext) line: 259
	jsf.component.taglib.RowAndColumnRelationshipsHtmlDataTableTag(javax.faces.webapp.UIComponentTag).encodeBegin() line: 337
	jsf.component.taglib.RowAndColumnRelationshipsHtmlDataTableTag(javax.faces.webapp.UIComponentTag).doEndTag() line: 250
	jsf.component.taglib.RowAndColumnRelationshipsHtmlDataTableTag(org.apache.myfaces.taglib.UIComponentBodyTagBase).doEndTag() line: 55
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx._jspx_meth_example_rowAndColumnRelationshipsHtmlDataTable_0(javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.PageContext) line: not available
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx._jspx_meth_h_form_0(javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.PageContext) line: not available
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx._jspx_meth_f_view_0(javax.servlet.jsp.PageContext) line: 16
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: not available
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx(org.apache.jasper.runtime.HttpJspBase).service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 94
	org.apache.jsp.ExampleRowAndColumnRelationshipPage_jspx(javax.servlet.http.HttpServlet).service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 689
	org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) line: 324
	org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) line: 292
	org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) line: 236
	org.apache.jasper.servlet.JspServlet(javax.servlet.http.HttpServlet).service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 689
	org.mortbay.jetty.servlet.ServletHolder.handle(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 427
	org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.mortbay.jetty.servlet.ServletHolder, int) line: 475
	org.mortbay.jetty.servlet.Dispatcher.dispatch(javax.servlet.ServletRequest, javax.servlet.ServletResponse, int) line: 275
	org.mortbay.jetty.servlet.Dispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 169
	org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(java.lang.String) line: 415
	org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot) line: 226
	org.apache.myfaces.lifecycle.LifecycleImpl.render(javax.faces.context.FacesContext) line: 299
	javax.faces.webapp.FacesServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 95

=======================================

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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] Updated: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mike Kienenberger (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-331?page=all ]

Mike Kienenberger updated MYFACES-331:
--------------------------------------

    Attachment: RowAndColumnRelationshipComponent.zip

Small example that demonstrates the problem.

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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: (MYFACES-331) post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.

Posted by "Mike Kienenberger (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-331?page=comments#action_12315846 ] 

Mike Kienenberger commented on MYFACES-331:
-------------------------------------------

> I analysed your code of RowAndColumnRelationshipsHtmlDataTable.saveState and saw that you don´t save the state of the dynamically added components as I would expect.

My first iteration did save the state of the components, but since the HtmlDataTable was also saving them, I would get another duplicate set of the controls every time the page restored.   I suppose I could go and remove all of the controls before save/restore, but the current implementation behavior is inconsistent.   Some of the components are saved by dataTable (the first UIColumn and the facet footer), but some aren't (the UIColumns element).

> Maybe you can save a lot of trouble if you use the x:columns component in the jsf page b/c I don´t see any reasons for the dynamic way you did

I appreciate your suggestion, but this composite componet is used all over the place.   I don't want to have to repeat the jsp code everywhere -- I just want to be able to use <mycomponent model="x">

But even if I did it some other way (jsp include or typed them out fully each time), there'd still be a bug ;)

> You have to save the state of the valuebindings (don´t set them to null before calling super.saveState()). That´s the reason why the UIColumns component has a null value ofter refreshing.

Are you saying that under the new code, a UIColumns object which has no value binding will not be restored?  That sounds very inconsistent and arbitrary.   The UIOutput and UICommand objects are restored even after the value binding and action listener are set to null before saving.

> You use some custom valuebinding implementations which don´t implement saveState and restoreState Methods. 

Right, I recreate and reassign these bindings rather than save and restore them.   The only "state" necessary to restore my custom composite component is the name of the model backing bean, provided that dataTable is also saving its state properly.

Thanks for looking into this.

> post-Mathias-Broekelmann x:dataTable doesn't work with dynamically-created UIColumns data.
> ------------------------------------------------------------------------------------------
>
>          Key: MYFACES-331
>          URL: http://issues.apache.org/jira/browse/MYFACES-331
>      Project: MyFaces
>         Type: Bug
>     Versions: Nightly Build
>     Reporter: Mike Kienenberger
>     Assignee: Mathias Broekelmann
>  Attachments: RowAndColumnRelationshipComponent.zip
>
> Mathias, I still have to use the BEFORE_SVN_REORG version as your new
> dataTable code still isn't working with programmically-created
> UIColumns elements -- they get lost after a page refresh, probably due
> to a save/restore state issue.   My programmically-created footer-with-UICommand and UI-Column-with-UIOutput row header are saved and restored properly, though.

-- 
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