You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Nikita Shah <ni...@yahoo.com> on 2006/01/24 07:11:30 UTC

Jenia popup inside TabbedPanel

 Hi all
  
  I have a situation wherein I have tabbedPanel having jsp page included on each tab.
  On each jsp page I have 3 buttons for Add/Edit/Delete . On click on  these buttons a popup should come for addint the fields. Now I have  used jenia popupFrame for these, it requires the buttons to be inside  the h:form element.
  
  But the problem is tabbedPanel already have a form tag that is  inline(this I could see on viewing page source). So how can I have a  form tag inside another form tag. Also I get javascript error for this.
  
  Below is my parent jsp page having tabs.
  
  <%@ page contentType="text/html"%>
  <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
  <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
  
  <t:panelTabbedPane styleClass="tabs"
                   activeTabStyleClass="active"
                    inactiveTabStyleClass="inactive"
                   activeSubStyleClass="activeSub"
                    inactiveSubStyleClass="inactiveSub"
                    tabContentStyleClass="tabContent"
                   cellpadding="0"
                   cellspacing="0"
                   width="100%">
      
      <f:subview id="pmtabview" >
          <t:panelTab id="UserTab" label="Users" >
              <jsp:include page="userList.jsp"/>
          </t:panelTab>
      </f:subview>        
      
  </t:panelTabbedPane>
  
  The userList.jsp page is below :
  
  <%@ page contentType="text/html"%>
  <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
  <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
  <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
  <%@ taglib uri="http://www.jenia.org/jsf/popup" prefix="jp" %>
  
  <t:dataTable id="taskTable" styleClass="userTable"
      rowClasses="userTable_Row1,userTable_Row2" var="user"
      columnClasses="userTable_Column"
      headerClass="userTable_Header"
      styleClass="sortable"
      border="1"
      value="#{adminHandler.users}"     
      preserveDataModel="false" >
      
      <t:column>
          <f:facet name="header">
              <h:outputText value="Name" />
          </f:facet>
          <h:outputText value="#{user.name}" />    
      </t:column>
      
      <t:column>
          <f:facet name="header">
              <h:outputText value="FullName" />
          </f:facet>
          <h:outputText value="#{user.fullName}" />    
      </t:column>
      
      <t:column>
          <f:facet name="header">
              <h:outputText value="E-mail" />
          </f:facet>
          <h:outputText value="#{user.email}" />    
      </t:column>
     
  </t:dataTable>
  
  <h:form id="useradd">
      <jp:popupFrame scrolling="no" height="150px" width="350px" center="true"
                  actionOpen="#{userActions.goAddPopup}" 
                  actionClose="#{userActions.popupReturn}"  >
          <h:commandButton id="addbutton" value="Add" 
                   styleClass="normalbutton" style="float:  left;width:30px"
                   onmouseover="hoverButtonClass(this)"  onmouseout="normalButtonClass(this)" >         
          </h:commandButton>
      </jp:popupFrame>
  </h:form>
  
  Here on the userList.jsp I want to have Add button for opening a popup.
  But I get javascript error saying "f has no properties"  where f is inside javascript on some dummyForm.
  
  How do I solve this problem.? Also is it that we cannot open jenia popup inside myfaces tabbedPanel.. ?
  What is the workaround for this?
  
  Any help will be appreciated.
  
  TIA
  ~Nikita
  

		
---------------------------------
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.