Sylvain Wallez wrote:
oceatoon wrote:

This was my first attempt: mapping my repeater on the selection-list. but my
problem was about internationalisation, I managed to map my repeater on the
selectionlist files content, but internationalisation wasn't made?
because widget.setValue() won't take a Node as parameter, and as a String
the i18n:text tag aren't tranformed :(
(even though my pipeline ends with the right transformation)



Mmh.. I see the problem. Are the i18n keys related to the selection list item values, i.e. can you use an item's value to build the corresponding i18n key? If yes, then that's a good candidate for the implementation of CForms template as JX macros I'm about to commit today.


Using these macros (assuming the selection-list's value is stored in a "item" output widget), you'll be able to write:
<ft:repeater id="repeat">
<i18n:text key="${widget.getChild('item').getValue()}"/>

<i:text>my.key.<wt:widget id="item"/></i:text>

Works for me. Widget should be of type <wd:output/>, or you'll need some XSLTing in between FormTransformer and I18nTransformer.


 <ft:widget id="other-widget"/>
</ft:repeater>


Vadim

Reply via email to