myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregg Leichtman <>
Subject Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me
Date Wed, 05 Sep 2007 00:03:57 GMT
Having thought about this following your FYI (thank you for the hint), I
realized that Tiles must indeed be adding a tiles name prefix to the
name and ID attributes. The shuttle component is in a tile whose
definition name is, not surprisingly, "content".

Given this, however, I still would classify this behavior in Trinidad as
a bug based on the following reasoning. The component code that is
generating the JavaScript variables:


appears to use a global replace of underscore for colon (I didn't check
the Java code for this, but it seems reasonable based upon the generated
ID); however, the code in the generated JavaScript function
TrShuttleProxy._getDescArray that searches for an element match via ID
uses a single or first replace of underscore for colon. This
inconsistency in the handling of the modification of element IDs will
always cause a problem for any code, Tiles or otherwise that adds
something with a colon to the ID.

Therefore, I would re-categorize this as an integration bug instead of a
general Trinidad bug, but I would suggest that it is still a bug in
Trinidad that should be fixed. If nothing else, I will need to,
hopefully temporarily, create a duplicate TrShuttleProxy._getDescArray
function with the suggested patch in order to get this functionality to
work with Tiles or alternatively modify the Java generation code,
something I would rather not do, since the latter interferes with easy

Do you agree that this is a bug and that it should be fixed?

                                                              -=> Gregg <=-

Adam Winer wrote:
> Gregg,
> FYI, I don't think Trinidad is adding the "content:".   Perhaps
> Tiles 2.0 is (I've not looked at the newer version).
> -- Adam
> On 9/3/07, Gregg Leichtman <> wrote:
>>  I have found a bug in the generated JavaScript for the Select*Shuttle
>> components. A patch follows:
>>  TrShuttleProxy._getDescArray = function(listName) {
>>  //  var descArray = window[listName.replace(':','_') + '_desc'];
>>    var descArray = window[listName.replace(/:/g,'_') + '_desc']; // gsl fix
>>    return descArray;
>>  }
>>  where listName is content:shuttle1:leading.
>>  The problem is that the listName is not using a global replace; therefore
>> only the first ':' is being replaced. This worked fine in ADF Faces before
>> porting to Trinidad where the listName was just "shuttle1:leading". Note,
>> however, that Trinidad now adds an additional "content" prefix to the
>> generated inline JavaScript variables:
>>  content_shuttle1_leading_desc=new Array('The First Item
>> Desc',
>>  'The Second Item Desc',
>>  'The Third Item Desc','');
>>  content_shuttle1_trailing_desc=new Array('');
>>  This means that a global replace needs to be done to create the proper
>> variable name for matching in the JavaScript code. I will report this on
>> Jira for the Trinidad project.
>>  I don't have access to the latest snapshots. The last one I see is from
>> July 11th at:
>>  If this has been fixed already, then please clear my bug report which
>> should have the side benefit of letting people know that the bug has been
>> found and fixed already.
>>                                     -=> Gregg <=-

View raw message