-
1. Re: SubTable not retaining invalid values in first row only
ilya_shaikovsky Feb 8, 2010 7:29 AM (in response to bek816)check please 3.3.3 I checked under rf-demo sample. added inputs with double range validators in table and subtable - after submit see messages and "a" letters in both cases. -
2. Re: SubTable not retaining invalid values in first row only
bek816 Feb 8, 2010 1:33 PM (in response to ilya_shaikovsky)Hi Ilya,
I tried the latest jar files (3.3.3-beta) as per your suggestion, but the problem still appears. I entered in invalid amounts into all rows in the datatable, but the invalid values were not retained on the first row. Any other suggestions?
-
3. Re: SubTable not retaining invalid values in first row only
bek816 Feb 8, 2010 2:13 PM (in response to bek816)I know this worked in the 3.1.x branch (because we succesfully implemented a project with the 3.1.x branch), but I can't get it to work with the 3.3.x branch or the last release from the 3.2.x branch. -
4. Re: SubTable not retaining invalid values in first row only
ilya_shaikovsky Feb 9, 2010 5:42 AM (in response to bek816)could you please attach simple war sample ? -
5. Re: SubTable not retaining invalid values in first row only
vace117 Apr 18, 2010 10:21 PM (in response to ilya_shaikovsky)Privet, Ilya.
I would like to follow up with you on this bug. I am taking over for Brian Kates (we work together).
I was able to reproduce the bug in a small test app. I made a war file and I would appreciate it if you could take a look.
I can see why you were not able to recreate the bug earlier. It was quite difficult for me too, and it turned out to be connected to the Tomahawk messages tag! Basically, if there is a <t:messages .../> tag present on the page, the RichFaces datatable will lose the values in the first row, as Brian described. Removing <t:messages .../> fixes the problem...
Could you please take a look at what's going on there? Is this a RichFaces bug, or a Tomahawk bug?
I can't attach my WAR file here, b/c it is over the 15MB limit due to all of the libraries that came in with Tomahawk. So, I am hosting the file on my server here: http://vace.homelinux.com/unprotected/datatable-first-row.war
The test page is at /pages/index.jsf. In order to see the bug in action, type some garbage into "Sub Row 1" and "Sub Row 2". Press "Save". Note that the value was retained in the 2nd subrrow, but erased from the first.
Please let me know what you find, or if there are any issues with the WAR file.
Thanks!
Val Blant
-
6. Re: SubTable not retaining invalid values in first row only
ilya_shaikovsky Apr 19, 2010 7:57 AM (in response to vace117)At first thanks for your patience and efforts. Unfortunatelly I still can't seems see the issues in action. Look to the screenshot attached. It's occured on clicking save. I've deployed your application without any modifications.
B.t.w. you have two JSF implementations in web-inf lib. It's definitelly not allowed and could rise classloading issues.
-
a.png 24.9 KB
-
-
7. Re: SubTable not retaining invalid values in first row only
vace117 Apr 19, 2010 2:24 PM (in response to ilya_shaikovsky)Oops - sorry about that, Ilya. I forgot to clean my maven target dir after switching to MyFaces. I wasn't running the app from the war, so i didn't notice. This is likely why you couldn't reproduce - the bug only appears with MyFaces and it was probably using the classes from the reference implementation when you deployed it.
I am attaching the fixed war file now. I just deployed this war into a Jetty 6 server and was able to reproduce the bug. I am also attaching a screenshot. Please try it again.
Val
-
error.png 36.2 KB
-
datatable-first-row.war 13.5 MB
-
-
8. Re: SubTable not retaining invalid values in first row only
ilya_shaikovsky Apr 20, 2010 10:54 AM (in response to vace117)some bad luck with the samples :/ this one reported as broken archive by tomcat and just zip unpacker :/
-
9. Re: SubTable not retaining invalid values in first row only
vace117 Apr 20, 2010 2:31 PM (in response to ilya_shaikovsky)Hmm, I think something went wrong during your download.
I have just downloaded the file I posted from the forum and ran it in Jetty w/o any trouble. I can also unpack it with either the 'jar' or 'unzip' utility.
Could you please check the MD5 sum of the WAR you downloaded? It should be de638eb1903fba756eb9b29f98baf941. If it's not, then it got corrupted when you were downloading it.
Just in case, I am putting it on my server again for an alternative way to download: http://vace.homelinux.com/unprotected/datatable-first-row.war
Let me know how it goes.
-
10. Re: SubTable not retaining invalid values in first row only
ilya_shaikovsky Apr 21, 2010 9:19 AM (in response to vace117)now downloaded fine. And yes.. could see the issue. And it's really not reproduces if add rich:messages instead of t: ones.. or just remove last ones.. need to check more.
-
11. Re: SubTable not retaining invalid values in first row only
ilya_shaikovsky Apr 21, 2010 10:53 AM (in response to ilya_shaikovsky)looks like the problem is wider than expected.. some close issues
Tomahawk https://issues.apache.org/jira/browse/TOMAHAWK-1411
JSF RI https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=73
JSF spec https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=153
Maybe it would be easier to use rich: or h: messages as a workaround.. To be honest I still can't find reason of connection this to t:messages usage for now.
-
12. Re: SubTable not retaining invalid values in first row only
bek816 Apr 21, 2010 11:46 AM (in response to ilya_shaikovsky)Thanks - I tried both the h and rich messages and they both worked. This is an acceptable workaround for us.
-
13. Re: SubTable not retaining invalid values in first row only
vace117 Apr 21, 2010 1:48 PM (in response to ilya_shaikovsky)Thanks for taking a look, Ilya.
If you ever figure this out, I would appreciate it if you post your finding here. I am really puzzled by this connection between <t:messages /> and the data table as well, so I am very curious.
-
14. Re: SubTable not retaining invalid values in first row only
vace117 Jun 10, 2010 11:39 PM (in response to ilya_shaikovsky)Hi, Ilya.
I believe I found the connection between <t:messages /> and the <rich:dataTable />.
When the Tomahawk messages tag is getting rendered, it first constructs a map of all labels on the page. Then it tries to lookup the appropriate label for the error it is rendering. If it couldn't find the label associated with the clientId of the input with the error, it will attempt to check if the input field is inside a data table, so it can use the column header as the label. And that's when we run into trouble.
In order to find the input field, it uses this code:
UIComponent comp = facesContext.getViewRoot().findComponent(inputClientId);
The above line causes a recursive traversal of the tree, which will cause the UIData components to restore the row states in order to match on the clientId of the input fields inside. This is what appears to trigger the bug. Commenting out that line makes the bug go away.
For my project I've modified the Tomahawk renderer to avoid doing the column header lookups, but that's just a hack. Since there is nothing wrong with doing the traversal Tomahawk is trying to do, I believe that we are looking at a RichFaces bug that needs to be investigated.
I hope this information will be useful for your troubleshooting.
P.S. The code I was referring to is in org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.findInputLabel(), line 166