The best place to ask programming/development questions, imo. UPDATE: stackoverflow is the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but a great reference for finding answers.

My Music (Nickleus)

20121015

rich:calendar button icon not rendering or getting rerendered

i have a rich:calendar inside a rich:column in a rich:dataTable. when the table gets rendered i only see an input field for the rich:calendar, no calendar icon. when i sort the column, then the icon becomes visible.

the workaround is to define buttonIcon, e.g.:

    <rich:column sortable="true" sortBy="#{trip.startDate}"
        filterBy="#{trip.startDate}" filterEvent="onkeyup">
        <f:facet name="header">
            <h:outputText value="#{msg['label.startDate']}" />
        </f:facet>
            <h:outputText value="#{trip.getStartDateDate()}"
                style="width: 80%;text-align: center" rendered="#{!tripMgrBean.isEditable(trip.id)}">
                <f:convertDateTime type="date" dateStyle="short" timeZone="Europe/Oslo" pattern="#{msg['calendar.datePattern']}"/>
            </h:outputText>
            <rich:calendar value="#{trip.startDate}" buttonIcon="/images/icons/calendar.gif"
                enableManualInput="true"
                converterMessage="#{msg['label.wrong']} #{msg['label.dateformat']}"
                locale="#{userMenuBean.userLocale}"
                direction="auto"
                popup="true"
                showInput="true"
                showApplyButton="false"
                datePattern="#{msg['calendar.datePattern']}"
                inputSize="13"
                cellWidth="24px"
                cellHeight="22px"
                rendered="#{tripMgrBean.isEditable(trip.id)}"/>
    </rich:column>

then it gets rendered every time =)
set the value of buttonIcon to whatever you like.
note, you can also use a text if you like, instead, e.g.: buttonLabel="Choose"

No comments:

Post a Comment