• M477
  • NEWBIE
  • 10 Points
  • Member since 2011

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

The following is a simplified version of a table that sits in the page layout of the Case standard object.

 

<apex:page standardController="Case" extensions="aResourcesListController">
<apex:form >
    <apex:pageBlock id="table1">
        <apex:pageBlockTable value="{!aResourcesList}" var="aResource" >
            <apex:column >
                <apex:facet name="header">Column 1</apex:facet>
                <apex:inputField value="{!aResource.field__c}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">Column 1</apex:facet>
                <apex:outputText value="{!aResource.field__r.someOtherField}"/>
            </apex:column>
        </apex:pageBlockTable>
        <br/> 
        <apex:commandButton action="{!updateTable}" value="Save" rerender="table1"/>
        <apex:commandButton action="{!insertRow}" value="New" rerender="table1"/>
    </apex:pageBlock>
</apex:form>
</apex:page>

 This should update the table when the Save commandButton is clicked. It does update the database but to get the visualforce page to update the user must manually refresh the whole page. How can I get the VisualForce PageBlock to refresh when the user clicks save? Is this possible to do without refreshing the entire page?

 

Thanks,

Matt

 

  • April 22, 2011
  • Like
  • 0

Here is a reduced snippet of what I have so far:

 

<apex:page standardController="Case" extensions="NrtListController">
	<apex:param name="caseID" value="{!Case.id}"/>
	Standard CaseID: {!Case.id}
	Extension CaseID: {!CaseNrt}
</apex:page>

public class NrtListController {
	public NrtListController(ApexPages.StandardController controller) {}
	public String getCaseNrt(){
        	return System.currentPagereference().getParameters().get('caseID');
	}
}

 

 

This page returns

Standard CaseID: 500T0000002mTLlIAM

Extension CaseID:

 

How can I get the current objects ID to the extension controller (The extension CaseID should be the same as the Standard CaseID)?

 

Thanks,

Matt

 

  • April 16, 2011
  • Like
  • 0

The following is a simplified version of a table that sits in the page layout of the Case standard object.

 

<apex:page standardController="Case" extensions="aResourcesListController">
<apex:form >
    <apex:pageBlock id="table1">
        <apex:pageBlockTable value="{!aResourcesList}" var="aResource" >
            <apex:column >
                <apex:facet name="header">Column 1</apex:facet>
                <apex:inputField value="{!aResource.field__c}"/>
            </apex:column>
            <apex:column >
                <apex:facet name="header">Column 1</apex:facet>
                <apex:outputText value="{!aResource.field__r.someOtherField}"/>
            </apex:column>
        </apex:pageBlockTable>
        <br/> 
        <apex:commandButton action="{!updateTable}" value="Save" rerender="table1"/>
        <apex:commandButton action="{!insertRow}" value="New" rerender="table1"/>
    </apex:pageBlock>
</apex:form>
</apex:page>

 This should update the table when the Save commandButton is clicked. It does update the database but to get the visualforce page to update the user must manually refresh the whole page. How can I get the VisualForce PageBlock to refresh when the user clicks save? Is this possible to do without refreshing the entire page?

 

Thanks,

Matt

 

  • April 22, 2011
  • Like
  • 0

Here is a reduced snippet of what I have so far:

 

<apex:page standardController="Case" extensions="NrtListController">
	<apex:param name="caseID" value="{!Case.id}"/>
	Standard CaseID: {!Case.id}
	Extension CaseID: {!CaseNrt}
</apex:page>

public class NrtListController {
	public NrtListController(ApexPages.StandardController controller) {}
	public String getCaseNrt(){
        	return System.currentPagereference().getParameters().get('caseID');
	}
}

 

 

This page returns

Standard CaseID: 500T0000002mTLlIAM

Extension CaseID:

 

How can I get the current objects ID to the extension controller (The extension CaseID should be the same as the Standard CaseID)?

 

Thanks,

Matt

 

  • April 16, 2011
  • Like
  • 0