Class PContactPage

All Implemented Interfaces:
PAccountViewPage, PCCPage, PWizardPage, PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ActionListener, ContainerListener, ItemListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible

public class PContactPage extends PMaintenancePage implements ActionListener, ItemListener, PWizardPage, PropertyChangeListener
A generalized panel for displaying/modifying multiple contact information. This page hosts a collection of PContactPanels, each of which holds the information for an Portal contact. Setting the NAMEADDRESS attribute of the AccountCreationSharedData will result in this page being filled in with that data (each time you update the shared data). This means if the user has manually modified this page and you share out new data the user's input will be overridden.

This page supports the addition of custom fields above the phone table. Something along the lines of:
 public class MyContactPage extends PContactPage {
                public MyContactPage() { }

                public addCustomDataToBilling(PContactPanel p) {
                        //Add my panel to the main billing panel
                        p.setCustomData(new MyAdditionalFieldsInACustomPanel());
                }

                public PContactPanel addContactPanel(int index, boolean newContact) {
                        //Add my panel to the additional contact panels
                        PContactPanel p = super.addContactPanel(index, newContact);
                        p.setCustomData(new MyAdditionalFieldsInACustomPanel());
                }
 }
 
You will also need to add the following to Customized.properties from the Customer Care SDK:
com.portal.app.cc.PContactPage.subclass=MyContactPage
See Also:
  • Constructor Details

    • PContactPage

      public PContactPage()
      Creates a new multiple contacts page. The page hosts the Account Holder contact panel and supports the display, addition, and deletion of other contact panels as well.
  • Method Details

    • hasUnsavedChanges

      public boolean hasUnsavedChanges()
      Returns true if a contained contact panel for an already-existing contact is marked for deletion or if a contained contact panel has unsaved changes. This method is only called at maintenance-time.
      Specified by:
      hasUnsavedChanges in interface PAccountViewPage
      Overrides:
      hasUnsavedChanges in class PMaintenancePage
      Returns:
      true if this page contains a panel with a contact marked for deletion or if it has one or more contact panels with unsaved changes; false otherwise.
    • resetUnsavedChanges

      public void resetUnsavedChanges()
      Description copied from class: PMaintenancePage
      This method is responsible for undo'ing the changes made to the page and resetting back to the original.
      This implementation defaults to calling resetToDefault in the base class.
      Specified by:
      resetUnsavedChanges in interface PAccountViewPage
      Overrides:
      resetUnsavedChanges in class PMaintenancePage
    • save

      public void save() throws PSaveException
      Commits maintenance-time changes to Portal.
      Specified by:
      save in interface PAccountViewPage
      Overrides:
      save in class PMaintenancePage
      Throws:
      PSaveException
    • setModelHandle

      public void setModelHandle(PModelHandle pm) throws RemoteException
      At maintenance time, puts in the UI a contact panel for each contact in the account. (The Account Holder contact panel is always present.)
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIACustomizablePanel
      Parameters:
      pm - Model handle for the account
      Throws:
      RemoteException - thrown for errors
    • propertyChange

      public void propertyChange(PropertyChangeEvent event)
      Listens for a PContactPanel.DELETECONTACT property change event and removes the referenced contact panel from the page. The new value in the event is the reference to the contact panel to be deleted.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      event - Property change event.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Adds a new contact panel on button press of the "New" button.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - The action event
    • refresh

      public void refresh()
      Description copied from class: PMaintenancePage
      Called when the page should be immediately refreshed - typically as a result of the Reset action being invoked by the user.
      Specified by:
      refresh in interface PAccountViewPage
      Overrides:
      refresh in class PMaintenancePage
    • leavingPage

      public void leavingPage() throws PropertyVetoException
      If this page is being hosted by the account creation wizard, shares out the Account Holder contact data for use by any interested pages.
      Specified by:
      leavingPage in interface PWizardPage
      Throws:
      PropertyVetoException
    • getLabel

      public String getLabel()
      Returns the label for this page.
      Specified by:
      getLabel in interface PCCPage
      Overrides:
      getLabel in class PMaintenancePage
      Returns:
      Page label for either the breadcrumb trail or the account creation wizard depending the context in which this page is appearing.
    • recycle

      public void recycle()
      Recycles the page during new account creation.
      Specified by:
      recycle in interface PCCPage
      Overrides:
      recycle in class PMaintenancePage
    • getWizardHelpID

      public String getWizardHelpID()
      Returns the help ID for this page during account creation.
      Specified by:
      getWizardHelpID in interface PWizardPage
      Returns:
      The ID associated with the helpid.acwizard.contactpage tag in the properties file.
    • validateWizardPage

      public void validateWizardPage() throws PValidationException
      Validates this page.
      Specified by:
      validateWizardPage in interface PWizardPage
      Throws:
      PValidationException
      See Also:
    • handleWizardCommitError

      public boolean handleWizardCommitError(com.portal.app.util.CustomerError error)
      Handles commit-time errors.
      Specified by:
      handleWizardCommitError in interface PWizardPage
      Parameters:
      error - The error.
      Returns:
      true if the page will handle the error; otherwise false.
      See Also:
    • addCustomDataToBilling

      protected void addCustomDataToBilling(PContactPanel p)
      Affords the subclass the opportunity to add a custom panel to the bottom of the main billing contact panel. Subclasses should add their custom panel using the setCustomData() method on the passed in PContactPanel.
      Parameters:
      p - The custom panel to display
    • addContactPanel

      protected PContactPanel addContactPanel(int index, boolean newContact)
      Adds a contact panel with model and display field descriptions for all contained Portal-aware widgets based upon the passed-in index.
      Parameters:
      index - used as the index for the new panel's Portal-aware widgets' model and display field descriptions.

      Subclasses wishing to add extra widgets to the contact page should override this method and call the setCustomData() method on the returned PContactPanel
      newContact - true if the panel will host a new contact; false if it will host an existing contact.
      Returns:
      The PContactPanel that was just created
    • itemStateChanged

      public void itemStateChanged(ItemEvent evt)
      Specified by:
      itemStateChanged in interface ItemListener
    • getResourceBundle

      protected final ResourceBundle getResourceBundle()
    • setValidSalutations

      protected final void setValidSalutations(String[] salutations, String defVal)
    • setValidContactTypes

      protected final void setValidContactTypes(String[] ctypes, String defVal)
    • setContactDuplicateCheckOn

      protected final void setContactDuplicateCheckOn(boolean b)
    • setDisableBillingContactType

      protected final void setDisableBillingContactType(boolean b)
    • customizeNow

      protected final void customizeNow()