배경
관리 bean은 web.xml 파일을 통해 매개 변수를 구성해야합니다.관리 Bean의 컨텍스트 초기화 매개 변수
가reporting.server.protocol
정의의 소스는 다음과 같다 :
<context-param>
<description>Defines the data transport mechanism to ret...</description>
<param-name>reporting.server.protocol</param-name>
<param-value>http</param-value>
</context-param>
빈 드러내는를 web.xml 파일은 JDeveloper의 (11.1.2.3)에 구성된 콘텍스트 초기화 파라미터로는 다음을 정의 reportServerProtocol
의 공용 접근 메서드
빈의 소스 유사합니다
@ManagedBean
@RequestScoped
public class OracleReportBean extends ReportBean {
@ManagedProperty("#{initParam['reporting.server.protocol']}")
private String reportServerProtocol = URLReportImpl.DEFAULT_PROTOCOL;
// ...
}
문제
차라리 FacesContext을 통해보다 컨텍스트 초기화 매개 변수를 사용하여 빈을 초기화하고 싶습니다. adfc-config.xml
(참고 : faces-confg.xml
)에서, 몇 가지 예는 initParam
에 대한 참조를 보여
<managed-bean>
<managed-bean-name>reportBean</managed-bean-name>
<managed-bean-class>ca.corp.report.view.OracleReportBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>reportServerProtocol</property-name>
<property-class>java.lang.String</property-class>
<value>#{initParam['reporting.server.protocol']}</value>
</managed-property>
...
</managed-bean>
핵심 라인이 값 요소 #{initParam['reporting.server.protocol']}
것. 그러나 JDeveloper는 해당 행이 올바르지 않은 것으로 표시합니다. 즉, initParam
컨텍스트는 adfc-confing.xml
에서 사용할 수 없습니다.
오류 : "EL 토큰 initParam
알 수 없음."
질문
EL 사용 방법 컨텍스트 초기화 파라미터는 선언적 ADFc 내에서 관리 빈을 구성 할 수 있습니다?
관련 링크 당신이 시도 할 수있는 UI 계층에서
- How to inject entire managed bean via @ManagedProperty annotation?
- http://balusc.blogspot.ca/2011/09/communication-in-jsf-20.html
- https://stackoverflow.com/tags/el/info
- http://www.oracle.com/technetwork/developer-tools/adf/learnmore/43-remote-task-flow-169185.pdf
- http://docs.oracle.com/cd/E25178_01/web.1111/b31974/taskflows_activities.htm