페이지간에 전환 할 때 양식 페이지에 상태를 캐시하고 싶습니다.Eclipse 스카우트 캐시 양식 페이지
So : 양식이있는 3 페이지가 있으며 하나에서 다른 것으로 전환 할 때 데이터를 양식에 유지하고 싶습니다.
나는이 발견 https://wiki.eclipse.org/Scout/Concepts/Page_Detail_Form@Override
protected void execPageActivated() throws ProcessingException {
if (getDetailForm() == null) {
PersonDetailForm form = new PersonDetailForm();
form.setPersonNr(getPersonNr());
setDetailForm(form);
form.startView();
}
}
및 setDetailForm()가 캐시
As already said, attaching a detail form to a page means the detail form will automatically be
hidden when the page gets deactivated and shown when the page gets activated (see
PageDetailFormChanged on Desktop). So the detail form actually gets cached and does not need to
be started more than once per page. This requires that the form does not get closed.
을 datas 그러나 이것은 나를 위해 작동하지 않는 것을 말한다.
내 코드
@Override
protected void execPageActivated() throws ProcessingException {
///Create and open form
if (getDetailForm() == null) {
MarginCalculationForm form = new MarginCalculationForm();
form.startModify();
setDetailForm(form);
}
super.execPageActivated();
}
이지만 마지막 페이지에 유지됩니다. 예를 들어
:
내가 페이지 A를 가지고 있다면, B, C와 I는 페이지 A를 열는 그것 자체를 만들고 detailForm로 설정(). 그러면 페이지 B를 열어도 괜찮습니다.
I : 다음 페이지 A를 클릭하면 detailForm가() (그렇지 않은) null는 아니고, 그래서 페이지 B에 남아하지만 다시 확인
EDIT (페이지 A를가는 insted) getDetailForm()이 올바른 양식을 반환하고 있지만 super.execPageActivated()가 작동하지 않는 것 같습니다.
내 작업 영역에서 문제를 재현하는 관리하지 않습니다. execPageActivated()에 중단 점이 있습니다. 처음 페이지를 클릭하면 getDetailForm()이 null이고 양식이 인스턴스화됩니다. 나는 다른 곳을 클릭한다. 그 다음에 같은 페이지를 다시 방문하면 getDetailForm()은 null이 아니며 이전 instanciated 양식 (이 페이지 인스턴스에 해당)이 다시 표시됩니다. "페이지가 활성화 될 때마다 양식을 새로 고침"한다는 것은 무엇을 의미합니까? – Jmini
나는 나의 질문을 편집한다. 이전 동작은 내 서버를 다시 시작하지 않아서였던 것 같습니다. –
클라이언트 콘솔 로그에 stacktrace 또는 이와 유사한 항목이 있습니까? – Jmini