JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Web Framework » JSF  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 managed-property 注入 java.util.Date
sikeh





發文: 12
積分: 0
於 2008-11-01 20:36 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Hi,

有个JSF的问题请教一下大家:
有一个managed-bean
1
2
3
4
5
6
7
8
9
10
11
public class CalendarPageBean {
    private Date selectedDate;
 
    public Date getSelectedDate() {
        return selectedDate;
    }
 
    public void setSelectedDate(Date selectedDate) {
        this.selectedDate = selectedDate;
    }
}

怎么在faces-config里注入selectedDate,<property-class>是写java.util.Date吗,<value>应该怎么写呢?
1
2
3
4
5
6
7
8
9
10
<managed-bean>
        <managed-bean-name>calendarPageBean</managed-bean-name>
        <managed-bean-class>demo.bean.CalendarPageBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
        <managed-property>
            <property-name>selectedDate</property-name>
            <property-class>?</property-class>
            <value>?</value>
        </managed-property>
    </managed-bean>


Regards,
Sike


reply to postreply to post
話題樹型展開
人氣 標題 作者 字數 發文時間
1150 managed-property 注入 java.util.Date sikeh 851 2008-11-01 20:36
1020 Re:managed-property 注入 java.util.Date sikeh 626 2008-11-14 22:34
» JWorld@TW »  Web Framework » JSF

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8