Hello
Does somebody know a solution for the problem described further down? Or has sombody an idea for a work-around?
Help is very welcome and aprechiated a lot!
Thanks in advance!
Stefan
Problem description
==============
We want to display a selection list with various dates from which the user can select exactly one date. The user selection serves as a filter for a list of orders.
The selection list displays on the html-page and works fine, B U T the labels are not transformed according to the pattern (dd.MM.yy) we defined in the model.xml. The labels are still in the format 2006-06-02 00:00:00.0 (like they were without any transformation).
Actual code (Java version: 1.4.2_12, Cocoon version: 2.1.9)
==========
sitemap.xmap:
...
<map:match pattern="*-display-pipeline">
<map:generate src="forms/{1}_template.xml"/>
<map:transform type="forms"/>
<map:transform type="i18n">
<map:parameter name="locale" value="de_CH"/>
</map:transform>
<map:transform src="resources/stylesheets/forms-styling.xsl"/>
<map:transform type="jx"/>
<map:transform type="i18n">
<map:parameter name="locale" value="de_CH"/>
</map:transform>
<map:serialize type="html"/>
</map:match>
...
filter.js:
...
//prepare the list with the available reception dates
max = g_orderForm.getReceptionDate().size();
g_listData.receptionDate = new Array(max);
iter = g_orderForm.getReceptionDate().iterator();
i = 0;
while(iter.hasNext()) {
//NOTE: element is of datatype="date"
element = iter.next();
g_listData.receptionDate[i] = {value:element, label:element};
i++;
}
...
form.showForm("filter-disply-pipeline", {"g_listData":g_listData});
filter_model.xml:
...
<fd:field id="filter_receptionDate">
<fd:datatype base="date"/>
<fd:selection-list type="flow-jxpath" list-path="g_listData/receptionDate" value-path="value" label-path="label" datatype="date" null-text="*">
<fd:convertor type="formatting">
<fd:patterns>
<fd:pattern>dd.MM.yy</fd:pattern>
</fd:patterns>
</fd:convertor>
</fd:selection-list>
</fd:field>
...
filter_template.xml
...
<td>
<ft:widget id="filter_receptionDate">
<fi:styling class='filter' size='1' onchange="_javascript_:sendForm('abc_sub_filter');"/>
</ft:widget>
</td>
- formatting problems with dates in flow-jxpath selectio... Stefan . Haeberling
- Re: formatting problems with dates in flow-jxpath... Simone Gianni
- Re: formatting problems with dates in flow-jx... Mark Lundquist
- Antwort: Re: formatting problems with dat... Stefan . Haeberling
- Antwort: Re: formatting problems with dates i... Stefan . Haeberling
