开发者

Syntax within a Seam page.xml to output current date?

Is it possible to something like the following to assign the 'occurredAt' attribute with a call using Seam's extended support for SEAM EL (seam 2.2)?

<navigation>
  <rule if-outcome="search">
   <out name="occurredAt" scope="event" value="#{new java.util.Date()}"/>
   <redirect view-id="/ui/search.xhtml"/>
  </rule>
 </na开发者_如何学Cvigation>


seam has built-in #{currentDate} factory method, so you can write;

<navigation>
  <rule if-outcome="search">
      <redirect view-id="/ui/search.xhtml">
         <param name="occurredAt" value="#{currentDate}"/>
      </redirect>
  </rule>
</navigation>

and you can access occuredAt parameter from search.xhtml

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜