commandButton
을 클릭 한 후 dialog
이 나타나기를 원하지만 전혀 표시되지 않습니다. 버튼이 대화 상자를 표시하는 대신 양식을 제출한다고 생각합니다. 더 많은 것은 무엇입니까 'Cancel' commandButton
을 만들려고 노력했는데 또한 정상적으로 작동하지 않습니다. 먼저 클릭 할 때만 작동합니다 (commandButton
을 클릭하면 dialog
을 열 수 있습니다. 취소 버튼이 더 이상 작동하지 않습니다.)).Primefaces 대화 상자가 표시되지 않습니다
<ui:define name="content">
<p:dialog id="dlg" header="#{messages.chooseSkillLevel}" widgetVar="dlg" modal="true" dynamic="true">
<h:form>
<h:dataTable value="#{editSkills.skillsAndLevels}" var="skillslevel">
<h:column>
#{skillslevel.skill.umiejetnosc}
</h:column>
<h:column>
<p:selectOneMenu value="#{skillslevel.level}" >
<f:selectItems value="#{editSkills.levels}" var="level" itemLabel="#{level.stopien}" itemValue="#{level.id}" />
</p:selectOneMenu>
</h:column>
</h:dataTable>
<p:commandButton value="#{messages.confirm}" action="#{editSkills.showSkillsAndLevels}" oncomplete="dlg.hide();" />
<p:commandButton value="#{messages.cancel}" onclick="dlg.hide()"/>
</h:form>
</p:dialog>
<h:form>
<p:messages/>
<p:pickList value="#{editSkills.skills}" var="skill" effect="none" converter="#{picklistConverter}"
itemValue="#{skill.id}" itemLabel="#{skill.umiejetnosc}"
showSourceFilter="true" showTargetFilter="true" filterMatchMode="contains"
addLabel="#{messages.add}" removeLabel="#{messages.remove}" removeAllLabel="#{messages.removeAll}" >
<f:facet name="sourceCaption">#{messages.skillsList}</f:facet>
<f:facet name="targetCaption">#{messages.yourSkills}</f:facet>
<p:ajax event="transfer" listener="#{editSkills.onTransfer}" />
<p:column style="width:100%;">
#{skill.umiejetnosc}
</p:column>
</p:pickList>
<p:commandButton value="#{messages.confirm}" actionListener="#{editSkills.afterSubmit}" update=":dlg" oncomplete="dlg.show();" /> THIS IS THE MENTIONED BUTTON
<p:commandButton value="#{messages.cancel}" action="profile" immediate="true"/> THIS IS THE CANCEL BUTTON
</h:form>
</ui:define>
내가 무엇을해야 그것이 잘 작동하려면 :
여기 내 .xhtml입니까?
[re-posting] (http://stackoverflow.com/q/14381602/1317692) 이유는 무엇입니까? – Fallup
@Fallup, 재 게시자가 아닙니다. 두 질문에 서로 다른 관심사가 있습니다 – kolossus
@kolossus 그들은 서로 다르지 않습니다. 첫 번째 해결책은이 문제를 일으켰습니다. 즉, 문제가 발생한 것이 었습니다. Btw 나는 OP가 어떻게 대화 상자를 열 수 없으면 대화 상자 내의 버튼에 관한 첫 번째 해결책이 잘 작동하는지 알 수 있습니다. 그는 그것이 작동하는지 확인할 수 없다면 그것을 받아 들여서는 안됩니다. – Fallup