아래의 형식으로 구성 요소 id = contractIdInputText를 명령 링크의 datatable 태그에서 참조하고 싶습니다. @all 대신에 render 속성에 id를 사용하고 싶습니다. 나는 id를 참조 할 수 없었기 때문에 아래의 @all을 사용했습니다. 데이터 테이블은 태그 바깥쪽에 있습니다. 내가 CommandLink는를 클릭하여 양식을 채울 때데이터 테이블 외부의 참조 양식 구성 요소 <h:form>
이<h:commandLink id="editLink" value="#{bundle.ListUnitEditLink}"
action="#{contractManager.updateContract}">
<f:ajax onevent="disablePK" render="@all" />
</h:commandLink>
링크에서 아약스의 전체 목적은 양식 구성 요소를 사용하지 않도록하는 것입니다
<h:form id="contracts">
<h:outputScript library="js" name="common.js" target="head"/>
<h:panelGrid columns="3" columnClasses="rightalign,leftalign,leftalign">
<h:outputLabel for="contractIdInputText" rendered="true" value="Contract Nooo.: " />
<h:inputText id="contractIdInputText" required="true" value="#contractManager.newContractId}" />
</form>
이
은 데이터 테이블의 CommandLink는 것입니다. 나는 또한 @all을 사용하여 (폼이 inputText가 비활성화 된 상태로 채워짐) 원하는대로 수행한다는 것을 알아 차렸다. 명령 링크에서 commandlink를 두 번 클릭해야만 폼에 대한 데이터 테이블이 다른 테이블로 채워질 수있다. 목. 왜 이런 일이 일어 났습니까?
전체 데이터 테이블을 태그에 넣고 명령 링크를 묶는 태그를 제거했습니다. 이것은 commandink에서 두 번 클릭하는 문제를 해결했습니다. –