2010-06-25 51 views
0

在我的應用程序中,我使用了<rich:listshuttle>組件,並且我爲標籤提供了空白區域。我的疑問是,當我一直在複製的鼠標指針,刪除,向上和向下按鈕我感到即copyControlremoveControlupControldownControl得到一個工具提示,當檢查HTML源代碼,這些都在<IMG>提供的​​名。有沒有可能改變這些ALT數據。我正在使用RichFaces 3.1.4。疑問<rich:listshuttle>?

JSP代碼

enter code here 
<rich:listShuttle id="resultCustomizelist" 
         sourceValue="#{Bean.selectItem}" 
         targetValue="#{Bean.selectedItem}" var="custRows" 
         listsHeight="150" sourceListWidth="180" targetListWidth="180" 
         sourceCaptionLabel="#{label.selectFields}" 
         targetCaptionLabel="#{label.selectedFields}" 
         converter="Listconverter" copyControlLabel=" " removeControlLabel=" " 
         fastMoveControlsVisible="false" downControlLabel=" " 
         upControlLabel=" " fastOrderControlsVisible="false"> 
         <rich:column> 
          <h:outputText value="#{custRows.label}"></h:outputText> 
         </rich:column> 
        </rich:listShuttle> 

HTML源代碼

enter code here 
<table cellpadding="0" cellspacing="0" class="rich-list-shuttle " id="customizePanelId:resultCustomizelist"> 
<tbody> 
    <tr> 
     <td class="rich-list-shuttle-caption" colspan="2"> 
      <div class="rich-shuttle-source-caption">Available Columns</div> 
     </td> 
     <td class="rich-list-shuttle-caption" colspan="2"> 
      <div class="rich-shuttle-target-caption">Displayed Columns</div> 
     </td> 
    </tr> 
    <tr> 
     <td> 
      <div class="rich-shuttle-source-items "> 
      <input id="customizePanelId:resultCustomizelistfocusKeeper" style="width: 1px; position: absolute; left: -32767px;" type="button" /> 
     <table cellpadding="0" cellspacing="0" class="rich-shuttle-body" id="customizePanelId:resultCustomizelisttable"><tbody><tr><td style="border:0px;padding : 0px;">  <div class="rich-shuttle-list" id="customizePanelId:resultCustomizelistheaderBox"><div class="rich-shuttle-list-content" id="customizePanelId:resultCustomizelistcontentBox" style="width:180px;height:150px;"><table cellpadding="0" cellspacing="0" class="rich-shuttle-internal-tab" id="customizePanelId:resultCustomizelistinternal_tab"><tbody id="customizePanelId:resultCustomizelisttbody"></tbody></table></div></div></td></tr></tbody></table></div></td><td style="vertical-align: middle;"><div class="rich-shuttle-controls"><div id="customizePanelId:resultCustomizelistcopy" class=" rich-shuttle-control-copy" style="display:none;"><div class="rich-list-shuttle-button" onmouseover="this.className='rich-list-shuttle-button-light'" onmousedown="this.className='rich-list-shuttle-button-press'" onmouseup="this.className='rich-list-shuttle-button'" onmouseout="this.className='rich-list-shuttle-button'"> 
     <a id="customizePanelId:resultCustomizelistcopylink" href="#" onclick="return false;" class="rich-list-shuttle-button-selection" onblur="Control.onblur(this);" onfocus="Control.onfocus(this);"><div class="rich-list-shuttle-button-content" onclick=""> 
     <img width="15" height="15" border="0" alt="copyControl" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.ListShuttleIconCopy/DATB/eAFjYGD4f-.Y....ARNrBaE_.faces" /> </div></a></div></div><div id="customizePanelId:resultCustomizelistdiscopy" class=" rich-shuttle-control-disabled" style="display:block;"><div class="rich-list-shuttle-button-disabled"><a id="customizePanelId:resultCustomizelistdiscopylink" href="#" onclick="return false;" disabled="disabled" class="rich-list-shuttle-button-a-disabled"><a><div class="rich-list-shuttle-button-content"> 
     <img width="15" height="15" border="0" alt="copyControlDisabled" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.ListShuttleIconCopyDisabled/DATB/eAH7vL33.71j....BwAliQfY.faces" /> </div></a></a></div></div><div id="customizePanelId:resultCustomizelistremove" class=" rich-shuttle-control-remove" style="display:none;"><div class="rich-list-shuttle-button" onmouseover="this.className='rich-list-shuttle-button-light'" onmousedown="this.className='rich-list-shuttle-button-press'" onmouseup="this.className='rich-list-shuttle-button'" onmouseout="this.className='rich-list-shuttle-button'"> 
     <a id="customizePanelId:resultCustomizelistremovelink" href="#" onclick="return false;" class="rich-list-shuttle-button-selection" onblur="Control.onblur(this);" onfocus="Control.onfocus(this);"><div class="rich-list-shuttle-button-content" onclick=""> 
     <img width="15" height="15" border="0" alt="removeControl" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.ListShuttleIconRemove/DATB/eAFjYGD4f-.Y....ARNrBaE_.faces" /> </div></a></div></div><div id="customizePanelId:resultCustomizelistdisremove" class=" rich-shuttle-control-disabled" style="display:block;"><div class="rich-list-shuttle-button-disabled"><a id="customizePanelId:resultCustomizelistdisremovelink" href="#" onclick="return false;" disabled="disabled" class="rich-list-shuttle-button-a-disabled"><a><div class="rich-list-shuttle-button-content"> 
     <img width="15" height="15" border="0" alt="removeControlDisabled" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.ListShuttleIconRemoveDisabled/DATB/eAH7vL33.71j....BwAliQfY.faces" /> </div></a></a></div></div></div></td><td><div class="rich-shuttle-target-items "><input name="customizePanelId:resultCustomizelist" style="display: none;" type="hidden" value=":" /> 
     <input id="customizePanelId:resultCustomizelisttlFocusKeeper" style="width: 1px; position: absolute; left: -32767px;" type="button" /><table cellpadding="0" cellspacing="0" class="rich-shuttle-body" id="customizePanelId:resultCustomizelisttlTable"><tbody><tr><td style="border:0px;padding : 0px;"><div class="rich-shuttle-list" id="customizePanelId:resultCustomizelisttlHeaderBox"><div class="rich-shuttle-list-content" id="customizePanelId:resultCustomizelisttlContentBox" style="width:180px;height:150px;"> <table cellpadding="0" cellspacing="0" class="rich-shuttle-internal-tab" id="customizePanelId:resultCustomizelisttlInternal_tab"><tbody id="customizePanelId:resultCustomizelisttlTbody"></tbody></table></div></div></td></tr></tbody></table></div></td><td style="vertical-align: middle;"><div class="rich-shuttle-controls"><div id="customizePanelId:resultCustomizelistup" class=" rich-shuttle-control-up" style="display:none;"><div class="rich-list-shuttle-button" onmouseover="this.className='rich-list-shuttle-button-light'" onmousedown="this.className='rich-list-shuttle-button-press'" onmouseup="this.className='rich-list-shuttle-button'" onmouseout="this.className='rich-list-shuttle-button'"><a id="customizePanelId:resultCustomizelistuplink" href="#" onclick="return false;" class="rich-list-shuttle-button-selection" onblur="Control.onblur(this);" onfocus="Control.onfocus(this);"><div class="rich-list-shuttle-button-content" onclick=""> 
     <img width="15" height="15" border="0" alt="upControl" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.OrderingListIconUp/DATB/eAFjYGD4f-.Y....ARNrBaE_.faces" /> </div></a></div></div><div id="customizePanelId:resultCustomizelistdisup" class=" rich-shuttle-control-disabled" style="display:block;"><div class="rich-list-shuttle-button-disabled"><a id="customizePanelId:resultCustomizelistdisuplink" href="#" onclick="return false;" disabled="disabled" class="rich-list-shuttle-button-a-disabled"><a><div class="rich-list-shuttle-button-content"> 
     <img width="15" height="15" border="0" alt="upControlDisabled" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.OrderingListIconUpDisabled/DATB/eAH7vL33.71j....BwAliQfY.faces" /> </div></a></a></div></div><div id="customizePanelId:resultCustomizelistdown" class=" rich-shuttle-control-down" style="display:none;"><div class="rich-list-shuttle-button" onmouseover="this.className='rich-list-shuttle-button-light'" onmousedown="this.className='rich-list-shuttle-button-press'" onmouseup="this.className='rich-list-shuttle-button'" onmouseout="this.className='rich-list-shuttle-button'"><a id="customizePanelId:resultCustomizelistdownlink" href="#" onclick="return false;" class="rich-list-shuttle-button-selection" onblur="Control.onblur(this);" onfocus="Control.onfocus(this);"><div class="rich-list-shuttle-button-content" onclick=""> 
     <img width="15" height="15" border="0" alt="downControl" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.OrderingListIconDown/DATB/eAFjYGD4f-.Y....ARNrBaE_.faces" /> </div></a></div></div><div id="customizePanelId:resultCustomizelistdisdown" class=" rich-shuttle-control-disabled" style="display:block;"><div class="rich-list-shuttle-button-disabled"><a id="customizePanelId:resultCustomizelistdisdownlink" href="#" onclick="return false;" disabled="disabled" class="rich-list-shuttle-button-a-disabled"><a><div class="rich-list-shuttle-button-content"> 
     <img width="15" height="15" border="0" alt="downControlDisabled" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.OrderingListIconDownDisabled/DATB/eAH7vL33.71j....BwAliQfY.faces" /> </div></a></a></div></div></div><script type="text/javascript"><!-- 
     var clientId = 'customizePanelId:resultCustomizelist'; 
         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('customizePanelId:resultCustomizelistinternal_header_tab', 'customizePanelId:resultCustomizelistinternal_tab'); 
          var targetLayoutManager = new LayoutManager('customizePanelId:resultCustomizelisttlInternal_header_tab', 'customizePanelId:resultCustomizelisttlInternal_tab'); 

          var listShuttle = new Richfaces.ListShuttle(new Richfaces.ListShuttle.Target('customizePanelId:resultCustomizelist', 'customizePanelId:resultCustomizelisttlInternal_tab', 'customizePanelId:resultCustomizelisttlInternal_header_tab', 'customizePanelId:resultCustomizelisttlFocusKeeper', cotrolsIdPrefix, 'customizePanelId:resultCustomizelistsortLabel', null, Richfaces.ListShuttle.Target.SelectItem, null, null), 
                     new Richfaces.ListShuttle.Source('customizePanelId:resultCustomizelist', 'customizePanelId:resultCustomizelistinternal_tab', 'customizePanelId:resultCustomizelistinternal_header_tab', 'customizePanelId:resultCustomizelistfocusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem, null, null), 
                     "customizePanelId:resultCustomizelist", listShuttleCotrolsIdPrefix, "false", sourceLayoutManager, targetLayoutManager, null); 
          var sourceLayoutManager = new LayoutManager('customizePanelId:resultCustomizelistinternal_header_tab', 'customizePanelId:resultCustomizelistinternal_tab'); 
          var targetLayoutManager = new LayoutManager('customizePanelId:resultCustomizelisttlInternal_header_tab', 'customizePanelId:resultCustomizelisttlInternal_tab'); 
          sourceLayoutManager.widthSynchronization(); 
          targetLayoutManager.widthSynchronization(); 
         }); 
         //setTimeout(init, 0); 

// - >

回答

0

找到了較低版本的解決方案,我們可以用超過自己的圖像替換令人興奮的圖像,並可以提供alt數據。

<f:facet name="copyControl"> 
<t:graphicImage url="" alt="" border="0"></t:graphicImage> 
</f:facet> 
<f:facet name="copyControlDisabled"> 
<t:graphicImage url="" alt="" border="0"></t:graphicImage> 
</f:facet> 
<f:facet name="removeControl"> 
<t:graphicImage url="" alt="" border="0"></t:graphicImage> 
</f:facet> 
<f:facet name="removeControlDisabled"> 
    <t:graphicImage url="" alt="" border="0"></t:graphicImage> 
</f:facet> 
<f:facet name="upControl"> 
    <t:graphicImage url="" alt="" border="0"></t:graphicImage> 
</f:facet> 
<f:facet name="upControlDisabled"> 
    <t:graphicImage url="" alt="" border="0"></t:graphicImage> 
</f:facet> 
<f:facet name="downControl"> 
    <t:graphicImage url="" alt="" border="0"></t:graphicImage> 
</f:facet> 
<f:facet name="downControlDisabled"> 
    <t:graphicImage url="" alt="" border="0"></t:graphicImage> 
</f:facet> 
1

嘗試使用這個屬性來豐富:listshuttle

copyAllTitle="" 
copyTitle="" 
removeAllTitle="" 
removeTitle="" 
downTitle="" 
upTitle="" 
+0

這些屬性不在RichFaces 3.1.4中。已經嘗試過,那是我提到的版本。 – Hariharbalaji 2010-06-26 11:47:37

+0

如果你可以升級你的類庫,最好是升級你的類庫,而不是僅僅爲了替代文本而擴展默認類/破解這個庫。 – Inv3r53 2010-07-04 06:34:22