You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/06/05 07:28:29 UTC
[jira] Created: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
------------------------------------------------------------------------------------------
Key: MYFACES-2744
URL: https://issues.apache.org/jira/browse/MYFACES-2744
Project: MyFaces Core
Issue Type: Bug
Components: JSR-314
Affects Versions: 2.0.0
Reporter: Leonardo Uribe
Assignee: Leonardo Uribe
from: [jsr-314-open] Ajax inside a DataTable
Cagatay Civici
I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
<h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
<h:column>
<f:facet name="header">
Model
</f:facet>
<h:outputText value="#{car.model}" />
</h:column>
<h:column>
<f:facet name="header">
Action
</f:facet>
<h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
<f:ajax render="cars" />
</h:commandButton>
</h:column>
</h:dataTable>
As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
Martin Marinschek
We should never include the row-index in the client-id of the table
itself. For this, we need to revise the client-id generation
algorithm.
Without actually having tried it, I think that it is easy to do so, as
we have a UIComponentBase.getContainerClientId() to create the
client-id of the children - when this method is called, we append the
row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886436#action_12886436 ]
Leonardo Uribe commented on MYFACES-2744:
-----------------------------------------
I think we have all places. In theory, the changes are not stopper for tomahawk to work with Mojarra even without the change. The reason is getContainerClientId just call getClientId.
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885936#action_12885936 ]
Jakob Korherr commented on MYFACES-2744:
----------------------------------------
I checked UIData, UIRepeat, HtmlDataTableHack, AbstractHtmlDataTable and UITreeData and applied the necessary changes on them.
Leo can you think of any other places where this needs to be changed?
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Korherr reopened MYFACES-2744:
------------------------------------
Reopening this one, because getClientId() has to be changed to getContainerClientId() in some places (like MYFACES-2788)
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved MYFACES-2744.
-------------------------------------
Fix Version/s: 2.0.1-SNAPSHOT
Resolution: Fixed
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Korherr resolved MYFACES-2744.
------------------------------------
Resolution: Fixed
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888501#action_12888501 ]
Leonardo Uribe commented on MYFACES-2744:
-----------------------------------------
I reverted on UIData, but I think we can let the code on UIRepeat, because it is not part of the spec. It is preferred on all other parts to call getContainerClientId() instead getClientId()
Tomahawk components requires some fixes, because now we have to consider this condition when we call super.getClientId().
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved MYFACES-2744.
-------------------------------------
Resolution: Fixed
Ok, I restored the code reverted, so we can close this issue.
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885803#action_12885803 ]
Leonardo Uribe commented on MYFACES-2744:
-----------------------------------------
Yes, you are right. There are some places in which we are assuming getClientId() return the clientId with the appended rowIndex. It is probably we need to review visit tree stuff too.
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12886488#action_12886488 ]
Jakob Korherr commented on MYFACES-2744:
----------------------------------------
Great! Yes of course, you're right. I did not think of that.
Now we can close the issue :)
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888559#action_12888559 ]
Martin Marinschek commented on MYFACES-2744:
--------------------------------------------
I don´t want this to be reverted. This is an issue - and even if we slightly deviate from the spec language (which is wrong in this case), the fix is entirely correct and it will not cause compatibility issues with Mojarra.
best regards,
Martin
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885600#action_12885600 ]
Jakob Korherr commented on MYFACES-2744:
----------------------------------------
Methods which need a change (I found so far):
UIRepeat.invokeOnComponent()
UIData.invokeOnComponent()
UIData.getDataModel()
I will investigate this one further later this evening!
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885910#action_12885910 ]
Jakob Korherr commented on MYFACES-2744:
----------------------------------------
The visitTree() stuff is no problem, because we set the row index to -1 when visiting the UIData, thus the client id never contained a row index at that time.
Do the Mojarra guys also change this behavior? Because I will have to change some things on tomahawk too and if they don't, tomahawk won't work with Mojarra...
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (MYFACES-2744) UIData.getClientId() should not
append rowIndex, instead use UIData.getContainerClientId()
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe reopened MYFACES-2744:
-------------------------------------
We need to reopen before release, because the position on jsr-314-open for now is include it in 2.1. Since getContainerClientId() just call to getClientId(), changes committed on invokeOnComponent and visitTree should be let in place.
> UIData.getClientId() should not append rowIndex, instead use UIData.getContainerClientId()
> ------------------------------------------------------------------------------------------
>
> Key: MYFACES-2744
> URL: https://issues.apache.org/jira/browse/MYFACES-2744
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Jakob Korherr
> Fix For: 2.0.1-SNAPSHOT
>
>
> from: [jsr-314-open] Ajax inside a DataTable
> Cagatay Civici
> I've faced with an issue in our app I'd like to share when trying to update the datatable itself from a command element located inside a column. Case is to select a row, execute logic and update the datatable. Basic code:
> <h:dataTable id="cars" var="car" value="#{tableBean.carsSmall}">
> <h:column>
> <f:facet name="header">
> Model
> </f:facet>
> <h:outputText value="#{car.model}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> Action
> </f:facet>
> <h:commandButton value="Some Action" actionListener="#{tableBean.handleRowAction(car)}">
> <f:ajax render="cars" />
> </h:commandButton>
> </h:column>
> </h:dataTable>
> As datatable has a rowIndex >= 0 during rendering of commandButton f:ajax defines the component id to render as cars:{rowIndex} where I should expect "cars" only. This is due to UIData.getClientId implementation as UIData
> adds rowIndex for unique row ids. This causes an issue with a nested f:ajax case.
> Martin Marinschek
> We should never include the row-index in the client-id of the table
> itself. For this, we need to revise the client-id generation
> algorithm.
> Without actually having tried it, I think that it is easy to do so, as
> we have a UIComponentBase.getContainerClientId() to create the
> client-id of the children - when this method is called, we append the
> row-index, if getClientId() itself is called, we don´t.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.