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
PContactPanel
s, 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.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested 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, mPagesCurrentCurrency
Fields inherited from class com.portal.bas.comp.PIACustomizablePanel
isTracking, mIAList, mImpl, unregList
Fields inherited from class com.portal.pfc.ui.ImagePanel
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImage
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent event) Adds a new contact panel on button press of the "New" button.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.protected void
Affords the subclass the opportunity to add a custom panel to the bottom of the main billing contact panel.protected final void
getLabel()
Returns the label for this page.protected final ResourceBundle
Returns the help ID for this page during account creation.boolean
handleWizardCommitError
(com.portal.app.util.CustomerError error) Handles commit-time errors.boolean
Returnstrue
if a contained contact panel for an already-existing contact is marked for deletion or if a contained contact panel has unsaved changes.void
void
If this page is being hosted by the account creation wizard, shares out the Account Holder contact data for use by any interested pages.void
Listens for aPContactPanel.DELETECONTACT
property change event and removes the referenced contact panel from the page.void
recycle()
Recycles the page during new account creation.void
refresh()
Called when the page should be immediately refreshed - typically as a result of the Reset action being invoked by the user.void
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.void
save()
Commits maintenance-time changes to Portal.protected final void
setContactDuplicateCheckOn
(boolean b) protected final void
setDisableBillingContactType
(boolean b) void
At maintenance time, puts in the UI a contact panel for each contact in the account.protected final void
setValidContactTypes
(String[] ctypes, String defVal) protected final void
setValidSalutations
(String[] salutations, String defVal) void
Validates this page.Methods inherited from class com.portal.app.cc.comp.PMaintenancePage
dataNeedsRefresh, enteringPage, getDisplayedCurrency, isValidContext, primaryToSecondary, revertToPrimary
Methods 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, viewDataChange
Methods inherited from class com.portal.pfc.ui.ImagePanel
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIcon
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods 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, update
Methods 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, validateTree
Methods 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, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.portal.app.cc.comp.PCCPage
enteringPage
Methods 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()Returnstrue
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 interfacePAccountViewPage
- Overrides:
hasUnsavedChanges
in classPMaintenancePage
- 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 interfacePAccountViewPage
- Overrides:
resetUnsavedChanges
in classPMaintenancePage
-
save
Commits maintenance-time changes to Portal.- Specified by:
save
in interfacePAccountViewPage
- Overrides:
save
in 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:
setModelHandle
in interfacePComponent
- Overrides:
setModelHandle
in classPIACustomizablePanel
- Parameters:
pm
- Model handle for the account- Throws:
RemoteException
- thrown for errors
-
propertyChange
Listens for aPContactPanel.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 interfacePropertyChangeListener
- Parameters:
event
- Property change event.
-
actionPerformed
Adds a new contact panel on button press of the "New" button.- Specified by:
actionPerformed
in interfaceActionListener
- 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 interfacePAccountViewPage
- Overrides:
refresh
in 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:
leavingPage
in interfacePWizardPage
- Throws:
PropertyVetoException
-
getLabel
Returns the label for this page.- Specified by:
getLabel
in interfacePCCPage
- Overrides:
getLabel
in 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:
recycle
in interfacePCCPage
- Overrides:
recycle
in classPMaintenancePage
-
getWizardHelpID
Returns the help ID for this page during account creation.- Specified by:
getWizardHelpID
in interfacePWizardPage
- Returns:
- The ID associated with the
helpid.acwizard.contactpage
tag in the properties file.
-
validateWizardPage
Validates this page.- Specified by:
validateWizardPage
in interfacePWizardPage
- Throws:
PValidationException
- See Also:
-
handleWizardCommitError
public boolean handleWizardCommitError(com.portal.app.util.CustomerError error) Handles commit-time errors.- Specified by:
handleWizardCommitError
in interfacePWizardPage
- Parameters:
error
- The error.- Returns:
true
if 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
-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
- Specified by:
itemStateChanged
in interfaceItemListener
-
getResourceBundle
-
setValidSalutations
-
setValidContactTypes
-
setContactDuplicateCheckOn
protected final void setContactDuplicateCheckOn(boolean b) -
setDisableBillingContactType
protected final void setDisableBillingContactType(boolean b) -
customizeNow
protected final void customizeNow()
-