voyent
Component ace:dialog doesn't work  XML
Forum Index -> Components
Author Message
Maksim_A

Joined: 27/Feb/2018 02:01:24
Messages: 18
Offline


I'm using icefaces 4.2 and jsf 2.3. I'm trying to get dialog window on client side. My code:

Code:
<ace:dialog id="dialogWindow" modal="true" clientOnly="true" autoCentre="false">
 <div class="md-dialog">
 <f:facet name="header">
     <ui:fragment rendered="#{sC.isFileUpl==null}">
         <div class="md-dialog-header">
                     <h:outputText value="#{sC.mCompat.component.title}"/>
                     <h:commandLink partialSubmit="true"
                                      title="#{res['web_close]}"
                                      actionListener="#{sC.modComponent.closePopup}"
                                      styleClass="dialogButton" style="border: none;">
                         <ace:ajax/>
                         <img border="0" alt="#{res['web_close']}"
                              src="#{sC.style.closeIcon}"/>
                     </h:commandLink>
         </div>
     </ui:fragment>
 
     <ui:fragment rendered="#{sC.isFileUpl!=null}">
       <div class="mod-dialog-2">
                     <h:outputText value="#{sC.file.title}"/>
 
                     <h:commandLink partialSubmit="true"
                                      title="#{res['web_close']}"
                                      actionListener="#{sC.file.cancel}"
                                      styleClass="dialogButton"
                                      style="border: none;">
                         <ace:ajax/>
                         <img border="0" alt="#{res['web_close']}"
                              src="#{sC.style.closeIcon}"/>
                     </h:commandLink>
         </div>
     </ui:fragment>
 </f:facet>
 
 <f:facet name="body">
     <ui:fragment rendered="#{sC.isFileUpl==null}">
     <div class="#{sC.modComponent.component.fClass}">
         <ui:include src="#{sC.modComponent.component.facelet}">
             <ui:param name="#{sC.modComponent.component.paramName}"
                       value="#{sC.modComponent.component}"/>
         </ui:include>
     </div>
         <ace:contextMenu id="wdPopup">
             <c:forEach var="mItem" items="${menuBean.items}">
                 <ace:menuItem action="#{menuBean.action}">
                 </ace:menuItem>
             </c:forEach>
         </ace:contextMenu>
     </ui:fragment>
 </f:facet>


It's not work, but it seems that all actions are invoked (on the client and server side), judging by the logs. But when i'm changin ace:dialog to ice:panelPopup it's get window to me. How can i fix that? I should use ace, not ice component.

I'm trying to call a dialog like this:

Code:
JavaScriptRunner.runScript(FacesContext.getCurrentInstance(), "ice.ace.instance('dialogWindow').show();");


But on client side i got an error:
HTML parsing or JS evaluation error [code: 200]: Cannot read property 'show' of null
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team