Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tapestry. output of Date

Tags:

java

tapestry

how to do?

<t:output format="literal:dd.MM.yyyy" value="myItem.activity.do_create_date"/>

I want to know how to format output of date?

like image 613
mr. Vachovsky Avatar asked Dec 12 '22 14:12

mr. Vachovsky


1 Answers

What you have works (in Tapestry 5.2.4). What problem are you having or what more specifically are you trying to do? If you want to get the format from your Java class, here's are example snippets.

.java file:

private String format;
private Date date;

public void setupRender() {
    // just an example
    format = "dd.MM.yyyy";
    date = new Date();
}

public String getFormat() {
    return format;
}

public Date getDate() {
    return date;
}

.tml file:

<t:output format="format" value="date" />
like image 152
WhiteFang34 Avatar answered Dec 28 '22 09:12

WhiteFang34