[richfaces-svn-commits] JBoss Rich Faces SVN: r4520 - branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Wed Dec 5 19:04:59 EST 2007
Author: nbelaevski
Date: 2007-12-05 19:04:59 -0500 (Wed, 05 Dec 2007)
New Revision: 4520
Modified:
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1510
Modified: branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-06 00:04:30 UTC (rev 4519)
+++ branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-06 00:04:59 UTC (rev 4520)
@@ -29,165 +29,169 @@
</h:scripts>
<f:clientId var="clientId"/>
- <vcp:body>
- <f:clientId var="clientId"/>
- <jsp:scriptlet>
- <![CDATA[
- SelectionState sourceSelectionState = new SelectionState();
- variables.setVariable(SELECTION_STATE_VAR_NAME, sourceSelectionState);
- String encodedSourceRows = encodeRows(context, component, true);
+ <table id="#{clientId}" class="rich-list-shuttle">
+ <tbody>
+ <vcp:body>
+ <f:clientId var="clientId"/>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ SelectionState sourceSelectionState = new SelectionState();
+ variables.setVariable(SELECTION_STATE_VAR_NAME, sourceSelectionState);
+ String encodedSourceRows = encodeRows(context, component, true);
+
+ SelectionState targetSelectionState = new SelectionState();
+ variables.setVariable(SELECTION_STATE_VAR_NAME, targetSelectionState);
+ String encodedTargetRows = encodeRows(context, component, false);
+
+ Boolean switchByClick = (Boolean) component.getAttributes().get("switchByClick");
+ variables.setVariable("switchByClick", switchByClick);
+ ]]>
+ </jsp:scriptlet>
- SelectionState targetSelectionState = new SelectionState();
- variables.setVariable(SELECTION_STATE_VAR_NAME, targetSelectionState);
- String encodedTargetRows = encodeRows(context, component, false);
-
- Boolean switchByClick = (Boolean) component.getAttributes().get("switchByClick");
- variables.setVariable("switchByClick", switchByClick);
- ]]>
- </jsp:scriptlet>
- <table id="#{clientId}" class="rich-list-shuttle">
- <tr style="#{this:getCaptionDisplay(context, component)}" >
- <td class="rich-list-shuttle-caption" colspan="2">
- <f:call name="encodeSLCaption"/>
- </td>
- <td class="rich-list-shuttle-caption" colspan="2">
- <f:call name="encodeTLCaption"/>
- </td>
- </tr>
- <tr>
- <td>
- <div class="rich-shuttle-source-items">
- <input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
-
- <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
- <tbody>
- <tr>
- <td style="border:0px;padding : 0px;">
- <div id="#{clientId}headerBox" class="rich-shuttle-list">
- <jsp:scriptlet>
- <![CDATA[
- String contentContainerStyle = "";
- String sourceListWidthValue = (String) component.getAttributes().get("sourceListWidth");
- if (sourceListWidthValue != null) {
- contentContainerStyle = contentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(sourceListWidthValue)).concat(";");
- variables.setVariable("contentContainerStyle", contentContainerStyle);
- }
- ]]>
- </jsp:scriptlet>
- <div class="rich-shuttle-list-header" style="#{contentContainerStyle}">
- <table id="#{clientId}internal_header_tab" class="rich-shuttle-internal-header-tab" cellpadding="0" cellspacing="0">
- <f:call name="encodeSLHeader"/>
- </table>
+ <tr style="#{this:getCaptionDisplay(context, component)}" >
+ <td class="rich-list-shuttle-caption" colspan="2">
+ <f:call name="encodeSLCaption"/>
+ </td>
+ <td class="rich-list-shuttle-caption" colspan="2">
+ <f:call name="encodeTLCaption"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="rich-shuttle-source-items">
+ <input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
+
+ <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
+ <tbody>
+ <tr>
+ <td style="border:0px;padding : 0px;">
+ <div id="#{clientId}headerBox" class="rich-shuttle-list">
+ <jsp:scriptlet>
+ <![CDATA[
+ String contentContainerStyle = "";
+ String sourceListWidthValue = (String) component.getAttributes().get("sourceListWidth");
+ if (sourceListWidthValue != null) {
+ contentContainerStyle = contentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(sourceListWidthValue)).concat(";");
+ variables.setVariable("contentContainerStyle", contentContainerStyle);
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div class="rich-shuttle-list-header" style="#{contentContainerStyle}">
+ <table id="#{clientId}internal_header_tab" class="rich-shuttle-internal-header-tab" cellpadding="0" cellspacing="0">
+ <f:call name="encodeSLHeader"/>
+ </table>
+ </div>
+ <jsp:scriptlet>
+ <![CDATA[
+ String listHeightValue = (String) component.getAttributes().get("listsHeight");
+ if (listHeightValue != null) {
+ contentContainerStyle = contentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
+ variables.setVariable("contentContainerStyle", contentContainerStyle);
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div id="#{clientId}contentBox" class="rich-shuttle-list-content" style="#{contentContainerStyle}">
+ <table id="#{clientId}internal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
+ <tbody id="#{clientId}tbody">
+ <jsp:scriptlet><![CDATA[
+ writer.write(encodedSourceRows);
+ encodedSourceRows = null;
+ ]]></jsp:scriptlet>
+ </tbody>
+ </table>
+ </div>
</div>
- <jsp:scriptlet>
- <![CDATA[
- String listHeightValue = (String) component.getAttributes().get("listsHeight");
- if (listHeightValue != null) {
- contentContainerStyle = contentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
- variables.setVariable("contentContainerStyle", contentContainerStyle);
- }
- ]]>
- </jsp:scriptlet>
- <div id="#{clientId}contentBox" class="rich-shuttle-list-content" style="#{contentContainerStyle}">
- <table id="#{clientId}internal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
- <tbody id="#{clientId}tbody">
- <jsp:scriptlet><![CDATA[
- writer.write(encodedSourceRows);
- encodedSourceRows = null;
- ]]></jsp:scriptlet>
- </tbody>
- </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ <td>
+ <div class="rich-shuttle-controls">
+ <jsp:scriptlet><![CDATA[
+ encodeShuttleControlsFacets(context, component, sourceSelectionState, targetSelectionState);
+ ]]></jsp:scriptlet>
+ </div>
+
+ </td>
+ <td>
+ <div class="rich-shuttle-target-items" >
+ <input type="hidden" value=":" style="display: none;" name="#{clientId}" />
+
+ <input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
+
+ <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
+ <tbody>
+ <tr>
+ <td style="border:0px;padding : 0px;">
+ <div id="#{clientId}tlHeaderBox" class="rich-shuttle-list">
+ <jsp:scriptlet>
+ <![CDATA[
+ String trContentContainerStyle = "";
+ String targetListWidthValue = (String) component.getAttributes().get("targetListWidth");
+ if (targetListWidthValue != null) {
+ trContentContainerStyle = trContentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(targetListWidthValue)).concat(";");
+ variables.setVariable("trContentContainerStyle", trContentContainerStyle);
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div class="rich-shuttle-list-header" style="#{trContentContainerStyle}">
+ <table id="#{clientId}tlInternal_header_tab" class="rich-shuttle-internal-header-tab" cellpadding="0" cellspacing="0">
+ <f:call name="encodeTLHeader"/>
+ </table>
+ </div>
+ <jsp:scriptlet>
+ <![CDATA[
+ if (listHeightValue != null) {
+ trContentContainerStyle = trContentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
+ variables.setVariable("trContentContainerStyle", trContentContainerStyle);
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div id="#{clientId}tlContentBox" class="rich-shuttle-list-content" style="#{trContentContainerStyle}">
+ <table id="#{clientId}tlInternal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
+ <tbody id="#{clientId}tlTbody">
+ <jsp:scriptlet><![CDATA[
+ writer.write(encodedTargetRows);
+ encodedTargetRows = null;
+ ]]></jsp:scriptlet>
+ </tbody>
+ </table>
+ </div>
</div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- <td>
- <div class="rich-shuttle-controls">
- <jsp:scriptlet><![CDATA[
- encodeShuttleControlsFacets(context, component, sourceSelectionState, targetSelectionState);
- ]]></jsp:scriptlet>
- </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ <td>
+ <div class="rich-shuttle-controls">
+ <jsp:scriptlet><![CDATA[
+ encodeTLControlsFacets(context, component, targetSelectionState);
+ ]]></jsp:scriptlet>
+ </div>
- </td>
- <td>
- <div class="rich-shuttle-target-items" >
- <input type="hidden" value=":" style="display: none;" name="#{clientId}" />
-
- <input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
-
- <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
- <tbody>
- <tr>
- <td style="border:0px;padding : 0px;">
- <div id="#{clientId}tlHeaderBox" class="rich-shuttle-list">
- <jsp:scriptlet>
- <![CDATA[
- String trContentContainerStyle = "";
- String targetListWidthValue = (String) component.getAttributes().get("targetListWidth");
- if (targetListWidthValue != null) {
- trContentContainerStyle = trContentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(targetListWidthValue)).concat(";");
- variables.setVariable("trContentContainerStyle", trContentContainerStyle);
- }
- ]]>
- </jsp:scriptlet>
- <div class="rich-shuttle-list-header" style="#{trContentContainerStyle}">
- <table id="#{clientId}tlInternal_header_tab" class="rich-shuttle-internal-header-tab" cellpadding="0" cellspacing="0">
- <f:call name="encodeTLHeader"/>
- </table>
- </div>
- <jsp:scriptlet>
- <![CDATA[
- if (listHeightValue != null) {
- trContentContainerStyle = trContentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
- variables.setVariable("trContentContainerStyle", trContentContainerStyle);
- }
- ]]>
- </jsp:scriptlet>
- <div id="#{clientId}tlContentBox" class="rich-shuttle-list-content" style="#{trContentContainerStyle}">
- <table id="#{clientId}tlInternal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
- <tbody id="#{clientId}tlTbody">
- <jsp:scriptlet><![CDATA[
- writer.write(encodedTargetRows);
- encodedTargetRows = null;
- ]]></jsp:scriptlet>
- </tbody>
- </table>
- </div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- <td>
- <div class="rich-shuttle-controls">
- <jsp:scriptlet><![CDATA[
- encodeTLControlsFacets(context, component, targetSelectionState);
- ]]></jsp:scriptlet>
- </div>
- </td>
- </tr>
- </table>
- </vcp:body>
- <f:clientId var="cId"/>
- <script type="text/javascript">
- var clientId = '#{cId}';
- Event.onReady(function() {
- var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
- var listShuttleCotrolsIdPrefix = [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']];
- var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{cId}', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
- new Richfaces.ListBase('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper'),
- "#{cId}", listShuttleCotrolsIdPrefix, "#{switchByClick}");
- var sourceLayoutManager = new LayoutManager('#{cId}internal_header_tab', '#{cId}internal_tab');
- var targetLayoutManager = new LayoutManager('#{cId}tlInternal_header_tab', '#{cId}tlInternal_tab');
- sourceLayoutManager.widthSynchronization();
- targetLayoutManager.widthSynchronization();
- });
- //setTimeout(init, 0);
- </script>
+ <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 listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', cotrolsIdPrefix, '#{clientId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
+ new Richfaces.ListBase('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper'),
+ "#{clientId}", listShuttleCotrolsIdPrefix, "#{switchByClick}");
+ 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();
+ });
+ //setTimeout(init, 0);
+ </script>
+ </td>
+ </tr>
+ </vcp:body>
+ </tbody>
+ </table>
</f:root>
\ No newline at end of file
More information about the richfaces-svn-commits
mailing list