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

» JWorld@TW » Web Framework » JSF  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to postflat modego to previous topicgo to next topic
己加入精華區
by koji at 2006-06-27 11:52
本主題所含的標籤
無標籤
作者 使用IBM RSA工具開發JSF [精華]
uxa





發文: 489
積分: 6
於 2006-06-27 11:34 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
小弟最近都在使用IBM的產品來開發一個JSF專案,因為IBM很雞婆地會幫我產生一堆我覺得我用不太到的東西,以下來說明一下它會產生的code

一、<hx:scriptCollector> (jsp檔中若有使用<hx:……>tag時,需要加上)
  scriptCollector is a component that allows other components on the page better control where and how JavaScript is emitted into the HTML page.
二、faces-config.xml中IBM加上的application設定
1
2
3
4
  <application>
    <variable-resolver>com.ibm.faces.databind.SelectItemsVarResolver</variable-resolver>
    <property-resolver>com.ibm.faces.databind.SelectItemsPropResolver</property-resolver>
  </application> 

  SelectItems resolvers allow you to bind f:selectItems tags to things like String[], so that you don't need to create SelectItem[] yourself.


三、faces-config.xml中IBM加上的lifecycle設定
1
2
3
  <lifecycle>
    <phase-listener>com.ibm.faces.webapp.ValueResourcePhaseListener</phase-listener>
  </lifecycle>

  ValueResourcePhaseListener is used by components that
can work with downloaded binary data (such as image or link).


四、web.xml中IBM加上的context-param設定
1
2
3
4
5
6
7
8
9
10
  <context-param>
    <param-name>com.ibm.ws.jsf.JSP_UPDATE_CHECK</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>
      com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP
    </param-name>
    <param-value>true</param-value>
    </context-param>

  The two context-params in web.xml are specific to IBM implementation and won't have any effect in other implementations.

五、web.xml中servlet設定
1
2
3
4
5
6
7
8
9
10
11
  <servlet id="Servlet_1143451771583">
    <servlet-name>JS Resource Servlet</servlet-name>
    <servlet-class>
      com.ibm.faces.webapp.JSResourceServlet
    </servlet-class>
    <load-on-startup>-1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>JS Resource Servlet</servlet-name>
    <url-pattern>/.ibmjsfres/*</url-pattern>
  </servlet-mapping>

  JS Resource Servlet is used to serve JavaScript libraries and associated resource (such as imaged) when requested by components on the page.

資料來源:http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?message=13822008&cat=24&thread=119556&treeDisplayType=threadmode1&forum=430#13822008


uxa edited on 2006-06-27 11:37
reply to postreply to post
☆只要努力就有希望☆
話題樹型展開
人氣 標題 作者 字數 發文時間
6969 [精華] 使用IBM RSA工具開發JSF uxa 2285 2006-06-27 11: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