• David Gifford
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

With this apex:commandbutton button, when clicked, we want to move to the "Next Group" of records . action="{!next}"  .

 

Within this apex:commandbutton button, we want to use "apex:actionSupport" to save all modified account records in our Table before we move to the “Next Group”

 

From what I have picked up, we need to write in our controller the method for saving our Account Table

 

Can we get some help on writing this method and adding it to our controller?

 

Command Button Example:

<apex:commandbutton action="{!next}"  value="Next Group >"  rendered="{!hasNext}" >

<apex:actionSupport event="onclickedbutton" action="{!SaveAccountRecords}"  />  </apex:commandbutton>

 

Thank you very much for your help….

Very straight forward listview table of account records - see apex:pageblocktable below

 

Within this account listview table, we have a checkbox field at the account object as shown in our listview. The user can check this box in the account listview apex:inputField value="{!a.Worked__c}" .

 

I need to save these checked Account Records when the user clicks on the apex:commandbutton to move as shown in the action="{!first}" or "{!previous}" call button selected.

 

I need to save the selected apex:inputField value="{!a.Worked__c}" / using the "ONCOMPLETE" attribute in the apex:commandbutton

 

EXAMPLE:

apex:commandbutton action="{!first}" value="First Group" ONCOMPLETE="{!xxSaveSelectedRecordsxx}" apex:commandbutton

 

Example ListView Table of Account Records:

apex:pageBlockTable id="AccountList" value="{!Accounts}" var="a"

apex:column value="{!a.Id}"/

apex:column value="{!a.Name}"/

apex:column headerValue="Worked?"> apex:inputField value="{!a.Worked__c}" / /apex:column>

apex:column value="{!a.Phone}"/> /apex:pageBlockTable>

 

Example Nav Buttons:

apex:commandbutton action="{!first}" value="First Group" /apex:commandbutton

apex:commandbutton action="{!previous}" value=" Previous Group" rendered="{!hasPrevious}">/apex:commandbutton apex:commandbutton action="{!next}" value="Next Group >" rendered="{!hasNext}">/apex:commandbutton>

apex:commandbutton action="{!last}" value="Last Group">/apex:commandbutton>

 

ONCOMPLETE String - The JavaScript invoked when the result of an AJAX update request completes on the client.

 

Thanks for your help....

Very straight forward listview table of account records - see apex:pageblocktable below

 

Within this account listview table, we have a checkbox field at the account object as shown in our listview. The user can check this box in the account listview apex:inputField value="{!a.Worked__c}" .

 

I need to save these checked Account Records when the user clicks on the apex:commandbutton to move as shown in the action="{!first}" or "{!previous}" call button selected.

 

I need to save the selected apex:inputField value="{!a.Worked__c}" / using the "ONCOMPLETE" attribute in the apex:commandbutton

 

EXAMPLE:

apex:commandbutton action="{!first}" value="First Group" ONCOMPLETE="{!xxSaveSelectedRecordsxx}" apex:commandbutton

 

Example ListView Table of Account Records:

apex:pageBlockTable id="AccountList" value="{!Accounts}" var="a"

apex:column value="{!a.Id}"/

apex:column value="{!a.Name}"/

apex:column headerValue="Worked?"> apex:inputField value="{!a.Worked__c}" / /apex:column>

apex:column value="{!a.Phone}"/> /apex:pageBlockTable>

 

Example Nav Buttons:

apex:commandbutton action="{!first}" value="First Group" /apex:commandbutton

apex:commandbutton action="{!previous}" value=" Previous Group" rendered="{!hasPrevious}">/apex:commandbutton apex:commandbutton action="{!next}" value="Next Group >" rendered="{!hasNext}">/apex:commandbutton>

apex:commandbutton action="{!last}" value="Last Group">/apex:commandbutton>

 

ONCOMPLETE String - The JavaScript invoked when the result of an AJAX update request completes on the client.

 

Thanks for your help....