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
B2000B2000 

Unknown Property-InputText but not for OutputText

I have a wrapper class with an Integer list.  In the VF page when I try and save, I get Error: Unknown Property 'xxx 'when I try and use an inputText. However, it saves and displays correctly if I use an outputText.  Here is a partial list of the code VF page and class:
<apex:repeat value="{!listWProduct}" var="prd">        
<tr>
  <th style="text-align:center;"><apex:inputcheckbox value="{!prd.isSelected}"/></th>
  <th style="text-align:left;"><apex:outputField value="{!prd.p2.Name}"/></th>
     <apex:repeat value="{!prd.listTerm}" var="xxx">                  
       <td style="text-align:center;">
        <apex:inputText value="{!xxx}"/> get Unknown Property: 'xxx' when trying to save VF page
        <apex:outputText value="{!xxx}"/> this works and VF page saves
       </td>
    </apex:repeat>
</tr>
</apex:repeat>

    public class wProduct implements Comparable
    {
        public Product2            p2             {get;set;}
        public Boolean             isSelected     {get;set;}
        public Integer[]             listTerm       {get;set;}
        
        public wProduct (Product2 p2)
        {
            this.p2      = p2;
            isSelected   = false;
            listTerm     = new Integer[]{0,0,0,0,0,0,0,0,0,0};
        } 
        
        public Integer compareTo(Object other)
        {    
            String otherName = other != null ? ((wProduct)other).p2.Name : ''; 
            return p2.Name.compareTo(otherName); 
        }
    } 

in class:
public  wProduct[]                  listWProduct                                {get;set;} 
listWProduct                        = new wProduct[]{};
for (Product2 p2 : [Select id,Name From Product2]) {
            listWProduct.add(new wProduct(p2));   
        }

 
kevin lamkevin lam
If you use inputText then xxx needs to reference a variable in your controller class.
B2000B2000
xxx references each element in the listTerm in the controller.  The repeat statement assigns xxx to the elements in prd.listTerm.  The odd issue is that the VF pages saves for outputText but not inputText.
Amritesh SahuAmritesh Sahu
Hi B2000,
Did you found the solution for this error.
Plz let me know if you did

Regards,
Amritesh