Package com.portal.app.cc
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
This page supports the addition of custom fields above the phone table. Something along the lines of:
com.portal.app.cc.PContactPage.subclass=MyContactPage
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class com.portal.app.cc.comp.PMaintenancePage
mNeedsRefresh, mPagesCurrentCurrencyFields inherited from class com.portal.bas.comp.PIACustomizablePanel
isTracking, mIAList, mImpl, unregListFields inherited from class com.portal.pfc.ui.ImagePanel
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImageFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Adds a new contact panel on button press of the "New" button.protected PContactPaneladdContactPanel(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.protected voidAffords the subclass the opportunity to add a custom panel to the bottom of the main billing contact panel.protected final voidgetLabel()Returns the label for this page.protected final ResourceBundleReturns the help ID for this page during account creation.booleanhandleWizardCommitError(com.portal.app.util.CustomerError error) Handles commit-time errors.booleanReturnstrueif a contained contact panel for an already-existing contact is marked for deletion or if a contained contact panel has unsaved changes.voidvoidIf this page is being hosted by the account creation wizard, shares out the Account Holder contact data for use by any interested pages.voidListens for aPContactPanel.DELETECONTACTproperty change event and removes the referenced contact panel from the page.voidrecycle()Recycles the page during new account creation.voidrefresh()Called when the page should be immediately refreshed - typically as a result of the Reset action being invoked by the user.voidThis 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.voidsave()Commits maintenance-time changes to Portal.protected final voidsetContactDuplicateCheckOn(boolean b) protected final voidsetDisableBillingContactType(boolean b) voidAt maintenance time, puts in the UI a contact panel for each contact in the account.protected final voidsetValidContactTypes(String[] ctypes, String defVal) protected final voidsetValidSalutations(String[] salutations, String defVal) voidValidates this page.Methods inherited from class com.portal.app.cc.comp.PMaintenancePage
dataNeedsRefresh, enteringPage, getDisplayedCurrency, isValidContext, primaryToSecondary, revertToPrimaryMethods inherited from class com.portal.bas.comp.PIACustomizablePanel
clear, collectData, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, getControllerClassName, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, resetToDefault, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setDefault, setError, setInputTracking, setRequired, setResourceName, togglePrimaryToSecondary, unregister, viewDataChangeMethods inherited from class com.portal.pfc.ui.ImagePanel
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIconMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.portal.app.cc.comp.PCCPage
enteringPageMethods inherited from interface com.portal.app.cc.comp.PWizardPage
collectData
-
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()Returnstrueif 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:
hasUnsavedChangesin interfacePAccountViewPage- Overrides:
hasUnsavedChangesin classPMaintenancePage- Returns:
trueif this page contains a panel with a contact marked for deletion or if it has one or more contact panels with unsaved changes;falseotherwise.
-
resetUnsavedChanges
public void resetUnsavedChanges()Description copied from class:PMaintenancePageThis 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:
resetUnsavedChangesin interfacePAccountViewPage- Overrides:
resetUnsavedChangesin classPMaintenancePage
-
save
Commits maintenance-time changes to Portal.- Specified by:
savein interfacePAccountViewPage- Overrides:
savein classPMaintenancePage- Throws:
PSaveException
-
setModelHandle
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:
setModelHandlein interfacePComponent- Overrides:
setModelHandlein classPIACustomizablePanel- Parameters:
pm- Model handle for the account- Throws:
RemoteException- thrown for errors
-
propertyChange
Listens for aPContactPanel.DELETECONTACTproperty 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:
propertyChangein interfacePropertyChangeListener- Parameters:
event- Property change event.
-
actionPerformed
Adds a new contact panel on button press of the "New" button.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- The action event
-
refresh
public void refresh()Description copied from class:PMaintenancePageCalled when the page should be immediately refreshed - typically as a result of the Reset action being invoked by the user.- Specified by:
refreshin interfacePAccountViewPage- Overrides:
refreshin classPMaintenancePage
-
leavingPage
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:
leavingPagein interfacePWizardPage- Throws:
PropertyVetoException
-
getLabel
Returns the label for this page.- Specified by:
getLabelin interfacePCCPage- Overrides:
getLabelin classPMaintenancePage- 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:
recyclein interfacePCCPage- Overrides:
recyclein classPMaintenancePage
-
getWizardHelpID
Returns the help ID for this page during account creation.- Specified by:
getWizardHelpIDin interfacePWizardPage- Returns:
- The ID associated with the
helpid.acwizard.contactpagetag in the properties file.
-
validateWizardPage
Validates this page.- Specified by:
validateWizardPagein interfacePWizardPage- Throws:
PValidationException- See Also:
-
handleWizardCommitError
public boolean handleWizardCommitError(com.portal.app.util.CustomerError error) Handles commit-time errors.- Specified by:
handleWizardCommitErrorin interfacePWizardPage- Parameters:
error- The error.- Returns:
trueif the page will handle the error; otherwisefalse.- See Also:
-
addCustomDataToBilling
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
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 PContactPanelnewContact-trueif the panel will host a new contact;falseif it will host an existing contact.- Returns:
- The PContactPanel that was just created
-
itemStateChanged
- Specified by:
itemStateChangedin interfaceItemListener
-
getResourceBundle
-
setValidSalutations
-
setValidContactTypes
-
setContactDuplicateCheckOn
protected final void setContactDuplicateCheckOn(boolean b) -
setDisableBillingContactType
protected final void setDisableBillingContactType(boolean b) -
customizeNow
protected final void customizeNow()
-