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
Stanley YeStanley Ye 

Field Set with inline edit - how to catch the input value

I'm using field set to build our new opportunity view page. The field set displayed in VF page properly and inline edit is working as well. However, when I tried to build the form validation before saving the page, I found I couldn't catch the user input value in the controller or in jquery/javascript(the value can be saved properly but no idea how to catch these values before saving the page).

Anyone has an idea?
Tejpal KumawatTejpal Kumawat
Hello Stanley,

Please Use this tag to Your page :
 
<apex:pageMessages id="pageMessageId"/>

Put reRender="pageMessageId" in your save action and if immediate="true".remove it.

and also in controller method use : 
try{
//your Save code
}catch(Exception e){
Apexpages.addMessages(e);
}


If this answers your question mark Best Answer it as solution and then hit Like!
 
Stanley YeStanley Ye
Hi Tejpal, Thanks for the reply.

But our key issue is how to access the user input value and passing to controller. The field set is as follows:

<-----   Field Set  ------>
 <apex:pageBlockSection id="terms_column_1" columns="1">
     <apex:repeat id="field_set_terms_col_1" value="{!li_fieldSet_terms_column_1}" var="f">
         <apex:pageBlockSectionItem labelStyle="width:22.5%; height:16px;" dataStyle="width:40%; height:16px;">
             <apex:outputLabel value="{!$ObjectType.Opportunity.Fields[f].label}"/>
             <apex:outputField id="test1" value="{!Opportunity[f.fieldpath]}" rendered="true">
                 <apex:inlineEditSupport event="ondblclick" showOnEdit="save, cancel" hideOnEdit="edit, delete, sharing, scenario_calculator, submit, recall, ahpra_search"/>
             </apex:outputField>                                    
         </apex:pageBlockSectionItem>
     </apex:repeat>
</apex:pageBlockSection>    


We also have an action function as below to rerender the page sections based on the user input value from above field set
<-------- Action Function ---------->
<apex:actionFunction id="partial_refresh" name="refresh" action="{!partialRefresh}" reRender="contract_type_details,terms_table_fieldset,terms_table" status="loading_status"/>



<------- Controller Method --------->
 public PageReference partialRefresh(){ 
        
        [user input value will be passed to this method and do some logic here]

        return null;
    }   



Many thanks,
Stanley
TejashriTejashri
Hi Stanley,

Did you find the solution for this?