com.sapportals.htmlb
Class DateNavigatorModel
java.lang.Object
com.sapportals.htmlb.DateNavigatorModel
- public class DateNavigatorModel
- extends Object
Provide model for the DateNavigator.
This is mainly of interest for JSPs that want to pass an object
that contains all data the DateNavigator tag needs.
This prevents from specifying complex data such as DayRanges with JSP tags.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateNavigatorModel
public DateNavigatorModel(IPageContext pc)
- Create DateNavigatorModel. The page context is used to get the browsers default locale.
- Parameters:
pc - IPageContext used to look up locale
DateNavigatorModel
public DateNavigatorModel()
- Create DateNavigatorModel. The page context is used to get the servers locale.
During rendering the browsers default locale will be used.
Better to use the constructor that specifies the page context.
Some date calculations may be incorrect for your locale.
setLocale
public void setLocale(Locale l)
- Set fixed locale to use for Date calculations and rendering.
Disables use of browsers default locale for the DateNavigator,
so use this method with caution. Usage of Default locale is
generally better than setting the locale explicitely to allow
Users to be able to determine locale by browser settings.
getCenteredMonth
public Integer getCenteredMonth()
- Get centered month.
- Returns:
- currently centered month (int as defined by java.util.Calendar), possibly null if never set
setCenteredMonth
public void setCenteredMonth(int centeredMonth)
- Set Month that should be centered on rendering.
This setting determines the month that will be displayed
in a center position among all the months that are displayed.
If only one month is displayed, this selects the month to be rendered.
If the centered month is not set, it defaults to the current month
in the current year.
- Parameters:
centeredMonth - int defining the month to be centered (see java.util.Calendar)
getCenteredYear
public Integer getCenteredYear()
- Get centered year.
- Returns:
- year of centered month, possibly null if year was never set
setCenteredYear
public void setCenteredYear(int centeredYear)
- Set year of month that should be centered on rendering.
This setting determines the month that will be displayed
in a center position among all the months that are displayed.
If only one month is displayed, this selects the month to be rendered.
If the centered year is not set, it defaults to the current year.
- Parameters:
centeredYear - int specifying the year of the centered month
getToday
public Date getToday()
- Get the day that should be rendered as the current date.
- Returns:
- the last date set as today, (defaults to creation date if never set)
setToday
public void setToday(Date today)
- Set the day that should be rendered as the current date.
- Parameters:
today - Date specifying the current date
getSelectedDays
public DayRanges getSelectedDays()
- Get the DayRanges instance.
DayRanges specify which day should be rendered in one of the selected modes.
- Returns:
- DayRanges instance
setSelectedDays
public void setSelectedDays(DayRanges selectedDays)
- Set the DayRanges instance.
DayRanges specify which day should be rendered in one of the selected modes.
- Parameters:
selectedDays - DayRanges instance
getCalendar
public Calendar getCalendar()
- Get Calendar instance used by DateNavigatorModel.
This Calendar is initialized to the same locale as the DateNavigator itself.
Use this calendar to create java.util.Date instances and for manipulating
dates.
getLocale
public Locale getLocale()
- Get locale. This will to be the default locale (taken from IPageContext)
if not explicitely set by resetLocale().
- Returns:
- locale (see java.util.Locale)
isLocaleUnknown
public boolean isLocaleUnknown()
- Indicate if the locale has not been explicitely set and should
switch to browsers default locale during rendering.
- Returns:
- boolean indicating if locale should be switched
setLocaleUnknown
protected void setLocaleUnknown(boolean localeUnknown)
- specify whether locale has not been explicitely set and should
switch to browsers default locale during rendering.
- Parameters:
localeUnknown - indicating if locale should be switched
Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.