怀疑<rich:listshuttle>?</rich:listshuttle>

时间:2010-06-25 06:26:04

标签: jsf richfaces

在我的应用程序中,我正在使用<rich:listshuttle>组件,我为Label提供了一个空白区域。我的疑问是,当我将鼠标指针保持在复制,删除,向上和向下按钮时,我得到一个工具提示,即copyControlremoveControlupControldownControl,检查HTML源代码时,这些是ALT中提供的<IMG>名称。有没有可能改变这些ALT数据。我正在使用RichFaces 3.1.4。

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);

// - &GT;

2 个答案:

答案 0 :(得分:1)

尝试将此属性用于rich:listshuttle

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

答案 1 :(得分: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>