This content has been marked as final.
Show 3 replies
-
1. Re: Smooks-Is it possible to add dynamic date to the file name under file:fileNamePattern element?
beve Aug 2, 2010 2:14 AM (in response to boy18nj)Hi,
you could create a new Date instance in your smooks configuration and then referens it in the fileNamePattern element.
For example:
<smooks-resource-list> <jb:bean beanId="myDate" createOnElement="order-item"/> ... <file:outputStream resourceName="orderItemSplitStream" openOnElement="order-item"> <file:fileNamePattern>order-${order.orderItem.itemId}-${myDate?date}.xml</file:fileNamePattern> ... </smooks-resource-list>
The format that Freemarker uses, above specified as '?date', can be configured. You can find more information about the formatting here
Regards,
/Daniel
-
2. Re: Smooks-Is it possible to add dynamic date to the file name under file:fileNamePattern element?
boy18nj Aug 2, 2010 11:12 PM (in response to beve)Thanks Daniel, I will give it shot.
-
3. Re: Smooks-Is it possible to add dynamic date to the file name under file:fileNamePattern element?
boy18nj Aug 11, 2010 12:10 AM (in response to boy18nj)Hi Daniel,
I am trying to work out your example, where did are trying to create a new date instance here,.
<jb:bean beanId="myDate" createOnElement="order-item"/>
Is some code missing here?