0

I know this error actually comes when the property is not actually defined in controller / when no public access specifier / not getters and setters. But i have given all things still i am getting this

visual force page tag on visualforce page component

<apex:commandButton action="{!ShowShareableLink}" 
 oncomplete="shareContentJSWithoutEmail{!sectionName}('{!searchRes.id}',this);"   
 reRender="showShareLink,showAddtoUser,notShowImage,showSLink,shareableLink,showShareLink" 
 style="border-style: initial;width: 113%;background: #e6e6e6;margin-top: 4px;font-weight: normal; margin-left: -10px; height: 34px;"  
  value="Get Shareable Link" status="loaderStatus">

this command button is actually passing a parameter from

<apex:repeat value="{!allsearches}" var="searchRes">

but the weird thing is when i use onclick in command button everything is working fine but when i use oncomplete getting unknown property.

Class level code:

In controller:

public list<OpportunityRecommendationsCtrl.Searches> allsearches     {get;set;}

service class ctrl:

global with sharing class OpportunityRecommendationsCtrl {

        public class Searches {
        public String id {get; set;}
        public String title {get; set;}
        public String description {get; set;}
        public String article_type {get; set;}
        public String state {get; set;}
        public List<String> tags {get; set;}
        public List<String> categories {get; set;}
        public Double rating {get; set;}
        public String publisher_id {get; set;}
        public String publisher_name {get; set;}
        public String published_at {get; set;}
        //public Object expires_at {get; set;}
        public List<String> group_names {get; set;}
        public String file {get; set;}
        public Integer rating_count {get; set;}
        public User_rating user_rating {get; set;}
        public Integer step_count {get; set;}
        public Enrollment enrollment {get; set;}
        public Datetime created_at {get; set;}
        public Datetime updated_at {get; set;}
        public String content_updated_at {get; set;}
        public Boolean is_updated {get; set;}
        public Boolean is_content_updated {get; set;}
        public List<Downloads> downloads {get; set;}
        public Boolean editable {get; set;}
        public Boolean allow_sharing {get; set;}
        public Boolean allow_guest_sharing {get; set;}
        public Image image {get; set;}
        public Boolean isFavorited {get;set;}
        public Boolean allow_download {get;set;}
    }


}

This question is actually related to https://salesforce.stackexchange.com/questions/113103/values-are-not-updating-immediately-on-visual-force-after-command-button-actions?noredirect=1#comment157623_113103

  • Does it tell you which property is undefined? – Adrian Larson Mar 5 '16 at 14:49
  • @AdrianLarson hi i have updated my question thank's, it is searchRes variable – rajasekhar Mar 5 '16 at 15:23
  • 1
    searchRes does not exist in your controller but is rather a variable introduced by your Visualforce apex:repeat. – Keith C Mar 5 '16 at 16:57
  • 1
    is the commandButton within the apex:repeat scope? That is, there is a commandButton for every iteration of repeat? – cropredy Mar 6 '16 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.