I agree this is a big problem! Let me know if you figure out how to solve it.

Thanks,
David

-----Original Message-----
From: Michael Heinen (JIRA) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2008 9:32 AM
To: Moberg, David
Subject: [jira] Commented: (TOMAHAWK-1257) Tomahawk datatable not refreshing 
after error


    [ 
https://issues.apache.org/jira/browse/TOMAHAWK-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652832#action_12652832
 ] 

Michael Heinen commented on TOMAHAWK-1257:
------------------------------------------

I noticed the same bug today with tomahawk 1.1.7

It is caused by an if statement in HtmlDataTableHack. The internal dataModelMap 
is not cleared if there is any error message in the current faces context. This 
means that deprecated data is shown or in my case that 
IndexOutOfBoundsException occur because the new model contains less rows.

can be easily reproduced:
- create a new DataModel in an ActionListener
- add an error message to the context 

Method encodeBegin(FacesContext fc) in HtmlDataTableHack contains following 
statements:
if (_isValidChilds && !hasErrorMessages(context)) {
   //Refresh DataModel for rendering:
    _dataModelMap.clear();
   ...
 
This means that error messages cannot be added anymore or the whole processing 
does not work as expected!

>From my point of view this an critical error

> Tomahawk datatable not refreshing after error     
> --------------------------------------------------
>
>                 Key: TOMAHAWK-1257
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1257
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.6
>         Environment: Windows XP, IBM Rational Developer 6.01.
>            Reporter: David Moberg
>            Assignee: Hazem Saleh
>
> I have a JSF application that is using a Tomahawk datatable. Everything works 
> perfectly except for after an error has occurred. The error can be conversion 
> or validation error or something else, it does not matter. Once one of these 
> errors occur and the page reloads with the error message it is no longer 
> possible to update the datatable.
> When I submit the page with new filtering options (and of course removing 
> what caused the error) the page just reloads but nothing changes. The error 
> message no longer displays.
> Here is the datatable:
> <t:dataTable var="request" styleClass="datatable fullwidth"
> headerClass="tablesubheadopt4"
> rowClasses="list-row-even, list-row-odd"
> columnClasses="column-1, column-2, column-3, column-4, column-5, column-6, 
> column-7, column-8, column-9, column-10, column-11, column-12, column-13, 
> column-14, column-15, column-16, column-17, column-18"
> rows="#{BuViewBean.numOfRows2}" value="#{BuViewBean.list}"
> id="dataTable" preserveDataModel="false" preserveSort="true"
> sortable="true">
> The main problem is that once I have had an error on the page, the 
> BuViewBean.list method is never called. I have verified this with debugger.
> What is weird is that BuViewBean.numOfRows2 is called and all other beans on 
> the page are called. Basically all getters and setters are executed except 
> for BuViewBean.list.
> And as I mentioned above, everything works perfectly until an error is 
> encountered.
> I can also add that I added a Phase Listener and was able to determine that a 
> successful reload of the datatable (pre error) contains the exact same phases 
> as the unsuccessful reload after the error has been generated.
> This sounds like a bug in Tomahawk datatable to me.
> I am using Tomahawk-1.1.6.jar.
> Ok, I tried to do some debugging but with no success. I am not sure what is 
> going on.
> I was able to determine that the createDataModel() method in 
> HtmlDatatableHack.class does not get executed after an error has occured. I 
> was not able to tell from where/how the createDataModel() method is called. 
> Some code is preventing the datatable from being refreshed.
> I can also add that I tried to switch to the standard datatable (h:) and that 
> works as it should but does not have any of the fancy features that Tomahawk 
> datatable has.
> Am I really the first person encountering the problem? 
> http://forum.java.sun.com/thread.jspa?threadID=5295295

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



-----Message Disclaimer-----

This e-mail message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
If you are not the intended recipient, any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
reply email to [EMAIL PROTECTED] and delete or destroy all copies of
the original message and attachments thereto. Email sent to or from the
Principal Financial Group or any of its member companies may be retained
as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature
for purposes of the Uniform Electronic Transactions Act (UETA) or the
Electronic Signatures in Global and National Commerce Act ("E-Sign")
unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction
or an idea that is discussed in the publication, it is intended to provide
general information about the subject matter covered and is provided with
the understanding that The Principal is not rendering legal, accounting,
or tax advice. It is not a marketed opinion and may not be used to avoid
penalties under the Internal Revenue Code. You should consult with
appropriate counsel or other advisors on all matters pertaining to legal,
tax, or accounting obligations and requirements.

Reply via email to