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
Sam CousinsSam Cousins 

How do I pass my inputHidden values to a controller to compare them to another property?

Hey all, I have the following:
 
<apex:inputHidden value="{!caseList1stLinePrevious.Subject}" id="theHiddenInput1" />

<apex:inputHidden value="{!caseList2ndLinePrevious.Subject}" id="theHiddenInput2" />

<apex:inputHidden value="{!caseList3rdLinePrevious.Subject}" id="theHiddenInput3" />

and in my controller: 
 
public class ITSSDashboardController
{

    public list<case> caseList1stLine{get;set;}
    public list<case> caseList2ndLine{get;set;}
    public list<case> caseList3rdLine{get;set;}
    public case caseList1stLinePrevious{get;set;}
    public case caseList2ndLinePrevious{get;set;}
    public case caseList3rdLinePrevious{get;set;}

    public ITSSDashboardController()
    {
          getCases();
    }
    
  
    
    public PageReference getCases()
    {

            caseList1stLine = new list<case>();
            caseList2ndLine = new list<case>();
            caseList3rdLine = new list<case>();
            caseList1stLinePrevious = new case();
            caseList2ndLinePrevious = new case();
            caseList3rdLinePrevious = new case();
            
            caseList1stLine=[SELECT CaseNumber, SuppliedEmail, Day_Created__c,Days_Open__c, Subject FROM Case WHERE Owner.Type = 'Queue' AND Owner.Name = 'IT First Line' ORDER BY CreatedDate DESC];
           
            caseList2ndLine=[SELECT CaseNumber, SuppliedEmail, Day_Created__c,Days_Open__c, Subject FROM Case WHERE Owner.Type = 'Queue' AND Owner.Name = 'IT Second Line' ORDER BY CreatedDate DESC];
            
            caseList3rdLine=[SELECT CaseNumber, SuppliedEmail, Day_Created__c,Days_Open__c, Subject FROM Case WHERE Owner.Type = 'Queue' AND Owner.Name = 'IT Third Line' ORDER BY CreatedDate DESC];
           
            
           
            if(caseList1stLinePrevious.Subject != caseList1stLine[0].Subject  )
            {
  caseList1stLinePrevious.Subject = caseList1stLine[0].Subject;
                caseList2ndLinePrevious.Subject = caseList2ndLine[0].Subject;
                caseList3rdLinePrevious.Subject = caseList3rdLine[0].Subject;           
    // DOES NOT EVALUATE TO TRUE?
            }
      
     
        return null;
        
    }

}


But it doesn't work. How do I store new cases and then make a condition evaluate to true if it's actually a new case?


Thanks.