I have an array of objects put in the FlowScope by a managed bean.
They belong to my class Question, among its properties there is a
String named mask. It provides the value for the pattern attribute of
the ConvertDateTime component. What I need to do is iterate the array
to display all the potential date options from my class.

I have the code below using an iterator but I am having an issue with
the setting of the pattern in the ConvertDateTime:

A wired value like this: pattern="#{pageFlowScope.questions[4].mask}"
works fine, but when I use the expected question.mask instead, the
value is never set properly in the ConvertDateTime. I am not sure if
this is related with the fact that var property on the iterator does
not support EL (according to documentation). I made a fresh install of
trinidad+examples but found nothing, the components seem to be well
used according to components demo.

I am 100% sure the bean and the flowscope have the right values on
them. I can't upgrade the version due to certain constraints.

Does anyone have a hint or work-around to put me in the right direction?

<tr:iterator id="question" var="question" varStatus="stat"
        value="#{pageFlowScope.questions}">
                                        
                <tr:inputDate id="answer"
                        rendered="#{question.options == null and question.type 
== 'date'
and question.mask != 'short date' and question.mask != 'long date'}">
                        <tr:convertDateTime 
pattern="#{pageFlowScope.questions[4].mask}"
                                
secondaryPattern="#{messages.values.rtdsServiceQuestionMaskDate}"
                                
messageDetailConvertDate="#{messages.values.pageQAValidationInvalidDate}" />
                </tr:inputDate>
                . . .
        <tr:spacer height="5" />
</tr:iterator>

Thannks for your help!
 -S.

-- 
Sergio Calvo Abarca.
Iota Chi Theta Upsilon Sigma

Reply via email to