flex 사용자정의 manifest 만들기
flex에서 mxml-manifest.xml파일은 mxml파일 개발시 mx의 네임스페이스로 사용할수 있는 컴포넌트 목록을 관리한다.
이와동일한 형태로 사용자 정의 manifest파일을 정의할수 있다.
주로 common하게 사용할수 있는 컴포넌트 목록을 관리하면 좀 더 효율적으로 사용할 수 있다.
플렉스 개발시 중구난방으로 여러가지 패키지별 네임스페이스가 존재하는데 이걸 하나로 묶어 줄수 있다.
1. flex-config.xml에서 아래와 같이 mxml 네임스페이스 정의 밑줄에 사용할 manifest파일을 추가한다.
<namespace uri="http://www.macromedia.com/2003/mxml">
<manifest>/WEB-INF/flex/mxml-manifest.xml</manifest>
</namespace>
<namespace uri="http://www.handysoft.co.kr/2005/mxml">
<manifest>/WEB-INF/flex/sample-manifest.xml</manifest>
</namespace>
2. sample-manifest.xml파일에 정의한 컴포넌트이름과 경로를 작성한다.
<?xml version="1.0"?>
<componentPackage>
<component id="IconLabel" class="com.hs.common.IconLabel"/>
<component id="LinkLabel" class="com.hs.common.LinkLabel"/>
<component id="TreeTable" class="com.hs.tree.TreeTable"/>
</componentPackage>
3. mxml의 네임스페이스 uri에 "http://www.handysoft.co.kr/2005/mxml"를 선언하면 sample-manifest.xml에 정의된 컴포넌트를 사용할수 있다.
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
xmlns:sample="http://www.handysoft.co.kr/2005/mxml"
width="100%" height="100%">
<sample:IconLabel/>
<sample:LinkLabel/>
<sample:TreeTable/>
</mx:Application>
-----------------------------------------------------------------------------------------------------
플렉스 라이브러리 프로젝트 > Properties > FlexLibrary Compiler 에서
Namespace URL을 적고
Manifest file 에 정의 한 xml을 넣으면 된다.

