1
나는 ajax 호출을 사용하고 있기 때문에 뷰 범위입니다. RequestController
(@ManagedBean 및 @ViewScoped)입니다.jsf 뷰에서 세션 객체 검색
내가 버튼
<p:commandButton action="#{requestController.requestDetail()}" icon="ui-icon-search" title="Detalhes">
<f:setPropertyActionListener target="#{requestController.backing.selectedRequestVO}" value="#{order}" />
</p:commandButton>
이 방법은 내 데이터 테이블의 선택된 객체를 수신하고, 세션 설정과 결과 DataTable에 각 결과를 가지고, 그것을 작동되면, 문제는 내가 돈 내 세션에서이 세션 객체를 가져 오는 방법을 알지 못합니다.
public void requestDetail() throws IOException {
FacesContext context = FacesContext.getCurrentInstance();
context.getExternalContext().getSessionMap().put("requestDetail",backing.selectedRequestVO);context.getExternalContext().redirect(context.getExternalContext().getRequestContextPath() + "/views/request/detail.html");
}
이 개체에는 요청 세부 정보가 있으므로 내보기에서 액세스해야합니다.
을 다음과 같이 그럼 당신은 내 친구 정말 좋은 액세스
=) – Gerep
천만에요와
. 리디렉션 방식을 간소화했습니다. – BalusC
이'@ SessionScoped'에 대한 변경 사항이 작동하지 않습니까? – Gerep