Package com.portal.app.cc.comp
Class PIACAProfilePanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.portal.pfc.ui.ImagePanel
com.portal.bas.comp.PIACustomizablePanel
com.portal.app.cc.comp.PMaintenancePage
com.portal.app.cc.comp.PIACAProfilePanel
- All Implemented Interfaces:
PAccountViewPage
,PCCPage
,PWizardPage
,PAppComponent
,PClientComponent
,PCollectDataListener
,PComponent
,PComponentAttribute
,PViewDataChangeListener
,ContainerListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
- Direct Known Subclasses:
PCAEmptyProfilePanel
A skeletal profile panel that can be extended and used in an account
creation wizard to gather profile information, and also during account
maintenance to display the profile information.
The default controller associated with this panel takes care of all FList manipulations that need to occur during account creation and modification.
NOTE: If you plan on using more than one profile panel/object per account during account creation, you'll need to specify an index for each (see the
The default controller associated with this panel takes care of all FList manipulations that need to occur during account creation and modification.
NOTE: If you plan on using more than one profile panel/object per account during account creation, you'll need to specify an index for each (see the
setProfileIndex()
method).- 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
collectData
(PCollectDataEvent event) During the account creation process, data will be collected from this panel for storing in a new profile object.protected void
containsProfileObject
(boolean hasProfile) Subclasses can override this if they want to change the appearance of their profile panel if/when the account does not have a profile object of the desired type.Gets the class name for this class's controllerint
Returns the profile index used in commiting profile data.Returns the profile string used in commiting profile data.Help ID for this wizard page.protected void
handleSaveError
(com.portal.app.util.CustomerValErrorData[] err) Subclasses can override this if they want to handle any save error in their profile panel if/when the account does not have a profile object of the desired type.boolean
handleWizardCommitError
(com.portal.app.util.CustomerError error) Handles commit-time errors.boolean
Checks whether the account does have a profile object of the desired type.void
Called before the wizard actually leaves the current page.protected void
Subclasses should override this instead of collectData() if they need to mangle the data that gets sent to Portal.void
save()
Used to save changes to already existing profile objects or create new profile objects (this is not used for account creation, just for existing accounts)void
setModelHandle
(PModelHandle data) Overridden to deal with those accounts that do not have a profile object of the desired type.void
setProfileIndex
(int i) Sets up the profile index to be used in commiting profile data.void
Sets up the profile string to be used in commiting profile data.void
Validates this page.Methods inherited from class com.portal.app.cc.comp.PMaintenancePage
dataNeedsRefresh, enteringPage, getDisplayedCurrency, getLabel, hasUnsavedChanges, isValidContext, primaryToSecondary, recycle, refresh, resetUnsavedChanges, revertToPrimary
Methods inherited from class com.portal.bas.comp.PIACustomizablePanel
clear, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, 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, getLabel, recycle
-
Constructor Details
-
PIACAProfilePanel
public PIACAProfilePanel()Creates a profile panel with a default index of zero
-
-
Method Details
-
setModelHandle
Overridden to deal with those accounts that do not have a profile object of the desired type. Currently this method simply clears the contents of the UI. You could modify this to disable the panel or set the panel invisible.- Specified by:
setModelHandle
in interfacePComponent
- Overrides:
setModelHandle
in classPIACustomizablePanel
- Parameters:
data
- The new model handle representing an account- Throws:
RemoteException
- thrown for errors
-
save
Used to save changes to already existing profile objects or create new profile objects (this is not used for account creation, just for existing accounts)- Specified by:
save
in interfacePAccountViewPage
- Overrides:
save
in classPMaintenancePage
- Throws:
PSaveException
-
collectData
During the account creation process, data will be collected from this panel for storing in a new profile object. The input flist for thisOP_COMMIT_CUSTOMER
needs to look like (assuming a "bank" profile object):0 PIN_FLD_PROFILES ARRAY [0] allocated 2, used 2
1 PIN_FLD_PROFILE_OBJ POID [0] 0.0.0.1 /profile/bank -1 0
1 PIN_FLD_INHERITED_INFO SUBSTRUCT [0] allocated 1, used 1
2 data from your fields here...
This code assumes all fields contained in this panel will have modelFieldDescription properties that start with "FldInheritedInfo.". The FList that is generated while gathering the data from these fields is automatically inserted in a PIN_FLD_PROFILES array for you by this collectData() method so you don't need to do any work.
This also allows you to retain the same modelFieldDescription properties for the account maintenance process and reuse the same panel for both situations. This also creates the correct input flist to work withOP_UPDATE_CUSTOMER
,OP_MODIFY_PROFILE
andOP_CREATE_PROFILE
The input flist forOP_UPDATE_CUSTOMER
:0 PIN_FLD_POID POID[0] 0.0.0.1 /account 1234 111
0 PIN_FLD_PROFILES ARRAY [0] allocated 2, used 2
1 PIN_FLD_PROFILE_OBJ POID [0] 0.0.0.1 /profile/bank 5678 222
1 PIN_FLD_INHERITED_INFO SUBSTRUCT [0] allocated 1, used 1
2 data from your fields here...
The input flist forOP_MODIFY_PROFILE
:0 PIN_FLD_POID POID[0] 0.0.0.1 /profile/bank 5678 222
0 PIN_FLD_INHERITED_INFO SUBSTRUCT [0] allocated 1, used 1
1 data from your fields here...
The input flist forOP_CREATE_PROFILE
:0 PIN_FLD_POID POID[0] 0.0.0.1 /profile/bank -1 0
0 PIN_FLD_ACCOUNT_OBJ POID[0] 0.0.0.1 /account 1234 111
0 PIN_FLD_INHERITED_INFO SUBSTRUCT [0] allocated 1, used 1
1 data from your fields here...- Specified by:
collectData
in interfacePCollectDataListener
- Specified by:
collectData
in interfacePWizardPage
- Overrides:
collectData
in classPIACustomizablePanel
- Parameters:
event
- The marshal data event- See Also:
-
setProfileType
Sets up the profile string to be used in commiting profile data.- Parameters:
s
- the profile string
-
getProfileType
Returns the profile string used in commiting profile data.- Returns:
- profile type
-
setProfileIndex
public void setProfileIndex(int i) Sets up the profile index to be used in commiting profile data. This needs to be set if you have more than one profile panel/object during the account creation process. By default, this is zero.- Parameters:
s
- the profile index
-
getProfileIndex
public int getProfileIndex()Returns the profile index used in commiting profile data.- Returns:
- profile index
-
getControllerClassName
Gets the class name for this class's controller- Specified by:
getControllerClassName
in interfacePComponent
- Overrides:
getControllerClassName
in classPIACustomizablePanel
- Returns:
- a String with the component's controller classname
- Throws:
RemoteException
- thrown for errors
-
hasProfile
public boolean hasProfile()Checks whether the account does have a profile object of the desired type.- Returns:
- true if the account has the profile object; false otherwise
-
getWizardHelpID
Help ID for this wizard page.- Specified by:
getWizardHelpID
in interfacePWizardPage
-
validateWizardPage
Validates this page. (This base class implementation does no validation. A subclass of this class could do its own validation and/or use wizard a framework convenience method to do validation.)- Specified by:
validateWizardPage
in interfacePWizardPage
- Throws:
PValidationException
- See Also:
-
handleWizardCommitError
public boolean handleWizardCommitError(com.portal.app.util.CustomerError error) Handles commit-time errors. Uses the wizard framework convience method to do default commit-time error handling.- Specified by:
handleWizardCommitError
in interfacePWizardPage
- Parameters:
error
- The error.- Returns:
true
if the page will handle the error; otherwisefalse
.- See Also:
-
leavingPage
Called before the wizard actually leaves the current page. If for some reason the implementing page does not want the wizard to leave the page, it should throw a PropertyVetoException.- Specified by:
leavingPage
in interfacePWizardPage
-
localCollectData
Subclasses should override this instead of collectData() if they need to mangle the data that gets sent to Portal. They should- Parameters:
The
- collect data event
-
containsProfileObject
protected void containsProfileObject(boolean hasProfile) Subclasses can override this if they want to change the appearance of their profile panel if/when the account does not have a profile object of the desired type.- Parameters:
hasProfile
- true if the account has the requested profile object; false otherwise
-
handleSaveError
protected void handleSaveError(com.portal.app.util.CustomerValErrorData[] err) Subclasses can override this if they want to handle any save error in their profile panel if/when the account does not have a profile object of the desired type.- Parameters:
an
- array describing any errors encountered while saving
-