2 Replies Latest reply on Jun 8, 2009 12:32 PM by Alan Gross

    Bug Internet Explorer? - a4j:mediaOutput createContent not c

    Alan Gross Newbie

      I think there is something going wrong in IE7.
      The following works perfectly:

      <a4j:mediaOutput element="img"
      cacheable="false" session="true"
      createContent="#{projectHandler.generateProjectStatusChartGlobal}"
      mimeType="image/jpeg" />
      


      This one is not working:
      <a4j:mediaOutput element="img" cacheable="false" session="true"
      createContent="#{projectHandler.generateStatusChartForProject}"
      value="#{projectHandler.projectRecord}"
      mimeType="image/jpeg" />
      


      The method #{projectHandler.generateStatusChartForProject} is never called.

      As soon as I remove the parameter
      value="#{projectHandler.projectRecord} the method is called.

      In Firefox everything works fine.

      I use the following richfaces library:
      3.3.1.GA

      Is this a known issue? Couldn't find anything..
      Thank you for your help.
      Regards
      Alan




        • 1. Re: Bug Internet Explorer? - a4j:mediaOutput createContent n
          Nick Belaevski Master

          Hi,

          Please post full page code (including parameters) and source code for methods.

          • 2. Re: Bug Internet Explorer? - a4j:mediaOutput createContent n
            Alan Gross Newbie

            Hi Nick

            My page is pretty complicated but the bug is very easy to reproduce.
            Just call any method with a

            System.out.println("method was called..")

            statement.

            And you will see that IE7 is not calling the method until you remove the value parameter.

            Here is the source code anyways:

            page:

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            
            <html xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:t="http://myfaces.apache.org/tomahawk"
             xmlns:rich="http://richfaces.org/rich"
             xmlns:a4j="http://richfaces.org/a4j">
            
            
            
            
            <f:view>
            
             <ui:composition
             template="#{facesContext.externalContext.requestContextPath}/../layout/layout.xhtml">
             <ui:define name="title">
             <h:outputText value="#{cont.windowTitleProjectEdit}" />
             </ui:define>
            
             <ui:define name="contentNav">
             <t:div id="leftContentNavigation">
            
             </t:div>
             </ui:define>
             <ui:define name="contentComponents">
             <t:div id="leftContentComponents">
             </t:div>
             </ui:define>
             <ui:define name="content">
             <t:div id="bodyNewsPan">
             <h:form id="formProject">
            
             <h:outputText styleClass="topTitle"
             value="#{cont.titleProjectEdit }" />
             <rich:tabPanel switchType="client">
             <rich:tab label="Project Details">
            
             <h:panelGrid columns="3"
             columnClasses="columnFormEdit1, columnFormEdit2, columnFormEdit3">
             <h:outputLabel for="projectId" value="#{cont.lblProjectId }" />
             <h:inputText id="projectId" style="width: 90%" disabled="true"
             required="true"
             value="#{projectHandler.projectRecord.projectId}" />
             <rich:message for="projectId">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
             <h:outputLabel for="projectName" value="#{cont.lblProjectName }" />
             <h:inputText id="projectName" style="width: 90%"
             disabled="false" required="true"
             value="#{projectHandler.projectRecord.projectName}" />
             <rich:message for="projectName">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="scopeMoney" value="#{cont.lblScopeMoney}" />
             <h:inputText id="scopeMoney" disabled="false" required="true"
             value="#{projectHandler.projectRecord.scopeMoney}" />
             <rich:message for="scopeMoney">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="vatRate" value="#{cont.lblProjectVatRate}" />
             <h:inputText id="vatRate" disabled="false" required="true"
             value="#{projectHandler.projectRecord.vatRate}" />
             <rich:message for="vatRate">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="currency" value="#{cont.lblProjectCurrency}" />
             <rich:comboBox id="currency"
             value="#{projectHandler.projectRecord.currency}"
             disabled="false" required="true">
             <f:selectItem itemValue="CHF" />
             <f:selectItem itemValue="EUR" />
             <f:selectItem itemValue="GBP" />
             <f:selectItem itemValue="USD" />
             </rich:comboBox>
            
             <rich:message for="currency">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
            
            
             <h:outputLabel for="active" value="#{cont.lblProjectActive }" />
            
             <h:selectBooleanCheckbox id="active"
             value="#{projectHandler.projectRecord.active}" />
             <rich:message for="active">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
            
             <h:outputLabel for="billingAddress"
             value="#{cont.lblProjectBillingAddr }" />
             <h:inputTextarea id="billingAddress" required="true"
             value="#{projectHandler.projectRecord.billingAddress}"
             styleClass="address" />
             <rich:message for="billingAddress">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
             <h:outputLabel value="#{cont.lblProjectResponsible }" />
             <h:panelGrid columns="2">
             <h:panelGrid columns="2" border="0" cellpadding="0"
             cellspacing="0">
             <h:inputText style="margin:0px;" required="true"
             value="#{projectHandler.projectResponsible}" disabled="false"
             id="responsibleInput" />
             <h:graphicImage
             value="#{facesContext.externalContext.requestContextPath}/../images/arrow.png"
             onclick="#{rich:component('suggestionResponsible')}.callSuggestion(true)"
             alt="" />
             </h:panelGrid>
             <rich:message for="responsibleInput">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputText id="responsiblesSuggested"
             style="font-weight:bold" />
             </h:panelGrid>
            
             <rich:suggestionbox height="200" width="200"
             usingSuggestObjects="false" nothingLabel="No contacts found"
             onobjectchange="printObjectsSelected(#{rich:element('responsiblesSuggested')},#{rich:component('suggestionResponsible')});"
             suggestionAction="#{projectHandler.responsibleAutocomplete}"
             var="resp" for="responsibleInput"
             fetchValue="#{resp.firstName} #{resp.lastName}"
             id="suggestionResponsible" tokens="," ajaxSingle="true">
             <h:column>
             <h:graphicImage value="../.././images/icon_person.jpg" />
             </h:column>
             <h:column>
             <h:outputText value="#{resp.firstName} #{resp.lastName}" />
             </h:column>
            
             <a4j:support event="onselect" ajaxSingle="true">
            
             <f:setPropertyActionListener value="#{resp}"
             target="#{projectHandler.projectRecord.contactsByResponsibleId}" />
            
             </a4j:support>
             </rich:suggestionbox>
            
            
             <h:outputLabel value="#{cont.lblProjectCompany }" />
             <h:panelGrid columns="2">
             <h:panelGrid columns="2" border="0" cellpadding="0"
             cellspacing="0">
             <h:inputText style="margin:0px;"
             value="#{projectHandler.projectCompany}" disabled="false"
             id="companyInput" required="true" />
             <h:graphicImage
             value="#{facesContext.externalContext.requestContextPath}/../images/arrow.png"
             onclick="#{rich:component('suggestionCompany')}.callSuggestion(true)"
             alt="" />
             </h:panelGrid>
             <rich:message for="companyInput">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputText id="companySuggested" style="font-weight:bold" />
             </h:panelGrid>
            
             <rich:suggestionbox height="200" width="200"
             usingSuggestObjects="false" nothingLabel="No companys found"
             onobjectchange="printObjectsSelected(#{rich:element('companySuggested')},#{rich:component('suggestionCompany')});"
             suggestionAction="#{projectHandler.companyAutocomplete}"
             var="resp" for="companyInput" fetchValue="#{resp.name}"
             id="suggestionCompany" tokens="," ajaxSingle="true">
             <h:column>
             <h:graphicImage value="../.././images/company.jpg" />
             </h:column>
             <h:column>
             <h:outputText value="#{resp.name}" />
             </h:column>
            
             <a4j:support event="onselect" reRender="contact"
             ajaxSingle="true">
            
             <f:setPropertyActionListener value="#{resp}"
             target="#{projectHandler.projectRecord.company}" />
             <f:setPropertyActionListener value=""
             target="#{projectHandler.projectRecord.contactsByCustomerId}" />
             <f:setPropertyActionListener value=""
             target="#{projectHandler.projectContact}" />
            
             </a4j:support>
             </rich:suggestionbox>
            
             <h:outputLabel value="#{cont.lblProjectCustomer }" />
             <h:panelGrid id="contact">
             <h:panelGrid columns="2">
             <h:panelGrid columns="2" border="0" cellpadding="0"
             cellspacing="0">
             <h:inputText style="margin:0px;"
             value="#{projectHandler.projectContact}" disabled="false"
             id="contactInput" required="true" />
             <h:graphicImage
             value="#{facesContext.externalContext.requestContextPath}/../images/arrow.png"
             onclick="#{rich:component('suggestionContact')}.callSuggestion(true)"
             alt="" />
             </h:panelGrid>
             <rich:message for="contactInput">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputText id="contactSuggested" style="font-weight:bold" />
             </h:panelGrid>
            
             <rich:suggestionbox height="200" width="200"
             usingSuggestObjects="false" nothingLabel="No contacts found"
             onobjectchange="printObjectsSelected(#{rich:element('contactSuggested')},#{rich:component('suggestionContact')});"
             suggestionAction="#{projectHandler.contactAutocomplete}"
             var="resp" for="contactInput"
             fetchValue="#{resp.firstName} #{resp.lastName}"
             id="suggestionContact" tokens="," ajaxSingle="true">
             <h:column>
             <h:graphicImage value="../.././images/icon_person.jpg" />
             </h:column>
             <h:column>
             <h:outputText value="#{resp.firstName} #{resp.lastName}" />
             </h:column>
            
             <a4j:support event="onselect" ajaxSingle="true">
            
             <f:setPropertyActionListener value="#{resp}"
             target="#{projectHandler.projectRecord.contactsByCustomerId}" />
            
             </a4j:support>
             </rich:suggestionbox>
             </h:panelGrid>
             </h:panelGrid>
            
             <h:panelGrid columns="2">
             <rich:listShuttle id="projectRoles"
             sourceValue="#{projectHandler.projectRolesSrcPickList}"
             targetValue="#{projectHandler.projectRolesTrgtPickList}"
             var="items" sourceCaptionLabel="Available Roles"
             converter="#{projectHandler.projectRoleListShuttleConverter }"
             targetCaptionLabel="Roles Assigned to Project"
             listsHeight="300" sourceListWidth="300" targetListWidth="400"
             orderControlsVisible="false" moveControlsVisible="true"
             fastOrderControlsVisible="false">
             <rich:column width="18">
             <h:graphicImage value="../.././images/icon_project.jpg"></h:graphicImage>
             </rich:column>
             <rich:column>
             <h:outputText value="#{items.roleName}"></h:outputText>
             </rich:column>
             <rich:column>
             <h:outputText value="Rate Hour: " />
             <t:htmlTag value="br" />
             <h:inputText value="#{items.rateHour}" size="4" />
             </rich:column>
             <rich:column>
             <h:outputText value="Max Hrs Day: " />
             <t:htmlTag value="br" />
             <h:inputText value="#{items.maxHoursPerDay}" size="4" />
             </rich:column>
            
            
             </rich:listShuttle>
             <rich:message for="projectRoles">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             </h:panelGrid>
            
             <h:panelGrid columns="2">
             <rich:listShuttle id="projectUsers"
             sourceValue="#{projectHandler.projectUsersSrcPickList}"
             targetValue="#{projectHandler.projectUsersTrgtPickList}"
             var="items" sourceCaptionLabel="Available Users"
             converter="#{projectHandler.projectUserListShuttleConverter }"
             targetCaptionLabel="Users Assigned to Project"
             listsHeight="300" sourceListWidth="300" targetListWidth="500"
             orderControlsVisible="false" moveControlsVisible="true"
             fastOrderControlsVisible="false">
             <rich:column width="18">
             <h:graphicImage value="../.././images/icon_person.jpg"></h:graphicImage>
             </rich:column>
             <rich:column>
             <h:outputText value="#{items.loginName}"></h:outputText>
             </rich:column>
             <rich:column>
             <h:outputLabel value="#{cont.lblProjectDefaultRole }" />
             <rich:comboBox value="#{items.defaultRole }"
             selectFirstOnUpdate="false"
             defaultLabel="Select a default role">
             <f:selectItems value="#{projectHandler.projectRoleNames}" />
             </rich:comboBox>
             </rich:column>
            
             </rich:listShuttle>
             <rich:message for="projectUsers">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             </h:panelGrid>
            
            
             <h:panelGrid columns="2">
             <h:commandButton id="cancelModify" value="#{cont.buttonCancel }"
             immediate="true" action="#{projectHandler.cancelModify}" />
             <h:commandButton id="ActionProjectAdd"
             value="#{cont.buttonSave }"
             action="#{projectHandler.saveEditProjectRecord}" />
             </h:panelGrid>
            
            
            
            
            
            
             </rich:tab>
             <rich:tab label="Workpackages">
            
             <h:panelGrid id="packageList">
             <rich:dataTable cellpadding="0" cellspacing="0" width="640"
             border="0" binding="#{projectHandler.dataTablePackages}"
             var="record" value="#{projectHandler.projectPackages}"
             sortable="true" headerClass="richTableColumnHeader"
             onRowMouseOver="changeRowColorOver(this)"
             onRowMouseOut="changeRowColorOut(this)">
             <a4j:support event="onRowClick"
             action="#{projectHandler.editPackageRecord }"
             reRender="packageDetailsEdit, prepareCreate, packageDetailsCreate" />
             <f:facet name="header">
             <rich:columnGroup>
            
             <rich:column rowspan="1" colspan="1" rendered="false">
             <h:outputText value="#{cont.lblPackageId}" />
             </rich:column>
             <rich:column rowspan="2" colspan="2">
             <h:outputText value="#{cont.lblPackageRef}" />
             </rich:column>
             <rich:column rowspan="2" colspan="2">
             <h:outputText value="#{cont.lblPackageName}" />
             </rich:column>
             <rich:column rowspan="2" colspan="2">
             <h:outputText value="#{cont.lblScopeMoney}" />
             </rich:column>
             <rich:column rowspan="2" colspan="2">
             <h:outputText value="#{cont.lblProjectActive}" />
             </rich:column>
             </rich:columnGroup>
             </f:facet>
             <rich:column colspan="1" rendered="false">
             <h:outputText value="#{record.workpackageId}" />
             </rich:column>
             <rich:column colspan="2">
             <h:outputText value="#{record.packageReference}" />
             </rich:column>
             <rich:column colspan="2">
             <h:outputText value="#{record.packageName}" />
             </rich:column>
             <rich:column colspan="2">
             <h:outputText value="#{record.scopeMoney}" />
             </rich:column>
             <rich:column colspan="2">
             <h:outputText value="#{record.active}" />
             </rich:column>
             </rich:dataTable>
            
             <h:outputLabel for="totalPackageMoney"
             value="#{cont.lblWpackageTotalMoney }" />
             <h:outputText value="#{projectHandler.totalWpackageMoney}" />
             <h:outputLabel for="totalPackageMoney"
             value="#{cont.lblWpackageTotalMoneyLeft }" />
             <h:outputText value="#{projectHandler.totalWpackageMoneyLeft}" />
             </h:panelGrid>
            
            
            
             <h:panelGrid id="packageDetailsEdit">
             <h:panelGrid columns="3"
             rendered="#{projectHandler.showPackageDetailsEdit }"
             columnClasses="columnFormEdit1, columnFormEdit2, columnFormEdit3">
             <h:outputLabel for="packageId" value="#{cont.lblPackageId }" />
             <h:inputText id="packageId" style="width: 90%" disabled="true"
             required="true"
             value="#{projectHandler.editPackage.workpackageId}" />
             <rich:message for="packageId">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="packageType"
             value="#{cont.lblPackageType }" />
             <rich:comboBox id="packageType"
             value="#{projectHandler.editPackage.packageType }"
             defaultLabel="select a package type">
             <f:selectItems value="#{projectHandler.packageTypes}" />
             </rich:comboBox>
             <rich:message for="packageType">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="packageRef" value="#{cont.lblPackageRef }" />
             <h:inputText id="packageRef" style="width: 90%"
             disabled="false" required="true"
             value="#{projectHandler.editPackage.packageReference}" />
             <rich:message for="packageRef">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="packageName"
             value="#{cont.lblPackageName }" />
             <h:inputText id="packageName" style="width: 90%"
             disabled="false" required="true"
             value="#{projectHandler.editPackage.packageName}" />
             <rich:message for="packageName">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="scopeMoneyPckg"
             value="#{cont.lblScopeMoney}" />
             <h:inputText id="scopeMoneyPckg" disabled="false"
             required="true"
             value="#{projectHandler.editPackage.scopeMoney}" />
             <rich:message for="scopeMoneyPckg">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
            
            
             <h:outputLabel for="activePckg"
             value="#{cont.lblProjectActive }" />
            
             <h:selectBooleanCheckbox id="activePckg"
             value="#{projectHandler.editPackage.active}" />
             <rich:message for="activePckg">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
            
             </h:panelGrid>
            
             <h:panelGrid columns="2"
             rendered="#{projectHandler.showPackageDetailsEdit }">
             <a4j:commandButton id="ActionPackageEditCancel"
             value="#{cont.buttonCancel }"
             action="#{projectHandler.cancelEditPackageRecord}"
             ajaxSingle="true"
             process="packageList, packageDetailsCreate, prepareCreate"
             reRender="packageList, packageDetailsEdit, packageDetailsCreate, prepareCreate" />
             <a4j:commandButton id="ActionPackageSave"
             value="#{cont.buttonSave }"
             action="#{projectHandler.savePackageRecord}"
             reRender="packageList, packageDetailsEdit, prepareCreate" />
             <a4j:commandButton id="ActionPackageDelete"
             value="#{cont.buttonDelete }"
             action="#{projectHandler.deletePackageRecord}"
             rendered="#{projectHandler.deletePackageAvailable }"
             reRender="packageList, packageDetailsEdit, prepareCreate" />
            
            
            
             </h:panelGrid>
             </h:panelGrid>
            
             <h:panelGrid id="packageDetailsCreate">
             <h:panelGrid columns="3"
             rendered="#{projectHandler.showPackageDetailsCreate }"
             columnClasses="columnFormEdit1, columnFormEdit2, columnFormEdit3">
             <h:outputLabel for="packageTypeCreate"
             value="#{cont.lblPackageType }" />
             <rich:comboBox id="packageTypeCreate"
             value="#{projectHandler.createPackage.packageType }"
             defaultLabel="select a package type">
             <f:selectItems value="#{projectHandler.packageTypes}" />
             </rich:comboBox>
             <rich:message for="packageTypeCreate">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
             <h:outputLabel for="packageRefCreate"
             value="#{cont.lblPackageRef }" />
             <h:inputText id="packageRefCreate" style="width: 90%"
             disabled="false" required="true"
             value="#{projectHandler.createPackage.packageReference}" />
             <rich:message for="packageRefCreate">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="packageNameCreate"
             value="#{cont.lblPackageName }" />
             <h:inputText id="packageNameCreate" style="width: 90%"
             disabled="false" required="true"
             value="#{projectHandler.createPackage.packageName}" />
             <rich:message for="packageNameCreate">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
             <h:outputLabel for="scopeMoneyPckgCreate"
             value="#{cont.lblScopeMoney}" />
             <h:inputText id="scopeMoneyPckgCreate" disabled="false"
             required="true"
             value="#{projectHandler.createPackage.scopeMoney}" />
             <rich:message for="scopeMoneyPckgCreate">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
            
            
             <h:outputLabel for="activePckgCreate"
             value="#{cont.lblProjectActive }" />
            
             <h:selectBooleanCheckbox id="activePckgCreate"
             value="#{projectHandler.createPackage.active}" />
             <rich:message for="activePckgCreate">
             <f:facet name="passedMarker">
             <h:graphicImage styleClass="formImgageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/passed.gif" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage styleClass="formImageValidation"
             value="#{facesContext.externalContext.requestContextPath}/../images/error.gif" />
             </f:facet>
             </rich:message>
            
            
             </h:panelGrid>
            
             <h:panelGrid columns="2"
             rendered="#{projectHandler.showPackageDetailsCreate }">
             <a4j:commandButton id="ActionPackageCreateCancel"
             value="#{cont.buttonCancel }"
             action="#{projectHandler.cancelCreatePackageRecord}"
             reRender="packageList, packageDetailsCreate, prepareCreate"
             ajaxSingle="true" process="packageList, prepareCreate" />
             <a4j:commandButton id="ActionPackageCreate"
             value="#{cont.buttonAdd }"
             action="#{projectHandler.createPackageRecord}"
             reRender="packageList, packageDetailsCreate, prepareCreate" />
            
            
            
             </h:panelGrid>
             </h:panelGrid>
             <h:panelGrid id="prepareCreate">
             <a4j:commandButton
             rendered="#{projectHandler.showPackageDetailsCreate!=true &amp;&amp; projectHandler.showPackageDetailsEdit!=true }"
             id="ActionPackageCreatePrepare"
             value="#{cont.projectCreatePackage }"
             action="#{projectHandler.createPackage}"
             reRender="packageDetailsCreate, packageDetailsEdit, prepareCreate" />
            
             </h:panelGrid>
             </rich:tab>
             <rich:tab label="Project Report">
             <a4j:mediaOutput element="img" cacheable="false" session="true"
             createContent="#{projectHandler.generateStatusChartForProject}"
             value="#{projectHandler.projectRecord}" mimeType="image/jpeg" />
             <a4j:mediaOutput element="img" cacheable="false" session="true"
             createContent="#{projectHandler.generateStatusChartByPackage}"
             value="#{projectHandler.projectRecord}" mimeType="image/jpeg" />
            
            
             </rich:tab>
            
            
             </rich:tabPanel>
            
             <t:saveState value="#{projectHandler.projectRecord}" />
             <t:saveState value="#{projectHandler.editPackage}" />
             <t:saveState value="#{projectHandler.createPackage}" />
             <t:saveState value="#{projectHandler.projectUsersSrcPickList}" />
             <t:saveState value="#{projectHandler.projectUsersTrgtPickList}" />
             <t:saveState value="#{projectHandler.projectRolesSrcPickList}" />
             <t:saveState value="#{projectHandler.projectRolesTrgtPickList}" />
             <t:saveState value="#{projectHandler.projectRoleNames}" />
             <t:saveState value="#{projectHandler.projectPackages }" />
             <t:saveState value="#{projectHandler.showPackageDetailsEdit }" />
             <t:saveState value="#{projectHandler.showPackageDetailsCreate }" />
            
             <t:saveState value="#{projectHandler.totalWpackageMoney }" />
            
             <t:saveState value="#{projectHandler.totalWpackageMoneyLeft }" />
             <t:saveState value="#{projectHandler.deletePackageAvailable }" />
            
             </h:form>
            
            
             </t:div>
             </ui:define>
             </ui:composition>
            </f:view>
            </html>
            
            


            Source Code (extract):
            public void generateProjectStatusChartGlobal(OutputStream out, Object dataObj) {
             System.out.println("*** DEBUG - generateProjectStatusChartGlobal has been called..");
             ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
             log.info("Remote User: " + ec.getRemoteUser());
            
             UserDao uDao = new UserDao();
             Users user = uDao.getUserByLoginName(new String(ec.getRemoteUser()));
             uDao.commit();
             Contacts contact = new ContactsDao().getContactByUserId(user.getUserId());
            
             ArrayList<Projects>pList = dao.getListProjectsForResponsible(contact.getContactId());
             ProjectReporter reporter = new ProjectReporter();
             BufferedImage buffImg=reporter.generateStatusChartByProjectGrouped(pList);
            
            
            
             try{
             //ImageIO.write(buffImg, "png", out);
             EncoderUtil.writeBufferedImage(buffImg, ImageFormat.PNG, out, 9);
             System.out.println("*** DEBUG - generateProjectStatusChartGlobal finished.. image Height: "+buffImg.getHeight());
             }
             catch (Exception e){
             System.out.println(e.getMessage());
            
             }
             }
            
             public void generateStatusChartForProject(OutputStream out, Object dataObj) {
            
             System.out.println("*** DEBUG - generateStatusChartForProject has been called..");
             Projects project = (Projects)dataObj;
             ArrayList<Projects>pList = new ArrayList<Projects>();
             pList.add(project);
             ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
             log.info("Remote User: " + ec.getRemoteUser());
            
            
            
            
            
             ProjectReporter reporter = new ProjectReporter();
             BufferedImage buffImg=reporter.generateStatusChartByProject(pList);
            
             try{
             EncoderUtil.writeBufferedImage(buffImg, ImageFormat.PNG, out, 9);
             System.out.println("*** DEBUG - generateStatusChartForProject finished.. image Height: "+buffImg.getHeight());
             }
             catch (Exception e){
             System.out.println(e.getMessage());
            
             }
             }
            
             public void generateStatusChartByPackage(OutputStream out, Object dataObj) {
             System.out.println("*** DEBUG - generateStatusChartByPackage has been called..");
             Projects project = (Projects)dataObj;
             ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
             log.info("Remote User: " + ec.getRemoteUser());
            
             UserDao uDao = new UserDao();
             Users user = uDao.getUserByLoginName(new String(ec.getRemoteUser()));
             uDao.commit();
             Contacts contact = new ContactsDao().getContactByUserId(user.getUserId());
            
             ArrayList<Workpackages>packages = dao.getProjectPackages(project.getProjectId());
            
             ProjectReporter reporter = new ProjectReporter();
             BufferedImage buffImg=reporter.generateStatusChartByPackage(packages);
            
             try{
             EncoderUtil.writeBufferedImage(buffImg, ImageFormat.PNG, out, 9);
             System.out.println("*** DEBUG - generateStatusChartByPackage finished.. image Height: "+buffImg.getHeight());
             }
             catch (Exception e){
             System.out.println(e.getMessage());
            
             }
             }
            
            
            


            Best regards
            Alan