1 Reply Latest reply on Jun 1, 2007 3:50 AM by Ilya Shaikovsky

    modalpanel

    Tony Tony Newbie

      Hi All,

      I have a problem in firing the event inside modalpanel when a table row is clicked. the "selectAccount" method does not get call. do i miss anything in here?

      Thanks for the feedback

      Cheers.

      here are code:

       <rich:panel id="newTransactionPanel" rendered="#{generalJournal.id gt 0}">
       <h:form>
       <s:decorate id="accDecorate" template="edit.xhtml">
       <ui:define name="label">Acc #:</ui:define>
       <h:inputText id="accNumber" value="#{transaction.account.accountIndex}" required="true"/>
       <a href="javascript:Richfaces.showModalPanel('accountPanel',{width:450, top:200});">Choose</a>
       </s:decorate>
       <s:decorate id="accNameDecorate" template="edit.xhtml">
       <ui:define name="label">Name:</ui:define>
       <h:outputText id="accName" value="#{transaction.account.name}"/>
       </s:decorate>
       <s:decorate id="debitDecorate" template="edit.xhtml">
       <ui:define name="label">Debit:</ui:define>
       <h:inputText id="debit" value="#{transaction.debit}" required="true" />
       </s:decorate>
       <s:decorate id="creditDecorate" template="edit.xhtml">
       <ui:define name="label">Credit:</ui:define>
       <h:inputText id="credit" value="#{transaction.credit}" required="true" />
       </s:decorate>
       <s:decorate id="memoDecorate" template="edit.xhtml">
       <ui:define name="label">Memo:</ui:define>
       <h:inputText id="memo" value="#{transaction.memo}"/>
       </s:decorate>
      
       <div class="buttonBox">
       <h:commandButton id="addTransaction" value="Add to ledger" action="#{gjAction.addTransaction}"/>
       </div>
      
      
       <rich:modalPanel id="accountPanel" minHeight="200" minWidth="450" height="200" width="500" zindex="2000">
       <f:facet name="header"><h:outputText value="Select Account"/></f:facet>
       <f:facet name="controls">
       <a href="javascript:Richfaces.hideModalPanel('accountPanel')">X</a>
       </f:facet>
       <rich:dataTable
       onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       cellpadding="0" cellspacing="0"
       columnsWidth="0px, 0px, 0px"
       border="0" var="_account" value="#{accountList}">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Account #" />
       </f:facet>
       <h:commandLink value="#{_account.account.display}" actionListener="#{gjAction.selectAccount}" id="select">
      
       </h:commandLink>
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Name" />
       </f:facet>
       <h:outputText value="#{_account.account.name}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Type" />
       </f:facet>
       <h:outputText value="#{_account.account.accountType.title}" />
       </rich:column>
       </rich:dataTable>
       </rich:modalPanel>
       </h:form>
       </rich:panel>
      


      here are the listener:

      
       public void selectAccount(ActionEvent e) {
       log.debug("selectAccount FROM GJ :: ");
       }