function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
YashYash 

apex:outputText and apex:outputLable is not working in IE

Hi,

<h1><apex:outputText style="font-style:bold" value="To Date"></apex:outputText></h1>

The above line is working properly in Mozila, but it is not displaying the test in IE.

Can any body help me?

Thanks in advance.
Yash

Ron HessRon Hess
What version of IE?
YashYash

Hi,

 

Thanks for quick response. IE version is 6.0

Following is the code.

Code:
<apex:page controller="ORC_For_All_Agent" sidebar="false" showHeader="true">
        <apex:sectionHeader title="All Agents Commission" subtitle="" description="" ></apex:sectionHeader>
        <apex:form >
             <apex:pageBlock title="">
               <!--
                <apex:outputLabel value="From Date" for="fromdate"/>                            
                -->
                <h1><apex:outputText style="font-style:bold" value="To Date"></apex:outputText></h1>
               
                <apex:inputField value="{!fromDateTask.From_Date__c}" id="fromdate"/>
                                          
                <h1><apex:outputText style="font-style:bold" value="To Date"></apex:outputText></h1>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <apex:inputField value="{!toDateTask.To_Date__c}" id="todate"/>
                
                               
                <apex:commandButton value="Generate Report" action="{!generateReport}" rerender="out1" status="status1"/><p/>
                <apex:outputPanel id="out1">
                   <apex:actionstatus id="status1" startText="">
                        <apex:facet name="stop">
                                <apex:outputPanel >
                                        <apex:pageBlockTable value="{!displayInfoList}" var="item">
                                                <apex:column value="{!item.agentName}"> 
                                                    <apex:facet name="header">Agent Name</apex:facet>
                                                </apex:column>
                                                <apex:column value="{!item.basicCommissionAmount}"> 
                                                    <apex:facet name="header">Basic Commission Amount</apex:facet>
                                                </apex:column>
                                                <apex:column value="{!item.orcAmount}"> 
                                                    <apex:facet name="header">ORC Amount</apex:facet>
                                                </apex:column>
                                                <apex:column value="{!item.totalCommissionAmount}"> 
                                                    <apex:facet name="header">Total Commission</apex:facet>
                                                </apex:column>
                                            </apex:pageBlockTable> 
                                </apex:outputPanel>
                        </apex:facet>
                    </apex:actionstatus>
                </apex:outputPanel>
                 </apex:pageBlock> 
        </apex:form>
  </apex:page>


 

Code:
public class ORC_For_All_Agent {
    String message=null;
    String userId=null;
    String fromDate=null;
    String toDate=null;
    List<DisplayInfo> displayInfoList=new List<DisplayInfo>();
    
   // Task fromDateTask = new Task();
    //Task toDateTask = new Task();    
    
    Date_Range__c fromDateTask= new Date_Range__c();
    Date_Range__c todateTask= new Date_Range__c();
    public Date_Range__c getFromDateTask() {
             return fromDateTask;
    }
    public Date_Range__c getToDateTask(){
    return todateTask;
    }
      
   // public Task getFromDateTask() { return fromDateTask; }

   // public Task getToDateTask() { return toDateTask; }    
    
    public class DisplayInfo{
        public String agentId;
        public String agentName;
        public Double orcAmount;
        public Double basicCommissionAmount;
        public Double totalCommissionAmount;
        
        public void setAgentId(String agentId){
            this.agentId=agentId;
        }
        public String getAgentId(){
            return this.agentId;
        }
        public void setAgentName(String agentName){
            this.agentName=agentName;
        }
        public String getAgentName(){
            return this.agentName;
        }
        public void setOrcAmount(Double orcAmount){
            this.orcAmount=orcAmount;
        }
        public Double getOrcAmount(){
            return this.orcAmount;
        }
        public void setBasicCommissionAmount(Double basicCommissionAmount){
            this.basicCommissionAmount=basicCommissionAmount;
        }
        public Double getBasicCommissionAmount(){
            return this.basicCommissionAmount;
        }
        public void setTotalCommissionAmount(Double totalCommissionAmount){
            this.totalCommissionAmount=totalCommissionAmount;
        }
        public Double getTotalCommissionAmount(){
            return this.totalCommissionAmount;
        }
    }
    
    public PageReference generateReport(){
            PageReference page=new PageReference('http://www.google.com');
            
            Date fromDate = fromDateTask.From_Date__c;
            //Date fromDate = fromDateTask.activitydate;
            //this.setfromDate(String.valueOf(fromDate));
            this.setFromDate(String.valueOf(fromDate));

            Date toDate= todateTask.To_Date__c;
            //Date toDate = toDateTask.activitydate;
            //this.settodate(String.valueOf(toDate));
            this.setToDate(String.valueOf(toDate));
            
            displayInfoList.clear();
            this.setUserId(getCurrentlyLoginCountryManagerSFId(UserInformation.getContextUserId()));
            this.setAllAgentsForCountryManagerSFId(this.getUserId());
            return null;
        }
        
        public void setMessage(String message){
            this.message=message;
        }
        public String getMessage(){
            return this.message;
        }
        public void setUserId(String userId){
            this.userId=userId;
        }
        public String getUserId(){
            return this.userId;
        }
        
        public void setFromDate(String fromDate){
            this.fromDate=fromDate;
        }
        public String getFromDate(){
            return this.fromDate;
        }
        
        public void setToDate(String toDate){
            this.toDate=toDate;
        }
        public String getToDate(){
            return this.toDate;
        }
        
        public List<DisplayInfo> getDisplayInfoList(){
            return this.displayInfoList;
        }
        
      //  public void setDisplayInfoList(List<DisplayInfo> list){
      //      this.displayInfoList=list;
      //  }
        public String getCurrentlyLoginCountryManagerSFId(String userId) {
                String userSfId=null;
                for(CountryManger__c cm : [select ID from CountryManger__c where Country_Manager_Name__c = : userId])
                {
                    userSfId=cm.id;
                }
                return userSfId;
        }
        public void setAllAgentsForCountryManagerSFId(String userSfId) {
                String agentSfId=null;
                Integer i=0;
                for(CountryManager_Agent__c cm : [select Agent__c from CountryManager_Agent__c where CountryManager__c = : userSfId])
                {
                    i++;
                    Double orc=ORCAgentWSReportClass.generatReportForParticularAgent(cm.Agent__c,userSfId,this.getFromDate(),this.getToDate());
                    Double basicCommission=BasicCommissionAgentWSReportClass.generatBasicCommissionForParticularAgent(cm.Agent__c,userSfId,this.getFromDate(),this.getToDate());
                    
                    DisplayInfo obj=new DisplayInfo();
                    obj.setAgentId(cm.Agent__c);
                    obj.setAgentName(getAgentNameForAgentSFId(cm.Agent__c));
                    obj.setOrcAmount(Math.round(orc));
                    obj.setBasicCommissionAmount(basicCommission);
                    obj.setTotalCommissionAmount(basicCommission+Math.round(orc));
                    if((Math.round(orc)!= 0.0)&&(basicCommission != 0.0)){
                        displayInfoList.add(obj);
                    }
                }
               // this.setMessage(String.valueOf(i));
             //   return agentSfIdList;
        }
        public String getAgentNameForAgentSFId(String agetnSfId) {
                String agentName=null;
                Integer i=0;
                for(Agent__c agent : [select AgentName__c from Agent__c where ID = : agetnSfId])
                {
                    i++;
                    agentName=agent.AgentName__c;
                }
               return agentName;
        }

}

 
Thank you,
Yash
dchasmandchasman
Why are you doing this at all? It is complete overkill to use a component for this kind of thing - just style your h1 element. BTW the results of this markup

<apex:page showHeader="false"> <h1><apex:outputText style="font-style:bold" value="To Date"/></h1> </apex:page>

is:

<h1><span style="font-style:bold">To Date</span></h1>

and should be browser and visualforce independant. Also this small test page rendered correctly for me in FF 2&3, IE7 and Safari.

When you save (either in Developer Mode or via Setup - does not work with eclipse) the larger page you posted (to complicated and depends on custom objects so I was unable to actually try the real page) do you get any warnings?


Message Edited by dchasman on 07-15-2008 11:08 AM
YashYash
Hi dchasman ,
 
Thanks for immediate reply.
 
I didnt get any warnings. When user enter the from date and to date and onclick of button , controller get called where i calculate the over ride commission for all the agents. I displayed that result in 'pageBlockTable'. The same code is working properly in Mozila 2.0.0.15 , but it is not working in properly in IE 6.0.
 
When i removed the 'pageBlockTable' from VF page, then it is displaying the both the lables properly(in IE 6.0).
 
I have included the both image as following.