Project Wonder 5.0

er.directtoweb.components.misc
Class ERDSavedQueriesComponent

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by er.directtoweb.components.misc.ERDSavedQueriesComponent
All Implemented Interfaces:
com.webobjects.appserver.WOActionResults, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ERNEUSavedQueriesComponent

public abstract class ERDSavedQueriesComponent
extends com.webobjects.appserver.WOComponent

This Component will store the forms values in the displayGroup of a Query Page into user preferences under a saved name. The list of saved queries will be available in the popup for future use. Preference key = "SavedQueryFor"+pageConfiguration The ERNEUQueryPage has been modified to switch in the value of the rule keyPath = "savedQueryComponentName" So, if you want this component to appear on your query page, create a rule defining savedQueryComponentName="ERNEUSavedQueriesComponent"

See Also:
Serialized Form
Author:
dscheck

Nested Class Summary
static class ERDSavedQueriesComponent._TimestampSupport
           
static interface ERDSavedQueriesComponent.RequestParams
          interface to organize the request params used in this class
static class ERDSavedQueriesComponent.SavedQuery
           
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
 ERDSavedQueriesComponent.SavedQuery aSavedQuery
           
 java.lang.String DEFAULT_QUERY_NONE
           
static org.apache.log4j.Logger log
           
 boolean needsAutoSubmit
           
static com.webobjects.eocontrol.EOKeyValueArchiving.Support newEOKVArchiningTimestampSupport
          Deprecated. use newEOKVArchivingTimestampSupport
static com.webobjects.eocontrol.EOKeyValueArchiving.Support newEOKVArchivingTimestampSupport
           
 java.lang.String newQueryName
           
static com.webobjects.eocontrol.EOKeyValueArchiving.Support originalEOKVArchiningTimestampSupport
          Deprecated. use originalEOKVArchivingTimestampSupport
static com.webobjects.eocontrol.EOKeyValueArchiving.Support originalEOKVArchivingTimestampSupport
           
 ERDSavedQueriesComponent.SavedQuery selectedSavedQuery
           
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
ERDSavedQueriesComponent(com.webobjects.appserver.WOContext context)
           
 
Method Summary
 com.webobjects.appserver.WOComponent addNewQuery()
           
 boolean autoSubmitEnabled()
           
 com.webobjects.appserver.WOComponent clearForm()
           
 com.webobjects.directtoweb.D2WContext d2wContext()
           
 java.lang.String defaultQueryNameForPageConfiguration(java.lang.String pageConfigurationName)
           
 com.webobjects.appserver.WOComponent deleteAllSavedQueries()
           
 com.webobjects.appserver.WOComponent deleteCurrentQuery()
           
 com.webobjects.appserver.WODisplayGroup displayGroup()
           
 java.lang.String fetchSavedQueryResultsLink()
          For this method to work properly, a valid action should be passed in as a binding for key: directActionNameToFetchSavedQueryResults
 boolean hasNoSavedQueries()
           
 boolean isDefaultQuery(ERDSavedQueriesComponent.SavedQuery aQuery)
           
 boolean isNoSelectedQuery()
           
 boolean isSelectedQueryTheDefault()
           
 boolean isStateless()
          component is not stateless
 com.webobjects.foundation.NSMutableArray loadSavedQueriesForPageConfigurationNamed(java.lang.String pageConfigurationName)
           
 com.webobjects.appserver.WOComponent makeDefaultSavedQuery()
           
 java.lang.String pageConfiguration()
           
 com.webobjects.appserver.WOComponent popupChangedSelection()
           
 com.webobjects.foundation.NSDictionary queryParamsToFetchSavedQueryResults()
           
 com.webobjects.appserver.WOComponent refresh()
           
 com.webobjects.foundation.NSMutableArray savedQueries()
           
static com.webobjects.foundation.NSDictionary savedQueriesForPageConfigurationNamed(com.webobjects.appserver.WOSession session, java.lang.String pageConfigurationName)
          retrieves the saved queries for the given pageConfiguration and returns a dictionary where the key is the name of the savedQuery and value is the savedQuery itself.
 void saveQueriesForPageConfigurationNamed(com.webobjects.foundation.NSArray queries, java.lang.String pageConfigurationName)
           
 void setAutoSubmitEnabled(boolean b)
           
 void setDefaultQueryNameForPageConfiguration(java.lang.String aName, java.lang.String pageConfigurationName)
           
 boolean showBookmarkableQueryResultsLink()
           
 void sleep()
           
 boolean synchronizesVariablesWithBindings()
          component does not synchronize variables
 com.webobjects.appserver.WOComponent updateCurrentQuery()
           
static java.lang.String userPreferenceNameForAutoSubmitWithPageConfiguration(java.lang.String pageConfiguration)
           
static java.lang.String userPreferenceNameForDefaultQueryWithPageConfiguration(java.lang.String pageConfiguration)
           
static java.lang.String userPreferenceNameForPageConfiguration(java.lang.String pageConfiguration)
           
protected  com.webobjects.foundation.NSKeyValueCoding userPreferences()
           
 
Methods inherited from class com.webobjects.appserver.WOComponent
_associationWithName, _awakeInContext, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Logger log

originalEOKVArchivingTimestampSupport

public static final com.webobjects.eocontrol.EOKeyValueArchiving.Support originalEOKVArchivingTimestampSupport

newEOKVArchivingTimestampSupport

public static final com.webobjects.eocontrol.EOKeyValueArchiving.Support newEOKVArchivingTimestampSupport

originalEOKVArchiningTimestampSupport

public static final com.webobjects.eocontrol.EOKeyValueArchiving.Support originalEOKVArchiningTimestampSupport
Deprecated. use originalEOKVArchivingTimestampSupport

newEOKVArchiningTimestampSupport

public static final com.webobjects.eocontrol.EOKeyValueArchiving.Support newEOKVArchiningTimestampSupport
Deprecated. use newEOKVArchivingTimestampSupport

aSavedQuery

public ERDSavedQueriesComponent.SavedQuery aSavedQuery

selectedSavedQuery

public ERDSavedQueriesComponent.SavedQuery selectedSavedQuery

newQueryName

public java.lang.String newQueryName

DEFAULT_QUERY_NONE

public final java.lang.String DEFAULT_QUERY_NONE
See Also:
Constant Field Values

needsAutoSubmit

public boolean needsAutoSubmit
Constructor Detail

ERDSavedQueriesComponent

public ERDSavedQueriesComponent(com.webobjects.appserver.WOContext context)
Method Detail

userPreferences

protected com.webobjects.foundation.NSKeyValueCoding userPreferences()

userPreferenceNameForPageConfiguration

public static java.lang.String userPreferenceNameForPageConfiguration(java.lang.String pageConfiguration)

userPreferenceNameForDefaultQueryWithPageConfiguration

public static java.lang.String userPreferenceNameForDefaultQueryWithPageConfiguration(java.lang.String pageConfiguration)

userPreferenceNameForAutoSubmitWithPageConfiguration

public static java.lang.String userPreferenceNameForAutoSubmitWithPageConfiguration(java.lang.String pageConfiguration)

loadSavedQueriesForPageConfigurationNamed

public com.webobjects.foundation.NSMutableArray loadSavedQueriesForPageConfigurationNamed(java.lang.String pageConfigurationName)

savedQueriesForPageConfigurationNamed

public static com.webobjects.foundation.NSDictionary savedQueriesForPageConfigurationNamed(com.webobjects.appserver.WOSession session,
                                                                                           java.lang.String pageConfigurationName)
retrieves the saved queries for the given pageConfiguration and returns a dictionary where the key is the name of the savedQuery and value is the savedQuery itself.

Parameters:
session - WOSession - to check if there is a session level ERCoreUserPreferences set
pageConfigurationName - String
Returns:
NSDictionary
key - String name of savedQuery
value - ERDSavedQueriesComponent.SavedQuery

saveQueriesForPageConfigurationNamed

public void saveQueriesForPageConfigurationNamed(com.webobjects.foundation.NSArray queries,
                                                 java.lang.String pageConfigurationName)

synchronizesVariablesWithBindings

public boolean synchronizesVariablesWithBindings()
component does not synchronize variables

Overrides:
synchronizesVariablesWithBindings in class com.webobjects.appserver.WOComponent

isStateless

public boolean isStateless()
component is not stateless

Overrides:
isStateless in class com.webobjects.appserver.WOComponent

sleep

public void sleep()
Overrides:
sleep in class com.webobjects.appserver.WOComponent

d2wContext

public com.webobjects.directtoweb.D2WContext d2wContext()

displayGroup

public com.webobjects.appserver.WODisplayGroup displayGroup()

pageConfiguration

public java.lang.String pageConfiguration()

savedQueries

public com.webobjects.foundation.NSMutableArray savedQueries()

popupChangedSelection

public com.webobjects.appserver.WOComponent popupChangedSelection()

refresh

public com.webobjects.appserver.WOComponent refresh()

autoSubmitEnabled

public boolean autoSubmitEnabled()

setAutoSubmitEnabled

public void setAutoSubmitEnabled(boolean b)

addNewQuery

public com.webobjects.appserver.WOComponent addNewQuery()

updateCurrentQuery

public com.webobjects.appserver.WOComponent updateCurrentQuery()

deleteCurrentQuery

public com.webobjects.appserver.WOComponent deleteCurrentQuery()

deleteAllSavedQueries

public com.webobjects.appserver.WOComponent deleteAllSavedQueries()

clearForm

public com.webobjects.appserver.WOComponent clearForm()

makeDefaultSavedQuery

public com.webobjects.appserver.WOComponent makeDefaultSavedQuery()

defaultQueryNameForPageConfiguration

public java.lang.String defaultQueryNameForPageConfiguration(java.lang.String pageConfigurationName)

setDefaultQueryNameForPageConfiguration

public void setDefaultQueryNameForPageConfiguration(java.lang.String aName,
                                                    java.lang.String pageConfigurationName)

isSelectedQueryTheDefault

public boolean isSelectedQueryTheDefault()

isNoSelectedQuery

public boolean isNoSelectedQuery()

hasNoSavedQueries

public boolean hasNoSavedQueries()

isDefaultQuery

public boolean isDefaultQuery(ERDSavedQueriesComponent.SavedQuery aQuery)

queryParamsToFetchSavedQueryResults

public com.webobjects.foundation.NSDictionary queryParamsToFetchSavedQueryResults()

fetchSavedQueryResultsLink

public java.lang.String fetchSavedQueryResultsLink()
For this method to work properly, a valid action should be passed in as a binding for key: directActionNameToFetchSavedQueryResults

Returns:
String - link to the DA which knows how to fetch the query results given the saved query name

showBookmarkableQueryResultsLink

public boolean showBookmarkableQueryResultsLink()
Returns:
Boolean
true, only if valid named query has been selected and the binding to the key: 'directActionNameToFetchSavedQueryResults' points to a valid directAction
false, otherwise

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.