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:
WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable
Direct Known Subclasses:
ERNEUSavedQueriesComponent

public class ERDSavedQueriesComponent
extends 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
WOComponent._EventLoggingEnabler, WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
 ERDSavedQueriesComponent.SavedQuery aSavedQuery
           
 String DEFAULT_QUERY_NONE
           
static Logger log
           
 boolean needsAutoSubmit
           
static EOKeyValueArchiving.Support newEOKVArchiningTimestampSupport
          Deprecated. use newEOKVArchivingTimestampSupport
static EOKeyValueArchiving.Support newEOKVArchivingTimestampSupport
           
 String newQueryName
           
static EOKeyValueArchiving.Support originalEOKVArchiningTimestampSupport
          Deprecated. use originalEOKVArchivingTimestampSupport
static 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(WOContext context)
           
 
Method Summary
 WOComponent addNewQuery()
           
 boolean autoSubmitEnabled()
           
 WOComponent clearForm()
           
 com.webobjects.directtoweb.D2WContext d2wContext()
           
 String defaultQueryNameForPageConfiguration(String pageConfigurationName)
           
 WOComponent deleteAllSavedQueries()
           
 WOComponent deleteCurrentQuery()
           
 WODisplayGroup displayGroup()
           
 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
 NSMutableArray loadSavedQueriesForPageConfigurationNamed(String pageConfigurationName)
           
 WOComponent makeDefaultSavedQuery()
           
 String pageConfiguration()
           
 WOComponent popupChangedSelection()
           
 NSDictionary queryParamsToFetchSavedQueryResults()
           
 WOComponent refresh()
           
 NSMutableArray savedQueries()
           
static NSDictionary savedQueriesForPageConfigurationNamed(WOSession session, 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(NSArray queries, String pageConfigurationName)
           
 void setAutoSubmitEnabled(boolean b)
           
 void setDefaultQueryNameForPageConfiguration(String aName, String pageConfigurationName)
           
 boolean showBookmarkableQueryResultsLink()
           
 void sleep()
           
 boolean synchronizesVariablesWithBindings()
          component does not synchronize variables
 WOComponent updateCurrentQuery()
           
static String userPreferenceNameForAutoSubmitWithPageConfiguration(String pageConfiguration)
           
static String userPreferenceNameForDefaultQueryWithPageConfiguration(String pageConfiguration)
           
static String userPreferenceNameForPageConfiguration(String pageConfiguration)
           
protected  NSKeyValueCoding userPreferences()
           
 
Methods inherited from class com.webobjects.appserver.WOComponent
__valueForBinding, _associationWithName, _awakeInContext, _childTemplate, _cleanUpStatelessComponent, _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, setVariableValueForName, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

public static final Logger log

originalEOKVArchivingTimestampSupport

public static final EOKeyValueArchiving.Support originalEOKVArchivingTimestampSupport

newEOKVArchivingTimestampSupport

public static final EOKeyValueArchiving.Support newEOKVArchivingTimestampSupport

originalEOKVArchiningTimestampSupport

public static final EOKeyValueArchiving.Support originalEOKVArchiningTimestampSupport
Deprecated. use originalEOKVArchivingTimestampSupport

newEOKVArchiningTimestampSupport

public static final EOKeyValueArchiving.Support newEOKVArchiningTimestampSupport
Deprecated. use newEOKVArchivingTimestampSupport

aSavedQuery

public ERDSavedQueriesComponent.SavedQuery aSavedQuery

selectedSavedQuery

public ERDSavedQueriesComponent.SavedQuery selectedSavedQuery

newQueryName

public String newQueryName

DEFAULT_QUERY_NONE

public final String DEFAULT_QUERY_NONE
See Also:
Constant Field Values

needsAutoSubmit

public boolean needsAutoSubmit
Constructor Detail

ERDSavedQueriesComponent

public ERDSavedQueriesComponent(WOContext context)
Method Detail

userPreferences

protected NSKeyValueCoding userPreferences()

userPreferenceNameForPageConfiguration

public static String userPreferenceNameForPageConfiguration(String pageConfiguration)

userPreferenceNameForDefaultQueryWithPageConfiguration

public static String userPreferenceNameForDefaultQueryWithPageConfiguration(String pageConfiguration)

userPreferenceNameForAutoSubmitWithPageConfiguration

public static String userPreferenceNameForAutoSubmitWithPageConfiguration(String pageConfiguration)

loadSavedQueriesForPageConfigurationNamed

public NSMutableArray loadSavedQueriesForPageConfigurationNamed(String pageConfigurationName)

savedQueriesForPageConfigurationNamed

public static NSDictionary savedQueriesForPageConfigurationNamed(WOSession session,
                                                                 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(NSArray queries,
                                                 String pageConfigurationName)

synchronizesVariablesWithBindings

public boolean synchronizesVariablesWithBindings()
component does not synchronize variables

Overrides:
synchronizesVariablesWithBindings in class WOComponent

isStateless

public boolean isStateless()
component is not stateless

Overrides:
isStateless in class WOComponent

sleep

public void sleep()
Overrides:
sleep in class WOComponent

d2wContext

public com.webobjects.directtoweb.D2WContext d2wContext()

displayGroup

public WODisplayGroup displayGroup()

pageConfiguration

public String pageConfiguration()

savedQueries

public NSMutableArray savedQueries()

popupChangedSelection

public WOComponent popupChangedSelection()

refresh

public WOComponent refresh()

autoSubmitEnabled

public boolean autoSubmitEnabled()

setAutoSubmitEnabled

public void setAutoSubmitEnabled(boolean b)

addNewQuery

public WOComponent addNewQuery()

updateCurrentQuery

public WOComponent updateCurrentQuery()

deleteCurrentQuery

public WOComponent deleteCurrentQuery()

deleteAllSavedQueries

public WOComponent deleteAllSavedQueries()

clearForm

public WOComponent clearForm()

makeDefaultSavedQuery

public WOComponent makeDefaultSavedQuery()

defaultQueryNameForPageConfiguration

public String defaultQueryNameForPageConfiguration(String pageConfigurationName)

setDefaultQueryNameForPageConfiguration

public void setDefaultQueryNameForPageConfiguration(String aName,
                                                    String pageConfigurationName)

isSelectedQueryTheDefault

public boolean isSelectedQueryTheDefault()

isNoSelectedQuery

public boolean isNoSelectedQuery()

hasNoSavedQueries

public boolean hasNoSavedQueries()

isDefaultQuery

public boolean isDefaultQuery(ERDSavedQueriesComponent.SavedQuery aQuery)

queryParamsToFetchSavedQueryResults

public NSDictionary queryParamsToFetchSavedQueryResults()

fetchSavedQueryResultsLink

public 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: Wed, Feb 22, 2012 • 07:00 AM EST

Copyright © 2002 – 2011 Project Wonder.