myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregg Leichtman <g...@erols.com>
Subject Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me
Date Wed, 05 Sep 2007 02:08:30 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Agreed. The port to Trinidad did _not_ cause this problem. My initial
diagnosis was incorrect and your point on Tiles demonstrating the
problem is the correct diagnosis. <br>
<br>
Are you in a position to say if this fix will make it into 1.2.2?<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-=&gt; Gregg &lt;=-<br>
<br>
Adam Winer wrote:
<blockquote
 cite="mid6dac79b90709041842m79643d3dj6c479b523090e256@mail.gmail.com"
 type="cite">Oh, absolutely, it's a bug, and we'll apply the fix you've
provided.<br>
I'm just pointing out that it's a really long-standing one, and that:<br>
  <br>
'This worked fine in ADF Faces before<br>
porting to Trinidad where the listName was just "shuttle1:leading".
  <br>
Note, however, that Trinidad now adds an additional "content" prefix'<br>
  <br>
... isn't quite right, since the bug existed in ADF Faces too,<br>
and Trinidad doesn't add the "content" prefix itself.
  <br>
  <br>
-- Adam<br>
  <br>
  <br>
  <div><span class="gmail_quote">On 9/4/07, <b class="gmail_sendername">Gregg
Leichtman</b> &lt;<a href="mailto:gsl1@erols.com">gsl1@erols.com</a>&gt;
wrote:</span>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
1ex;">Having
thought about this following your FYI (thank you for the hint), I<br>
realized that Tiles must indeed be adding a tiles name prefix to the<br>
name and ID attributes. The shuttle component is in a tile whose<br>
definition name is, not surprisingly, "content".
    <br>
    <br>
Given this, however, I still would classify this behavior in Trinidad as<br>
a bug based on the following reasoning. The component code that is<br>
generating the JavaScript variables:<br>
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content_shuttle1_leading_desc
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content_shuttle1_trailing_desc<br>
    <br>
appears to use a global replace of underscore for colon (I didn't check<br>
the Java code for this, but it seems reasonable based upon the generated<br>
ID); however, the code in the generated JavaScript function
    <br>
TrShuttleProxy._getDescArray that searches for an element match via ID<br>
uses a single or first replace of underscore for colon. This<br>
inconsistency in the handling of the modification of element IDs will<br>
always cause a problem for any code, Tiles or otherwise that adds
    <br>
something with a colon to the ID.<br>
    <br>
Therefore, I would re-categorize this as an integration bug instead of a<br>
general Trinidad bug, but I would suggest that it is still a bug in<br>
Trinidad that should be fixed. If nothing else, I will need to,
    <br>
hopefully temporarily, create a duplicate TrShuttleProxy._getDescArray<br>
function with the suggested patch in order to get this functionality to<br>
work with Tiles or alternatively modify the Java generation code,<br>
something I would rather not do, since the latter interferes with easy<br>
upgrades.<br>
    <br>
Do you agree that this is a bug and that it should be fixed?<br>
    <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-=&gt;
Gregg &lt;=-
    <br>
    <br>
Adam Winer wrote:<br>
&gt; Gregg,<br>
&gt;<br>
&gt; FYI, I don't think Trinidad is adding the "content:".&nbsp;&nbsp; Perhaps<br>
&gt; Tiles 2.0 is (I've not looked at the newer version).<br>
&gt;<br>
&gt; -- Adam
    <br>
&gt;<br>
&gt;<br>
&gt; On 9/3/07, Gregg Leichtman &lt;<a href="mailto:gsl1@erols.com">gsl1@erols.com</a>&gt;
wrote:<br>
&gt;<br>
&gt;&gt;&nbsp;&nbsp;I have found a bug in the generated JavaScript for the
Select*Shuttle<br>
&gt;&gt; components. A patch follows:
    <br>
&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;TrShuttleProxy._getDescArray = function(listName) {<br>
&gt;&gt;&nbsp;&nbsp;//&nbsp;&nbsp;var descArray = window[listName.replace(':','_')
+
'_desc'];<br>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;var descArray = window[listName.replace
(/:/g,'_') + '_desc']; // gsl fix<br>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;return descArray;<br>
&gt;&gt;&nbsp;&nbsp;}<br>
&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;where listName is content:shuttle1:leading.<br>
&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;The problem is that the listName is not using a global
replace; therefore
    <br>
&gt;&gt; only the first ':' is being replaced. This worked fine in ADF
Faces before<br>
&gt;&gt; porting to Trinidad where the listName was just
"shuttle1:leading". Note,<br>
&gt;&gt; however, that Trinidad now adds an additional "content" prefix
to the
    <br>
&gt;&gt; generated inline JavaScript variables:<br>
&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;content_shuttle1_leading_desc=new Array('The First Item<br>
&gt;&gt; Desc',<br>
&gt;&gt;&nbsp;&nbsp;'The Second Item Desc',<br>
&gt;&gt;&nbsp;&nbsp;'The Third Item Desc','');
    <br>
&gt;&gt;&nbsp;&nbsp;content_shuttle1_trailing_desc=new Array('');<br>
&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;This means that a global replace needs to be done to create
the proper<br>
&gt;&gt; variable name for matching in the JavaScript code. I will
report this on
    <br>
&gt;&gt; Jira for the Trinidad project.<br>
&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;I don't have access to the latest snapshots. The last
one I
see is from<br>
&gt;&gt; July 11th at:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; <a
 href="http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/">
http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/</a><br>
&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;If this has been fixed already, then please clear my bug
report which<br>
&gt;&gt; should have the side benefit of letting people know that the
bug has been
    <br>
&gt;&gt; found and fixed already.<br>
&gt;&gt;<br>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-=&gt; Gregg &lt;=-<br>
&gt;&gt;<br>
    <br>
    <br>
  </blockquote>
  </div>
  <br>
</blockquote>
</body>
</html>


Mime
View raw message