Author: vmolotkov
Date: 2008-03-13 12:39:49 -0400 (Thu, 13 Mar 2008)
New Revision: 6788
Modified:
trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
Event.onReady was deleted ()
Modified: trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-03-13
16:39:44 UTC (rev 6787)
+++ trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-03-13
16:39:49 UTC (rev 6788)
@@ -184,21 +184,24 @@
<script type="text/javascript">
var clientId = '#{clientId}';
- Event.onReady(function() {
- var cotrolsIdPrefix = [['up', 'disup'], ['down',
'disdown'], ['last', 'dislast'],
['first','disfirst']];
- var listShuttleCotrolsIdPrefix = [['copy', 'discopy'],
['copyAll', 'discopyAll'], ['remove', 'disremove'],
['removeAll','disremoveAll']];
-
- var sourceLayoutManager = new
LayoutManager('#{clientId}internal_header_tab',
'#{clientId}internal_tab');
- var targetLayoutManager = new
LayoutManager('#{clientId}tlInternal_header_tab',
'#{clientId}tlInternal_tab');
-
- var listShuttle = new Richfaces.ListShuttle(new
Richfaces.ListShuttle.Target('#{clientId}', '#{clientId}tlInternal_tab',
'#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper',
cotrolsIdPrefix, '#{clientId}sortLabel', #{this:getAsEventHandler(context,
component, "onorderchanged")}, Richfaces.ListShuttle.Target.SelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)}),
- new Richfaces.ListShuttle.Source('#{clientId}',
'#{clientId}internal_tab', '#{clientId}internal_header_tab',
'#{clientId}focusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)}),
- "#{clientId}", listShuttleCotrolsIdPrefix,
"#{switchByClick}", sourceLayoutManager, targetLayoutManager,
#{this:getAsEventHandler(context, component, "onlistchanged")});
- var sourceLayoutManager = new
LayoutManager('#{clientId}internal_header_tab',
'#{clientId}internal_tab');
- var targetLayoutManager = new
LayoutManager('#{clientId}tlInternal_header_tab',
'#{clientId}tlInternal_tab');
- sourceLayoutManager.widthSynchronization();
- targetLayoutManager.widthSynchronization();
- });
+ RichShuttleUtils.execOnLoad(
+ function(){
+ var cotrolsIdPrefix = [['up', 'disup'], ['down',
'disdown'], ['last', 'dislast'],
['first','disfirst']];
+ var listShuttleCotrolsIdPrefix = [['copy', 'discopy'],
['copyAll', 'discopyAll'], ['remove', 'disremove'],
['removeAll','disremoveAll']];
+
+ var sourceLayoutManager = new
LayoutManager('#{clientId}internal_header_tab',
'#{clientId}internal_tab');
+ var targetLayoutManager = new
LayoutManager('#{clientId}tlInternal_header_tab',
'#{clientId}tlInternal_tab');
+
+ var listShuttle = new Richfaces.ListShuttle(new
Richfaces.ListShuttle.Target('#{clientId}', '#{clientId}tlInternal_tab',
'#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper',
cotrolsIdPrefix, '#{clientId}sortLabel', #{this:getAsEventHandler(context,
component, "onorderchanged")}, Richfaces.ListShuttle.Target.SelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)}),
+ new Richfaces.ListShuttle.Source('#{clientId}',
'#{clientId}internal_tab', '#{clientId}internal_header_tab',
'#{clientId}focusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem,
#{this:getColumnClassesAsJSArray(context, component)},
#{this:getRowClassesAsJSArray(context, component)}),
+ "#{clientId}", listShuttleCotrolsIdPrefix,
"#{switchByClick}", sourceLayoutManager, targetLayoutManager,
#{this:getAsEventHandler(context, component, "onlistchanged")});
+ var sourceLayoutManager = new
LayoutManager('#{clientId}internal_header_tab',
'#{clientId}internal_tab');
+ var targetLayoutManager = new
LayoutManager('#{clientId}tlInternal_header_tab',
'#{clientId}tlInternal_tab');
+ sourceLayoutManager.widthSynchronization();
+ targetLayoutManager.widthSynchronization();
+ },
+ RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100
+ );
//setTimeout(init, 0);
</script>
</td>