양식에서 호출 할 때보 다 더 많이 표시되지 않습니다. <rich:modalPanel>
을 두 번 이상 표시하는 데 문제가 있습니다. <a4j:commandlink onclick="#{rich:component('mp')}.show()"
(rich:componentControl
도 시도한 양식)이 있습니다.rich : modalpanel은
이 접근법은 한 번 제대로 작동합니다. 모달 패널 안에는 제출 단추 (a4j:commandButton
)에 첨부 된 일부 동작이있는 새로운 양식이 있습니다. 이 작업이 완료되면 modalpanel은 위와 동일한 접근법을 사용하여 oncomplete="#{rich:component('mp')}.hide()"
으로 숨겨지며 명령 링크가 포함 된 양식이 다시 렌더링됩니다.
이제 문제는 modalpanel을 보여주는 commandLink가 더 이상 작동하지 않는다는 것입니다. onclick
이벤트에서 alert('something')
을 넣으면 onclick
이벤트가 발생하지만 모달 패널이 렌더링되지 않습니다.
감사
를 필요한 경우희망이 충분한 정보가 ... 나중에 일부 소스 코드를 추가 할 수 있습니다
편집 : 나는했습니다
<a4j:form prependId="false" ajaxSubmit="true">
<a4j:outputPanel id="createActivityPanel">
<h:panelGrid columns ="2">
<h:outputLabel value="#{msg.createActivityExpectedParticipantsLabel}" />
<h:panelGrid columns ="2">
<h:outputLabel value="#{msg.createActivityAvailablePointsLabel}: #{sessionBean.loggedInUser.letspoints}" />
<a4j:commandLink value="#{msg.createActivityGetMorePointsLinkLabel}" onclick="#{rich:component('convertPointsPanel')}.show()" />
<rich:inputNumberSlider id="participantsSlider" value="#{activityRequestBean.newActivityExpectedNoParticipants}" maxValue="#{activityRequestBean.maxNoParticipants}" />
</h:panelGrid>
</h:panelGrid>
</a4j:outputPanel>
</a4j:form>
<rich:modalPanel rendered="#{sessionBean.loggedIn}" id="convertPointsPanel" width="700" height="400">
<a4j:support event="onhide" reRender="createActivityPanel"></a4j:support>
<f:facet name="header">
<h:outputText value="Velg poeng fra kategorier for å konvertere" />
</f:facet>
<f:facet name="controls">
<a4j:form><a4j:commandButton id="closeButton" onclick="#{rich:component('convertPointsPanel')}.hide()" type="image" image="/img/close.gif"/></a4j:form>
</f:facet>
<a4j:form prependId="false" ajaxSubmit="true" id="convertPointsForm">
<h:panelGrid columns ="2">
<h:panelGroup layout="block" style="width:350px; float:left;">
<rich:dataList var="catscore" value="#{pointsRequestBean.scores}" id="activityPointSliderList">
<h:graphicImage height="30" width="30" value="#{catscore.usercategoryscore.category.imagepath}" />
<h:outputText value="#{catscore.usercategoryscore.category.name}" />
<rich:inputNumberSlider maxValue="#{catscore.usercategoryscore.score}" value="#{catscore.transferredScore}" step="2" />
</rich:dataList>
<a4j:commandButton value="Konverter" id="convertButton" action="#{pointsRequestBean.convertPoints}" oncomplete="#{rich:component('convertPointsPanel')}.hide()" reRender="createActivityPanel"/>
</h:panelGroup>
<h:panelGroup layout="block" style="width:350px; float:right; border-left: 1px solid #ACBECE; padding: 10px;">
<h:outputText value="kjøp poeng fra paypal?" />
</h:panelGroup>
</h:panelGrid>
</a4j:form>
</rich:modalPanel>
주의 사항 : 는 여기에 몇 가지 더 많은 코드입니다 양식 대신 패널을 다시 렌더링 할 때 조언을 따랐습니다.
내 문제도 해결했습니다. Tkz !! – velteyn