0

I have one checkbox in an object I want to update that checkbox in visualforce page, I'm able to update that checkbox successfully using(command button) apex controller, but that problem here is I want to display the output of that checkbox field without refreshing a page, I'm trying using a reRender attribute to that command button called Update but's not displaying the checkbox output.

enter image description here

Visualforce page coding:

 <apex:outputpanel id="counter" style="overflow:scroll;" layout="block">         
          <apex:actionStatus id="counterStatus" startText=" (Fetching...)" stopText=" (done)"/>

              <apex:pageBlock mode="maindetail" Id="Refre">
              <apex:panelGroup id="ref2" >
               <apex:outputPanel id="ref1" styleClass="tableContainer" layout="block" style="height:420px" rendered="{!NOT(ISBLANK(quo))}"> 

            <apex:pageBlockTable value="{!quo}" var="q" rendered="{!(quo.size!= 0) && (quo.size < 999)}"  id="tb2Quotes" styleclass="floatingHeaderTable" style="overflow:scroll;height:250px;width:100%"> 

                 **<apex:column value="{!q.Quote_Line_Item__r.Order_Received__c}" styleClass="noWrap" style="border:1px solid #D7D8D9" headerValue="Order Received"/>**
                 <apex:column value="{!q.Discount__c}" styleClass="noWrap" style="border:1px solid #D7D8D9" headerValue="Discount"/>
                 <apex:column styleClass="noWrap" style="border:1px solid #D7D8D9;height:5px;" headerValue="Quote Preview">
                 <apex:commandbutton value="Quote Preview"  onclick="return window.open('/apex/QuotePreview?id={!q.Quote_Line_Item__r.Quote1__c}')" style="font-size: 5pt; color: black"  />
                 </apex:column>
                 <apex:column styleClass="noWrap" style="border:1px solid #D7D8D9" headerValue="Open Quote">
                 <apex:commandbutton value="open Quote" onclick="return window.open('https://nicomatic.my.salesforce.com/{!q.Quote_Line_Item__r.Quote1__c}')" style="font-size: 5pt; color: black" />
                 </apex:column> 
                 *<apex:column styleClass="noWrap" style="border:1px solid #D7D8D9"  >
                 <apex:facet name="header">Priority <apex:COMMandLink style="color: green" action="{!allupdateOrderReceived}" value="header" rerender="Refre" Value="!ALL Order Receved Update" /> </apex:facet>  
                        <apex:commandButton value="Update" action="{!updateOrderReceived}"  reRender="Refre,counter">
                          <apex:param name="selected" value="{!q.Quote_Line_Item__r.Id}" assignTo="{!selected}" /> 

                       </apex:commandButton>*
              <!--   
              <apex:facet name="header">Priority <apex:commandLink style="color: green" action="{!updateOrderReceived}" value="header" Value="!Order Received Update" > 
                                 <apex:param name="Selected" 
                                    value="{!q.Quote_Line_Item__r.Id}" 
                                   /> </apex:commandLink></apex:facet>   
               <apex:inputCheckbox value="{!q.Quote_Line_Item__r.Order_Received__c}" /> -->
              <!--   <apex:inputCheckbox value="{!q.Quote_Line_Item__r.Order_Received__c}" />
                 <apex:commandbutton value="Update"  style="font-size: 5pt; color: black" /> -->
                 </apex:column>           
            </apex:pageBlockTable>          
             <apex:outputText rendered="{!(quo.size = 0)}" value="There are no records to display." />
              <apex:outputPanel rendered="{!NOT(ISBLANK(quo))}">
                 <apex:outputText rendered="{!quo.size > 999 }" value="Refine search Records should be less than 1000"  />
             </apex:outputPanel>  
              </apex:outputPanel>
              </apex:panelGroup>   

        </apex:pageBlock> 

           </apex:outputpanel>
4
  • rerender ref1. Commented Oct 16, 2018 at 10:51
  • @PragatiJain It's not working
    – user59569
    Commented Oct 16, 2018 at 11:04
  • What about {!$Component.ref1}? Commented Oct 16, 2018 at 11:25
  • @PragatiJain No it's not I tried
    – user59569
    Commented Oct 16, 2018 at 11:27

1 Answer 1

0

I've completed this challenge with the help controller by adding an extra method for reRender and getting display the values.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .