views:

90

answers:

1

Hi there,

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>

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?

Thanks in advance!.

A: 

All rich:clientId does it to render document.getElementById() and provide the full 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)

Damo