• Alex Santiago
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I need to rerender visualforce when a user selects an item from a picklist.  I only want to show the records related to the item chosen.

 

<apex:page standardController="Repository__c" extensions="PrinterDetails" >
    <apex:form >
        <apex:pageBlock id="thePageBlock" >
          <apex:actionRegion >
              <apex:pageBlockSection title="Printer Information" columns="1">
                  <apex:inputField value="{!Repository__c.name"/>
                  <apex:pageBlockSectionItem>
                      <apex:outputLabel value="Address Name"/>
                      <apex:outputPanel>
                          <apex:inputField value="{!Repository__c.Address_Name__c}">
                              <apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/>
                          </apex:inputField>
                          <apex:actionStatus startText="applying value..." id="status"/>
                       </apex:outputPanel>
                  </apex:pageBlockSectionItem>
              </apex:pageBlockSection>
          </apex:actionRegion>
            <apex:pageblockTable value="{!PrinterDetails}" var="printers" id="table">
                <apex:column value="{!printers.name}" headerValue="Serial Number"/>
                <apex:column value="{!printers.Address_Name__c}" headerValue="Address Name"/>
            </apex:pageblockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

I need to rerender visualforce when a user selects an item from a picklist.  I only want to show the records related to the item chosen.

 

<apex:page standardController="Repository__c" extensions="PrinterDetails" >
    <apex:form >
        <apex:pageBlock id="thePageBlock" >
          <apex:actionRegion >
              <apex:pageBlockSection title="Printer Information" columns="1">
                  <apex:inputField value="{!Repository__c.name"/>
                  <apex:pageBlockSectionItem>
                      <apex:outputLabel value="Address Name"/>
                      <apex:outputPanel>
                          <apex:inputField value="{!Repository__c.Address_Name__c}">
                              <apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/>
                          </apex:inputField>
                          <apex:actionStatus startText="applying value..." id="status"/>
                       </apex:outputPanel>
                  </apex:pageBlockSectionItem>
              </apex:pageBlockSection>
          </apex:actionRegion>
            <apex:pageblockTable value="{!PrinterDetails}" var="printers" id="table">
                <apex:column value="{!printers.name}" headerValue="Serial Number"/>
                <apex:column value="{!printers.Address_Name__c}" headerValue="Address Name"/>
            </apex:pageblockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>