自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle struts2中相關(guān)日期輸入顯示某些問題的方案

數(shù)據(jù)庫 Oracle
我們今天主要介紹的是Oracle struts2中的相關(guān)日期的輸入顯示某些問題,以下就是文章的相關(guān)詳細(xì)內(nèi)容的介紹,望你會(huì)有所了解。

以下的文章主要介紹Oracle struts2中的相關(guān)日期輸入顯示問題,我們都知道Oracle struts2 中的相關(guān)默認(rèn)的日期輸出和我們的中文相關(guān)習(xí)慣并不符合,下面就是我知道的在struts2中進(jìn)行日期格式化輸出的幾種方式。

1.利用 <s:date>進(jìn)行格式化.如:

 

  1. <s:date name="birthday" format="yyyy-MM-dd"/> 

就是將屬性birthday按yyyy-MM-dd的格式進(jìn)行輸出.

2.利用<s:param>進(jìn)行格式化.如:

 

  1. <s:textfield name="birthday" > 
  2. <s:param name="value"><s:date name="birthday" format="yyyy-MM-dd"/></s:param> 
  3. </s:textfield> 

 

或者

  1. <input type="text" value="<s:date name="birthday" format="yyyy-MM-dd" />/> 

Oracle struts2中的日期期輸入顯示問題還有一種是通過國(guó)際化的方式來進(jìn)行:

首先在struts.properties中配置struts.custom.i18n.resources=globalMessages

然后在globalMessages_zh_CN.properties和globalMessages_en_US.properties文件中添加如下內(nèi)容:

 

  1. global.datetime = {0, date, yyyy-MM-dd HH:mm:ss}  
  2. global.date = {0, date, yyyy-MM-dd}  

 

***在頁面中使用下面的語句就可以實(shí)現(xiàn)日期的格式化輸出了.

  1. <s:textfield name="birthday" value="%{getText('global.date',{birthday})}"/> 

 golbal.date樣式

  1. <s:textfield name="birthday" value="%{getText('global.datetime',{birthday})}"/>  

global.datetime樣式,上述的相關(guān)內(nèi)容就是對(duì)Oracle struts2中的日期期輸入顯示問題的描述,希望會(huì)給你帶來一些幫助在此方面。

【編輯推薦】

  1. Oracle數(shù)據(jù)如何獲取方式進(jìn)行測(cè)試
  2. Oracle Decode函數(shù)的主要功能介紹
  3. Oracle外鍵與其主鍵的實(shí)際應(yīng)用方案
  4. Oracle delete執(zhí)行過程的流程介紹
  5. Oracle小數(shù)點(diǎn)的實(shí)際保留問題的4方案
責(zé)任編輯:佚名 來源: 博客園
相關(guān)推薦

2010-05-10 15:06:37

Oracle stru

2009-07-29 09:54:34

struts2和str

2009-06-26 17:15:44

Struts2

2009-06-25 15:11:28

Struts2教程Struts2程序

2012-05-10 14:00:06

StrutsjsonJava

2009-02-04 10:51:07

2009-06-04 09:20:19

struts2 if標(biāo)使用

2009-07-14 17:10:44

struts2webwork

2009-06-04 10:44:18

struts2 亂碼解決辦法

2011-07-18 14:43:40

JSON模擬加載初析

2009-07-03 09:35:57

Struts2 JSP

2009-06-04 08:34:24

Struts2配置struts.xml

2009-06-18 11:37:24

Struts2中ForJavaScript

2009-06-05 10:05:50

struts menustruts2

2011-04-28 09:52:04

Struts2

2011-05-13 09:53:02

strutsAjax

2009-06-25 15:26:25

Struts2教程struts.xml常

2011-08-19 13:13:14

struts2Java

2013-07-19 09:36:04

struts2struts2漏洞

2009-06-03 14:19:34

Struts2Guice
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)