Faceface中的RichFaces rich:clientId [英] RichFaces rich:clientId within facelets
问题描述
我正在尝试这样的事情:
I'm trying to something like this:
<?xml version="1.0"/>
<ui:composition ....>
<h:inputText id="#{id}InputText" value="#{value}"/>
<rich:calendar id="#{id}Shevron"
popup="true"
datePattern="ddMMyy"
showInput="false"
todayControlMode="hidden"
enableManualInput="false"
showApplyButton="false"
updateDays="14"
ondateselected="alert('#{rich:clientId('#{id}Shevron')}');"
inputClass="xwingml-input"/>
</ui:composition>
我在这里面临的问题是实际的客户端ID是为我的facet生成的 成分.有没有办法像这样将ID传递给rich:clientId?如果没有的话,如何解决这种问题?
The problem I'm facing here is that the actual client id is generated for my facelts components. Is there a way to pass an id to rich:clientId like this? If not how would one go about this kind of problem?
提前谢谢!.
推荐答案
所有rich:clientId
都执行此操作以呈现document.getElementById()
并提供完整ID.
All rich:clientId
does it to render document.getElementById()
and provide the full id.
因此,请勿使用#{rich:clientId('#{id}Shevron')}
,而仅使用document.getElementById('#{id}Shevron');
并确保您指定完整ID(即,包括表单ID等)
So don't use #{rich:clientId('#{id}Shevron')}
and just use document.getElementById('#{id}Shevron');
and ensure that you specify the full ID (ie. including the form ID etc)
这篇关于Faceface中的RichFaces rich:clientId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!