3 Replies Latest reply on Apr 9, 2007 11:44 AM by Sergey Smirnov

    a4j:include not working

    rachana patel Newbie

      Hi,
      This is how i am trying to include opportunity.jsp in search.jsp.

      <h:panelGroup id="opportunity">
       <a4j:include viewId="/opportunity.jsp" />
       </h:panelGroup>


      but above doesnt work. It gives following error:

      javax.servlet.jsp.JspException
       at org.ajax4jsf.taglib.ajax.IncludeTag.doStartTag(IncludeTag.java:103)
       at _search._jspService(_search.java:4570)
       [/search.jsp]


      also I saw in logs that none of the accessors related to fields in opportunity.jsp get called in the associated managed bean. Please note that search.jsp and opportunity.jsp are bound to same managed bean.

      Any pointers will be very helpfull !
      Thanks in advance..,

        • 1. Re: a4j:include not working
          Sergey Smirnov Master

          what is the content of the /opportunity.jsp ?

          • 2. Re: a4j:include not working
            rachana patel Newbie

            Thanks for replying!
            following is the content of opportunity.jsp:

            <%@ page contentType="text/html;charset=ISO-8859-1"%>
            <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
            <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
             <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
             <%@ taglib uri="http://jsftutorials.net/htmLib" prefix="htm" %>
            <f:loadBundle basename="com.apple.ist.isell.resources.message_resources" var="msg"/>
            
             <h:form id="form2">
             <a4j:keepAlive beanName="person" />
             <a4j:outputPanel ajaxRendered="true" >
            
             <h:inputHidden id="hdnOppStatus" value="#{backing_CustSearchBean.hdnOppStatus}" />
             </a4j:outputPanel>
             <a4j:jsFunction name="getEvents" action="#{backing_CustSearchBean.getEvents}" oncomplete="enableOpp()">
             <a4j:actionparam name="camp_name" value="fromOnchange" />
             </a4j:jsFunction>
             <htm:div styleClass="component" id="oppor_div" style="height: 392px;" >
             <htm:table>
             <htm:tr>
             <htm:td styleClass="sect_header" >
             <h:outputLabel value="#{msg.isellForm_Opportunity_Header}" />
             </htm:td>
            
            
             <htm:td styleClass="sect_storeheader" align="right" style="position: relative;">
             <a4j:commandButton value="#{msg.isellForm_Opportunity_Refresh}" style="cursor: pointer" />
             </htm:td>
            
             <htm:td styleClass="sect_storeheader" id="oppsave" align="right" style="position: absolute;display: none">
             <a4j:commandButton value="#{msg.isellForm_Opportunity_Save}" style="cursor: pointer;" actionListener="#{backing_CustSearchBean.saveOpportunity}" oncomplete="enableOpp()">
             <f:param name="bo_id" value="#{processScope.singleCustData.bo_id}"/>
             </a4j:commandButton>
             </htm:td>
             </htm:tr>
             </htm:table>
            
            
             <htm:div id="OppGp" rendered="#{processScope.rederInnerOpp == 'true'}">
             <h:panelGrid columns="1" style="vertical-align: center,padding-left: 200px; font-weight: bold; background-color:#EEEEEE; color: #555555;border-width: 1px; border-color:#999999;">
             <h:outputText style="vertical-align: center,padding-left: 200px; font-weight: bold; background-color:#EEEEEE; color: #555555;border-width: 1px; border-color:#999999;"/>
             </h:panelGrid>
            
            
             <h:panelGrid columns="1" columnClasses="dt_small" style="vertical-align: center,padding-left: 200px; font-weight: bold; background-color:#EEEEEE; color: #555555;border-width: 1px; border-color:#999999;" >
             <f:facet name="header">
             <h:outputText value="#{msg.isellForm_Opportunity_Contact_Permission}" styleClass="dt_small" style="vertical-align: center,padding-left: 200px; font-weight: bold; background-color:#EEEEEE; color: #555555;border-width: 1px; border-color:#999999;"/>
             </f:facet>
            
             </h:panelGrid>
            
             <h:panelGrid columns="1" style="vertical-align: center,padding-left: 200px; font-weight: bold; background-color:#EEEEEE; color: #555555;border-width: 1px; border-color:#999999;">
            
             <h:outputText style="vertical-align: center,padding-left: 200px; font-weight: bold; background-color:#EEEEEE; color: #555555;border-width: 1px; border-color:#999999;"/>
             <h:outputText style="vertical-align: center,padding-left: 200px; font-weight: bold; background-color:#EEEEEE; color: #555555;border-width: 1px; border-color:#999999;"/>
            
             </h:panelGrid>
            ....
            .....
            .....
            
            </h:form>
            
            


            • 3. Re: a4j:include not working
              Sergey Smirnov Master

               

              .......
              <h:outputText style="vertical-align: center,padding-left: 200px; font-weight: bold; background-color:#EEEEEE; color: #555
              555;border-width: 1px; border-color:#999999;"/>
              .......

              it is a very interesting include. A lot of code that does not presume any output recognized visually.