Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me

2007-09-05 Thread Adam Winer
No, it will not be in 1.2.2.  It'll be in 1.0.3 and 1.2.3.

-- Adam


On 9/4/07, Gregg Leichtman [EMAIL PROTECTED] wrote:

  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.

 Are you in a position to say if this fix will make it into 1.2.2?

 -= Gregg =-

 Adam Winer wrote:

 Oh, absolutely, it's a bug, and we'll apply the fix you've provided.
 I'm just pointing out that it's a really long-standing one, and that:

 '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'

 ... isn't quite right, since the bug existed in ADF Faces too,
 and Trinidad doesn't add the content prefix itself.

 -- Adam


 On 9/4/07, Gregg Leichtman [EMAIL PROTECTED] wrote:
 
  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:
 
  content_shuttle1_leading_desc
  content_shuttle1_trailing_desc
 
  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
  upgrades.
 
  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 [EMAIL PROTECTED] 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:
  
  
  
  http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/
  
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 =-
  
 
 
 




Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me

2007-09-05 Thread Adam Winer
Or, rather, it will if we get a JIRA issue on it...

-- Adam


On 9/5/07, Adam Winer [EMAIL PROTECTED] wrote:

 No, it will not be in 1.2.2.  It'll be in 1.0.3 and 1.2.3.

 -- Adam


 On 9/4/07, Gregg Leichtman [EMAIL PROTECTED]  wrote:
 
   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.
 
  Are you in a position to say if this fix will make it into 1.2.2?
 
  -= Gregg =-
 
  Adam Winer wrote:
 
  Oh, absolutely, it's a bug, and we'll apply the fix you've provided.
  I'm just pointing out that it's a really long-standing one, and that:
 
  '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'
 
  ... isn't quite right, since the bug existed in ADF Faces too,
  and Trinidad doesn't add the content prefix itself.
 
  -- Adam
 
 
  On 9/4/07, Gregg Leichtman [EMAIL PROTECTED] wrote:
  
   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:
  
   content_shuttle1_leading_desc
   content_shuttle1_trailing_desc
  
   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
   upgrades.
  
   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 [EMAIL PROTECTED] 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:
   
   
   
   http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/
   
 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 =-
   
  
  
  
 
 



Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me

2007-09-05 Thread Gregg Leichtman




I previously posted a JIRA issue as:

 TRINIDAD-678:
Description Not Shown in TextArea for Select*Shuttle
Components

in the JIRA Components section. See:
http://issues.apache.org/jira/browse/TRINIDAD-678

Let me know, if you cannot locate it. I thought that this was the most
logical place.

Thanks for the version info.

 -= Gregg =-

Adam Winer wrote:
Or, rather, it will if we get a JIRA issue on it...
  
-- Adam
  
  
  On 9/5/07, Adam
Winer [EMAIL PROTECTED]
wrote:
  
  No,
it will not be in 1.2.2. It'll be in 1.0.3 and 1.2.3.


-- Adam


On 9/4/07, Gregg Leichtman 
[EMAIL PROTECTED]
 wrote:

  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. 
  
Are you in a position to say if this fix will make it into 1.2.2?
  
 -= Gregg =-
  
  
Adam Winer wrote:
  Oh, absolutely, it's a bug, and we'll apply the fix you've
provided.
I'm just pointing out that it's a really long-standing one, and that:

'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'

... isn't quite right, since the bug existed in ADF Faces too,
and Trinidad doesn't add the "content" prefix itself. 

-- Adam


On 9/4/07, Gregg
Leichtman [EMAIL PROTECTED]
wrote:
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:
  
content_shuttle1_leading_desc 
content_shuttle1_trailing_desc
  
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
upgrades.
  
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 [EMAIL PROTECTED]
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:


 
http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/

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 =-

  
  



  
  
  
  




  
  
  






signature.asc
Description: OpenPGP digital signature


Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me

2007-09-04 Thread Adam Winer
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 [EMAIL PROTECTED] 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:


 http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/

  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 =-

  Gregg Leichtman wrote:

 I am trying to get the leadingDescShown and trailingDescShown attributes
 to work for the Trinidad v1.2.1 SelectOrderShuttle. I have the shuttle
 working for everything except for displaying the description of a
 selected item in the textarea below the leading or trailing shuttle. I'm
 running under Linux and Eclipse 3.3 Europa using J2EE5 with JSF 1.2 and
 Tiles 2.0.4. I have a tile as follows:

 %@ taglib uri=http://java.sun.com/jsf/core; prefix=f %
 %@ taglib uri=http://java.sun.com/jsf/html; prefix=h %
 %@ taglib uri=http://tiles.apache.org/tags-tiles;
 prefix=tiles %
 %@ taglib uri=http://myfaces.apache.org/tomahawk;
 prefix=t %
 %@ taglib uri=http://myfaces.apache.org/trinidad;
 prefix=tr%

 tr:form
  tr:panelGroupLayout layout=vertical
  f:facet name=separator
  tr:separator /
  /f:facet
  tr:messages/
  tr:selectOrderShuttle id=shuttle1
  label=Selected Values
  leadingHeader=Available values:
  leadingDescShown=true
  trailingHeader=Selected values:
  trailingDescShown=true
  binding=#{editor.component}
  valueChangeListener=#{list.valueChanged}
  value=#{list.stringArray}
  tr:selectItem shortDesc=The First Item Desc
 longDesc=Long Desc 1 label=First value=foo/
  tr:selectItem shortDesc=The Second Item Desc
 longDesc=Long Desc 2 label=Second value=bar/
  tr:selectItem shortDesc=The Third Item Desc
 longDesc=Long Desc 3 label=Third value=baz/
  /tr:selectOrderShuttle
  tr:message for=shuttle1/
  tr:commandButton text=Submit/
  /tr:panelGroupLayout
 /tr:form

 The layout page uses f:view wrapping trh:html, trh:head and trh:body.
 The trh:body element wraps one of several subviews which wrap several
 tiles one of which is the above tile.

 An excerpt from the generated page looks like this:

  ...

  form id=content:j_id_jsp_709084578_0pc4
 name=content:j_id_jsp_709084578_0pc4 style=margin:0px
 method=POST onkeypress=return
 _submitOnEnter(event,'content:j_id_jsp_709084578_0pc4');
 action=/tutoring/tickerManagerPage.do!--Start:
 org.apache.myfaces.trinidad.Panel[j_id_jsp_709084578_1pc4]--div!--Start:
 org.apache.myfaces.trinidad.Messages[j_id_jsp_709084578_3pc4]--span
 id=content:j_id_jsp_709084578_3pc4/spandiv!--Start:
 org.apache.myfaces.trinidad.Object[j_id_jsp_709084578_2pc4]--
  hr class=af_separator
  /divscriptvar _shuttle_no_items='There are no items to move.';var
 _shuttle_no_items_selected='Please select the items to move
 first.';/script!--Start:
 org.apache.myfaces.trinidad.SelectOrder[shuttle1]--table
 cellpadding=0 cellspacing=0 border=0 width=10% summary=
 id=content:shuttle1 class=af_selectManyShuttletr
  td class=x9u valign=bottomAvailable values:/td


  td/td

  td class=x9u valign=bottomSelected values:/td
  /trtr
  td!--Start:
 org.apache.myfaces.trinidad.SelectOrder[shuttle1]--table
 class=af_selectOrderShuttle_box style=width:100%
 cellpadding=0 cellspacing=0 border=0 summary=tbodytr
  td class=af_selectOrderShuttle_box-top-start/td

  td class=af_selectOrderShuttle_box-top/td

  td class=af_selectOrderShuttle_box-top-end/td
  /trtr

  td class=af_selectOrderShuttle_box-start/td

  td class=x59div class=x55table cellpadding=0 border=0
 summary=tr
  td nowrap valign=middle!--Start:
 org.apache.myfaces.trinidad.SelectOrder[shuttle1]--span
 class=x1i
  select multiple id=content:shuttle1:leading
 

Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me

2007-09-04 Thread Gregg Leichtman
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:

content_shuttle1_leading_desc
content_shuttle1_trailing_desc

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
upgrades.

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 [EMAIL PROTECTED] 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:


 http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/

  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 =-
 



signature.asc
Description: OpenPGP digital signature


Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me

2007-09-04 Thread Adam Winer
Oh, absolutely, it's a bug, and we'll apply the fix you've provided.
I'm just pointing out that it's a really long-standing one, and that:

'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'

... isn't quite right, since the bug existed in ADF Faces too,
and Trinidad doesn't add the content prefix itself.

-- Adam


On 9/4/07, Gregg Leichtman [EMAIL PROTECTED] wrote:

 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:

 content_shuttle1_leading_desc
 content_shuttle1_trailing_desc

 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
 upgrades.

 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 [EMAIL PROTECTED] 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:
 
 
 
 http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/
 
   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 =-
 





Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me

2007-09-04 Thread Gregg Leichtman




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. 

Are you in a position to say if this fix will make it into 1.2.2?

 -= Gregg =-

Adam Winer wrote:
Oh, absolutely, it's a bug, and we'll apply the fix you've
provided.
I'm just pointing out that it's a really long-standing one, and that:
  
'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'
  
... isn't quite right, since the bug existed in ADF Faces too,
and Trinidad doesn't add the "content" prefix itself.
  
  
-- Adam
  
  
  On 9/4/07, Gregg
Leichtman [EMAIL PROTECTED]
wrote:
  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:

content_shuttle1_leading_desc

content_shuttle1_trailing_desc

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
upgrades.

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 [EMAIL PROTECTED]
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:


 
http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/

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 =-



  
  
  






signature.asc
Description: OpenPGP digital signature


Re: Trinidad 1.2.1: SelectOrderShuttle leading/trailingDescShown Fails For Me

2007-09-03 Thread Gregg Leichtman




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:


http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/trinidad-impl/1.2.1-SNAPSHOT/

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 =-

Gregg Leichtman wrote:

  I am trying to get the leadingDescShown and trailingDescShown attributes
to work for the Trinidad v1.2.1 SelectOrderShuttle. I have the shuttle
working for everything except for displaying the description of a
selected item in the textarea below the leading or trailing shuttle. I'm
running under Linux and Eclipse 3.3 Europa using J2EE5 with JSF 1.2 and
Tiles 2.0.4. I have a tile as follows:

%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %
%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %
%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %
%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %
%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%

tr:form
tr:panelGroupLayout layout="vertical"
f:facet name="separator"
 tr:separator /
/f:facet  
tr:messages/
tr:selectOrderShuttle id="shuttle1"
label="Selected Values"
leadingHeader="Available values:"
leadingDescShown="true"
trailingHeader="Selected values:"
trailingDescShown="true"
binding="#{editor.component}"
valueChangeListener="#{list.valueChanged}"
value="#{list.stringArray}"
tr:selectItem shortDesc="The First Item Desc"
longDesc="" label="First" value="foo"/
tr:selectItem shortDesc="The Second Item Desc"
longDesc="" label="Second" value="bar"/
tr:selectItem shortDesc="The Third Item Desc"
longDesc="" label="Third" value="baz"/
/tr:selectOrderShuttle
tr:message for=""/
tr:commandButton text="Submit"/
/tr:panelGroupLayout
/tr:form

The layout page uses f:view wrapping trh:html, trh:head and trh:body.
The trh:body element wraps one of several subviews which wrap several
tiles one of which is the above tile.

An excerpt from the generated page looks like this:

...

form id="content:j_id_jsp_709084578_0pc4" name="content:j_id_jsp_709084578_0pc4" style="margin:0px" method="POST"  action=""!--Start: org.apache.myfaces.trinidad.Panel["j_id_jsp_709084578_1pc4"]--div!--Start: org.apache.myfaces.trinidad.Messages["j_id_jsp_709084578_3pc4"]--span id="content:j_id_jsp_709084578_3pc4"/spandiv!--Start: org.apache.myfaces.trinidad.Object["j_id_jsp_709084578_2pc4"]--
  hr class="af_separator"
/divscriptvar _shuttle_no_items='There are no items to move.';var _shuttle_no_items_selected='Please select the items to move first.';/script!--Start: org.apache.myfaces.trinidad.SelectOrder["shuttle1"]--table cellpadding="0" cellspacing="0" border="0" width="10%" summary="" id="content:shuttle1" class="af_selectManyShuttle"tr
td class="x9u" valign="bottom"Available values:/td

  
td/td
  
td class="x9u" valign="bottom"Selected values:/td
  /trtr
td!--Start: org.apache.myfaces.trinidad.SelectOrder["shuttle1"]--table class="af_selectOrderShuttle_box" style="width:100%" cellpadding="0" cellspacing="0" border="0" summary=""tbodytr
td class="af_selectOrderShuttle_box-top-start"/td
  
td class="af_selectOrderShuttle_box-top"/td
  
td class="af_selectOrderShuttle_box-top-end"/td
  /trtr

td class="af_selectOrderShuttle_box-start"/td