Revision history [back]

click to hide/show revision 1
initial version

asked 2013-09-14 21:11:21 +0800

phil21 gravatar image phil21

Listbox Template format value

<listbox id="newsListbox" vflex="1"> <listhead> <listheader>Erstellt</listheader> <listheader>Zuletzt bearbeitet</listheader> <listheader>Titel</listheader> <listheader>Patient</listheader> <listheader></listheader> </listhead> <template name="model"> <listitem value="${each}"> <listcell> <label value="${each.created}"/> </listcell> <listcell> <label value="${each.lastChanged}"/> </listcell> <listcell> <label value="${each.title}"/> </listcell> <listcell> <label value="${each.targetUser}"/> </listcell> <listcell> <button forward="onClick=newsListbox.onNewsDelete" image="/imgs/cross.png" width="36px"/> </listcell> </listitem> </template> </listbox>

Listbox Template Can't format valuedate-field in ZUL

Hello,

I am trying to format a date-field in a listbox, but can't figure out how I should do that in the ZUL file. The filed value="${each.created}" is of type java.util.Date, so I would like to use another format, as the default one. Do I need to move the list-code to Java, or is there another possibility of doing the formatting in ZUL?

Thanks,

Phil

Here is the current implementation of the listbox:

<listbox id="newsListbox" vflex="1"> <listhead> <listheader>Erstellt</listheader> <listheader>Zuletzt bearbeitet</listheader> <listheader>Titel</listheader> <listheader>Patient</listheader> <listheader></listheader> </listhead> <template name="model"> <listitem value="${each}"> <listcell> <label value="${each.created}"/> </listcell> <listcell> <label value="${each.lastChanged}"/> </listcell> <listcell> <label value="${each.title}"/> </listcell> <listcell> <label value="${each.targetUser}"/> </listcell> <listcell> <button forward="onClick=newsListbox.onNewsDelete" image="/imgs/cross.png" width="36px"/> </listcell> </listcell>
</listitem> </template> </listbox>

Can't format date-field in ZUL

Hello,

I am trying to format a date-field in a listbox, but can't figure out how I should do that in the ZUL file. The filed value="${each.created}" is of type java.util.Date, so I would like to use another format, as the default one. Do I need to move the list-code to Java, or is there another possibility of doing the formatting in ZUL?

Thanks,

Phil

Here is the current implementation of the listbox:

<listbox id="newsListbox" vflex="1">
                    <template name="model">
                        <listitem value="${each}">
                            <listcell>
                                <label value="${each.created}"/>
value="${each.created}" />
                            </listcell>
                            <listcell>
                                <label value="${each.lastChanged}"/>
value="${each.lastChanged}" />
                            </listcell>
                            <listcell>
                                <label value="${each.title}"/>
value="${each.title}" />
                            </listcell> 
</listitem> </template> </listbox>

</listbox>

Can't format date-field in ZUL

Hello,

I am trying to format a date-field in a listbox, but can't figure out how I should do that in the ZUL file. The filed value="${each.created}" value="${each.created}" is of type java.util.Date, java.util.Date, so I would like to use another format, as the default one. Do I need to move the list-code to Java, or is there another possibility of doing the formatting in ZUL?

Thanks,

Phil

Here is the current implementation of the listbox:

<listbox id="newsListbox" vflex="1">
                    <template name="model">
                        <listitem value="${each}">
                            <listcell>
                                <label value="${each.created}" />
                            </listcell>
                            <listcell>
                                <label value="${each.lastChanged}" />
                            </listcell>
                            <listcell>
                                <label value="${each.title}" />
                            </listcell>                     
                        </listitem>
                    </template>
                </listbox>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More