USING CALENDAR POPUP REMINDER IN IM

Hi,
I try to receive the reminder from CALDENDAR SERVER.
When I start the imserver, I always have the agent-calendar which is stopped after a few seconds.
In the agent-calendar.log, I have this :
10:03:00,724 FATAL agent-calendar [main] Intialization failed
The version of IMS is 7.0,REV=2004.11.24.05.19.40.
The version of CS is Sun Java System Calendar Server 6 2005Q1 (built Nov 29 2004) .
Could someone help me to use this fonctionnality ?
Thanks.

Sujay,
It's always frustrating when someone says "it is giving me exception" without providing the details. It's akin to going to your automobile mechanic and saying, "a warning light comes on." Wouldn't you think it pertinent to tell the mechanic which warning light came on? If yes, then why wouldn't you provide the exception (and perhaps the pertinent part of the stack trace) here?
Furthermore, since it works in a "very simple page," the component does at least work part of the time. If your car started at least part of the time, you'd tell your mechanic what you did that causes it not to start (for example, when I leave the headlamps on all night, it doesn't start the following morning). So... what is special about your page that it doesn't work?
Best,
John

Similar Messages

  • Calendar popup for a date field in ITS service

    Hi
    I am working with SRM EBP module we want to add date help(with calendar function) to existing date fields in Shopping cart and PO screens . I found some HTML and scripts in SYSTEM and BBPGLOBAL(assuming in regular ITS this service might be GLOBAL) services but not sure which ones to use if anyone used date functionality or even have access to Standard SAP ITS screens that already have date field with calendar functionality can you help???????????????
    Scenario what we are trying to do
    1) On the shopping cart details there is a require on field
    2) we are trying to add a f4 icon(which we did successfully)
    3) when a click happens on the icon a calendar popup should appear(for this we are trying to identify what standard SAP function we can use if not i got a JavaScript on the web trying to see how to integrate that script)
    Thanks in Advance

    Hi
    I browsed thru other services i found PZLE_06 and there is a date field with popup but difference between ESS and SRM is ESS i saw uses webgui concept and SRM has different approach if you can point me to the html template in one of the service where the calendar function is called that will be helpful i tried no luck i got the funciton issue is integrating it with existing code in HTML i mean calling the javascript from HTML i am not able to .
    Thank You
    Vineela

  • Calendar popup is not working properly in af:inputDate

    HI,
    I am using af:inputDate component as,
    <af:inputDate label="Input Date :"/>
    The popup calendar is not working properly in my case. When I click on calendar buttong of the component, it is opening the calendar popup properly with showing proper date.
    Now in this popup I am able to change month or year only once. Means if I am watching January month initialy and now I changed it to May, it reflect the month properly. But before closing the dialog, if I again change the month to some another month, it is not changing the calendar at all. The same case is with year also.
    One more thing i want you to notice is, this component is working properly on a sample page where there is nothing in that page. But when I am adding it in my application with the same tag, it is not working.
    Can any one tell me where I should look for the fix?
    Sujay

    Sujay,
    It's always frustrating when someone says "it is giving me exception" without providing the details. It's akin to going to your automobile mechanic and saying, "a warning light comes on." Wouldn't you think it pertinent to tell the mechanic which warning light came on? If yes, then why wouldn't you provide the exception (and perhaps the pertinent part of the stack trace) here?
    Furthermore, since it works in a "very simple page," the component does at least work part of the time. If your car started at least part of the time, you'd tell your mechanic what you did that causes it not to start (for example, when I leave the headlamps on all night, it doesn't start the following morning). So... what is special about your page that it doesn't work?
    Best,
    John

  • Opening a meeting from the popup reminder

    In Netscape Calendar, from the popup reminder there was an [undocumented?] keystroke to open the meeting details. If I remember correctly, this was Ctrl+O. This does not work in Oracle Calendar. Nor do any other logical key strokes that I can think of. Can anyone please advise me how to do this. Tx.

    Hello everyone !
    I backed up my Ipad, then restored it and... It works
    Hope It will help some of you. I was soooo deperate and then, I can get back to work

  • Af:inputDate not refreshing Calendar popup

    HI,
    I am facing one strange problem with af:inputDate component. When you click on calendar icon of this field it opens the Calendar popup to choose the date. Now it is allowing changing the date only one time. It allows me only to change year/month once. Now suppose it is displaying "January" month at the start, if i change the month to "May", it refreshes the calendar. But after that if i change year/month, it doesnt refresh the calendar.
    I think there is some problem with some scripts.
    Did any one come across such problem?
    - Sujay.

    Do you have your inputDate in a toolbar? I have almost the same problem when I try to use inputDate in a toolbar (in a dvt:schedulingGantt component if that matters), but not if I place it elsewhere on the page. The difference is that for me the calendar is never updated when I change anything. It seems to me that there is something wrong with the javascript part of it. I can pick any month from the drop-down, but only one month right/left with the arrows. In either case nothing happens in the calendar.
    This seems like a bug to me.
    Anyway, if you haven't solved this yet, try putting the inputDate somewhere else and see if that helps.

  • Can I make a birthday reminder repeat every year? (Using the Birthday Reminder List)

    I see that when I enter contact birthdays they show up on my calendar...great.  But what about the children of my contacts?  I thought I would enter their birthdates using the Birthday Reminder List, but when I enter their birthday, it insists on entering the due date....will this reminder keep repeating each year?  If not, there's no sense in entering the birthdate.  I know I can set up an annually repeating event for the birthday but it just seems like I should be able to use the Birthday Reminder List for this.   Thanks

    Here's what I've done which may work for others.  I've scrapped the idea of using the birthday reminders function.  Instead, I created a new calendar (click the settings icon in the upper right of the icloud website) called "Birthdays-Non Contact".  Then I entered the missing bdays as all day events (repeating every year) on this calendar.  So now all my birthdays show on my main calendar....some come from the birthday field in the contacts database and the rest come from my newly created "Birthdays-Non Contact" calendar events. 
    Interestingly, if I choose to show only my "Birthdays-Non Contact" calendar, all my contact birthdays appear on it as well, so it gives a complete list of all my birthdays and nothing else....cool.
    I should say, everything I'm talking about is what I see on the ICloud site.  My husband has the phone at the moment which I presume will show the same picture.

  • Calendar popup in WAD - Urgent

    In web application designer - I need to incorporte date function which should have a calendar popup.  I need to select date from the calendar.
    This is happening in bex - query level, but when use the same query in WAD , it is not showing the popup.
    Give me your valuble suggestion to incorporate in our real time scenario.
    regards,
    Giri

    hi kiran,
    thx for your spontaneous reply,
    reg. my scenario i already enabled the force variable option, but still i am not getting a calenar like popup.
    for example, the user wants to enter your date of birth, u will be displayed with the calendar month popup, u can select the date from the popup.
    kindly forward your suggestion, i will asssign points if its useful
    regards
    giri

  • Display Hijri Calendar in Calendar Popup

    Hi All,
    We have a requirement of showing Hijri Calendar instead of Gregorian Calendar in the Calendar popup. we have a custom calendar.
    We would like to know the javascript function fired on click of calendar icon.
    For example in OA Framework the function
    "function _ldp{}" in Common2_2_24_1.js is fired. Similary is there any method in ADF.
    So that i can display the hijri date to the user.
    I am using JDeveloper 10.1.3.3, ADF, EJB3.0 and Toplink.
    Thanks & Regards
    Vimalan Balan

    Hi Frank,
    The below is the generated code from the html. There i found out the method which we click on the image icon of select input date.
    onclick="_ldp('eGovPO','eGovPO:poRequestedDateH');
    The javascript file in the generated html is /EGovPortal/adf/jsLibs/Common10_1_3_3_0.js but i am not able to locate this file in the JDeveloper.
    Since, i want to call my custom application from the standard function _ldp(). Otherwise i have to create calendar icon for each textfield to invoke my hijiri calendar.
    But i don't want to do this.
    <table id="eGovPO:poRequestedDateH__xc_" cellpadding="0" cellspacing="0" border="0" summary=""><tr><td class="xx" nowrap width="37%"><span class="xc"><span title="&#1605;&#1591;&#1604;&#1608;&#1576;" class="xi">*</span> <label for="eGovPO:poRequestedDateH">PO Date</label></span></td><td width="12"><script>t(12)</script></td><td valign="top" nowrap width="63%"><script>var _locale='ar';var _tLocale='ar';</script><script src="/EGovPortal/adf/jsLibs/resources/LocaleElements_ar10_1_3_3_0.js;jsessionid=c0a801d423218ce20d54d4c144c38f2e9e0117db66d5"></script><script>var _df2DYS=1950;</script><input id="eGovPO:poRequestedDateH" name="eGovPO:poRequestedDateH" onblur="_dfb(this)" class="x8" size="10" type="text"><script>t(8,1)</script><script>var _jspDir='/EGovPortal/faces/__ADFv__?_afPfm=1';</script><script>var _uixLocaleTZ=180;</script><a href="#" onclick="_ldp('eGovPO','eGovPO:poRequestedDateH'); return false"><img src="/EGovPortal/adf/images/oracle/dprtl.gif;jsessionid=c0a801d423218ce20d54d4c144c38f2e9e0117db66d5" width="19" height="24" border="0" alt="&#1581;&#1583;&#1583; &#1607;&#1584;&#1575; &#1575;&#1604;&#1582;&#1610;&#1575;&#1585; &#1604;&#1604;&#1608;&#1589;&#1608;&#1604; &#1573;&#1604;&#1609; &#1605;&#1606;&#1578;&#1602;&#1610; &#1575;&#1604;&#1578;&#1575;&#1585;&#1610;&#1582;" align="middle"></a></td></tr></table>
    Thanks & Regards
    Vimalan Balan

  • Refresh of report hides jQuery calendar popup anchors

    In an attempt to build an interactive tabular form in Oracle Apex 4.0.2.00.07, we have based an interactive report on a query containing:
    SELECT ...
         , apex_item.date_popup2( p_idx              => 11
                                , p_value            => to_char(..., 'DD.MM.YYYY')
                                , p_date_format      => 'DD.MM.YYYY'
                                , p_size             => 12
                                , p_maxlength        => 10
                                , p_attributes       => 'onchange="..."'
                                , p_item_id          => 'f11_' || to_char(deincno)      -- deincno = primary key column
                                , p_show_on          => 'both'
    FROM   ...This renders perfectly. However, any interactive change in the report (filtering, sorting, hiding/showing columns, ...) will hide the calendar popup anchors, reducing the field to a normal text box. Only when the page is reloaded do the calendar popup anchors reappear.
    Any help or advice on how to prevent these anchors from dissapearing would be greatly appreciated.

    You need to rebuild the date pickers after the apexafterrefresh jquery event
    If you look at your page source > scroll to the bottom and you will see some jquery code that builds date-pickers initially on the page load
    (function(){apex.widget.datepicker("#f11_7369", { buttonImage: "/i/asfdcldr.gif", buttonImageOnly: true,"buttonText":"Calendar","showTime":false,"defaultDate":new Date(1980,11,17),"showOn":"button","showOtherMonths":false,"changeMonth":false,"changeYear":false}, "dd.mm.yy", "en-gb");})();You can look into your above code and find some of the contextual/dynamic parameters into the date-picker widget such as date format,image path etc...
    You can use those values to add this code accordingly
    Add this to your page header javascript
    apex.jQuery('#apexir_WORKSHEET_REGION').bind("apexafterrefresh", function () {
         // loop through the actual f11 column
         jQuery.each($('input[name="f11"]'), function () {
              //rebuild the datepickers
              var vid = "#" + $(this).attr('id');
              (function () {
                   apex.widget.datepicker(vid, {
                        buttonImage : "/i/asfdcldr.gif",
                        buttonImageOnly : true,
                        "buttonText" : "Calendar",
                        "showTime" : false,
                        "showOn" : "button",
                        "showOtherMonths" : false,
                        "changeMonth" : false,
                        "changeYear" : false
                   }, "dd.mm.yy", "en-gb");
    OR create a dynamic action with event after refresh and with action execute javascript
    // loop through the actual f11 column
    jQuery.each($('input[name="f11"]'), function () {
              //rebuild the datepickers
              var vid = "#" + $(this).attr('id');
              (function () {
                   apex.widget.datepicker(vid, {
                        buttonImage : "/i/asfdcldr.gif",
                        buttonImageOnly : true,
                        "buttonText" : "Calendar",
                        "showTime" : false,
                        "showOn" : "button",
                        "showOtherMonths" : false,
                        "changeMonth" : false,
                        "changeYear" : false
                   }, "dd.mm.yy", "en-gb");
    });Edited by: VC on Jun 19, 2012 11:01 AM

  • How to use the location reminder

    When I first accessed the new reminders app I clicked 'do not use my location'. However, I want to use the location reminder, but I can not find it in my settings to change my preferences. Anyone know how to turn the location on? Does it even work on 3GS?

    This worked for me as well.  Thanks!
    shafir,
    I had the same problem. By trial and error I turned off the reminders coming from my work-place microsoft exchange server account in "Mail, Contacts, Calendars". Left mail, and calendar, contacts etc on but turned off reminders. The only reminders in "Mail, Contacts, Calendars" that I left on is in iCloud.
    The reminder app then appeared in the "location services" list and can be turned on.

  • Problem with af:selectInputDate (no calendar popup)

    Hi All,
    I have a problem with the af:selectInputDate component and the calendar popup when using a custom converter. My converter converts the date in a way, that it always has a four digit year depending on the short date format and the corresponding locale, e.g. 01/18/2007 instead of 01/18/07 for en-us. It looks like when I am using my converter with the component in the following way some javascript is not generated by the af:selectInputDate which results in an javascript error when clicking on the popup button:
    <h:panelGroup>
    <af:selectInputDate id="idPatientBirthDate" columns="12" simple="true" value="#{PatientDetails.patient.birthDate}">
    <f:converter converterId="BirthdateConverter" />
    </af:selectInputDate>
    <h:message for="idPatientBirthDate" errorClass="errorMessageStyle"></h:message>     
    </h:panelGroup>
    The following javascript is not generated using the above jsf:
    <script>
    if(window['_dfs'] == (void 0)){var _dfs=new Object();}_dfs["_id43:general:idPatientBirthDate"]='M/d/yyyy';function __id43Validator(){return true;}
    </script>
    I am using version 10.1.3.0.4 of ADF faces.
    My BirthdateConverter is a standard converter that implements the Converter interface and is not doing any magical. It works perfectly for other components. An interesting fact is, that the above javascript gets generated when I am using no converter at all or the standard date/time converters like f:convertDateTime provided by the RI. However, these don't provide the functionality I need.
    I have the bad feeling, that I am missing something. Does anyone else ran across this problem?
    Thanks,
    Herbert

    Frank,
    Thank you for your answer. I'm not using ADF BC, so is there a possible workaround? My model provides a standard java.util.Date. My converter looks like:
    public class BirthdateConverter implements Converter {
      public Object getAsObject(FacesContext facesContext, UIComponent uIComponent, String sDate) {
        Locale locale = facesContext.getCurrentInstance().getExternalContext().getRequestLocale();
        String pattern = AppUtil.getFourDigitYearPattern(DateFormat.SHORT);
        SimpleDateFormat sdf = new SimpleDateFormat(pattern, locale);
        java.util.Date d = sdf.parse(sDate);
        // converter logic
        return d;
      public String getAsString(FacesContext facesContext, UIComponent uIComponent, Object object) {
        if (object == null)
          return null;
        if (!(object instanceof Date))
          return object.toString();
        Locale locale = facesContext.getCurrentInstance().getExternalContext().getRequestLocale();
        String pattern = AppUtil.getFourDigitYearPattern(DateFormat.SHORT);
        SimpleDateFormat sdf = new SimpleDateFormat(pattern, locale);
        return sdf.format((java.util.Date)object);
    }AppUtil.getFourDigitYearPattern(DateFormat.SHORT) provides a date pattern, e.g. "M/d/yyyy" for locale en-us. In the above code I did not include try-catch blocks to make it more readable.
    Herbert
    Message was edited by:
    user575859

  • Calendar Popup Formatting

    Is there some way I can adjust the Calendar Popup formatting, especially the background colour.
    I imagine these formats are set in a CSS file somewhere, but would appreciate some help in finding them.
    Thanks

    From what I can tell when you place a date picker item on a page htmldb writes a script that calls the popup window. In this script it specifies the background color. I cannot see any way to change this though.
    When you inspect the source of the calendar popup there is not a link to any css file so that is not an option either.
    It looks like the background color is hard-coded somewhere in the htmldb engine. It would be a useful enhancement to add a link to a css file so we could customize the calendar.

  • Anyone built date/calendar popup??

    I have a third party calendar popup set of classes that I wish to use in a JTable.
    The JTable editor/renderer does not seem to work with this class. (Third party components fault)
    Has anyone developed their own calendar popup that can be used within a JTable to set dates.
    I'm working with JDK1.3, therefore cannot use JFormattedTextField, mores the pity!!!
    Any help/tips appreciated.
    Thanks,
    Rachel

    I did this about a year ago. I used Claude Dugay's JMaskField instead of JFormattedTextField. It's easy to find, but it needs to have some patches for a few quirks. You will probably recognize a lot of the code. I tried to make it handle a variety of Object types (Date, String, Calendar). I also needed an extra value (N/A for example). Here's the main class.import com.bbritta.jmaskfield.JMaskField;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.Border;
    import javax.swing.border.EmptyBorder;
    import javax.swing.border.EtchedBorder;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import javax.swing.plaf.basic.ComboPopup;
    import javax.swing.plaf.ComboBoxUI;
    import javax.swing.plaf.basic.BasicComboBoxEditor;
    import javax.swing.plaf.metal.MetalComboBoxUI;
    import com.sun.java.swing.plaf.motif.MotifComboBoxUI;
    import com.sun.java.swing.plaf.windows.WindowsComboBoxUI;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.GregorianCalendar;
    import java.util.Vector;
    import java.util.EventListener;
    public class DateComboBox extends JComboBox {
        private final static SimpleDateFormat defaultSDF = new SimpleDateFormat("MM/dd/yyyy");
        SimpleDateFormat sdf;
        Class returnClass=null;
        FormattedCalendar fc = new FormattedCalendar(sdf);
        Object alternate=null;
        MyComboBoxEditor mcbe;
        KeyAdapter ka = new KeyAdapter() {
         public void keyReleased(KeyEvent ke) {
             JTextField jtf = (JTextField)ke.getSource();
             switch (ke.getKeyCode()) {
              case KeyEvent.VK_ESCAPE:
                  jtf.setText(fc.toString());
                  break;
              case KeyEvent.VK_ENTER:
                  setValue(jtf.getText());
                  javax.swing.FocusManager.getCurrentManager().focusNextComponent(jtf);
                  break;
        JMaskField jmf = null;
        JTextField editorComponent;
        boolean blockItemStateEvent=false, blockActionEvent=false;
        private DatePopup datePopup;
        public DateComboBox(JMaskField JMF, SimpleDateFormat SDF) {
         this(SDF);
         setEditor(mcbe = new MyComboBoxEditor(jmf=JMF));
         ((JTextField)getEditor().getEditorComponent()).addKeyListener(ka);
        public DateComboBox(JMaskField JMF) { this(JMF, defaultSDF); }
        public DateComboBox(SimpleDateFormat SDF) {
         setFormat(sdf=SDF);
         editorComponent = (JTextField)getEditor().getEditorComponent();
         addItem(fc);
         editorComponent.addKeyListener(ka);
        public DateComboBox() {
         this(defaultSDF);
        // JComboBox source code sez not to override this, but waddahell
        public void actionPerformed(ActionEvent ae) {
         setValue(getEditor().getItem());
        public void setReturnClass(Class aClass) {
         if (aClass==null || aClass==String.class || aClass==Date.class ||
                       aClass.isAssignableFrom(Calendar.class)) {
             returnClass=aClass;
         } else throw new IllegalArgumentException("Invalid return class");
        public Class getReturnClass() { return returnClass; }
        public void setSelectedItem(Object item) { setValue(item); }
        public void setValue(Object value) {
         ((JTextField)getEditor().getEditorComponent()).setEditable(true);
         Object oldSelectedItem = super.getSelectedItem();
         blockActionEvent=true;
         blockItemStateEvent=true;
         dataModel.setSelectedItem(null);
         blockActionEvent=false;
         blockItemStateEvent=false;
         if (value instanceof Date) {
             if (jmf!=null) jmf.setMaskDocument();
             fc.setTime((Date)value);
             super.setSelectedItem(fc);
         } else if (value instanceof Calendar) {
             if (jmf!=null) jmf.setMaskDocument();
             fc.setTime(((Calendar)value).getTime());
             super.setSelectedItem(fc);
         } else if (alternate!=null && alternate.toString().equalsIgnoreCase(value.toString())) {
             if (jmf!=null) jmf.setOrigDocument();
             super.setSelectedItem(alternate);
             ((JTextField)getEditor().getEditorComponent()).setEditable(false);
         } else if (value instanceof String) {
             try {
              fc.setTime((String)value);
              super.setSelectedItem(fc);
              if (jmf!=null) jmf.setMaskDocument();
             catch (ParseException pe) {
              if (jmf!=null) jmf.setMaskDocument();
              super.setSelectedItem(value);
              fireInvalidDate(new InvalidDateEvent(this, value));
         } else {
             if (jmf!=null) jmf.setMaskDocument();
             fireInvalidDate(new InvalidDateEvent(this, value));
        public void addInvalidDateListener(InvalidDateListener l) {
         listenerList.add(InvalidDateListener.class, l);
        public void removeInvalidDateListener(InvalidDateListener l) {
         listenerList.remove(InvalidDateListener.class, l);
        protected void fireInvalidDate(final InvalidDateEvent e) {
         final Object[] listeners = listenerList.getListenerList();
    //     System.out.println("SI="+super.getSelectedIndex()+", lc="+listeners.length);
         SwingUtilities.invokeLater(new Runnable() { public void run() {
             for (int i=listeners.length-2; i>=0; i-=2 ) {
              if (listeners==InvalidDateListener.class ) {
              ((InvalidDateListener)listeners[i+1]).invalidDate(e);
    protected void fireActionEvent() {
         if (!blockActionEvent) super.fireActionEvent();
    protected void fireItemStateChanged(ItemEvent e) {
         if (!blockItemStateEvent) super.fireItemStateChanged(e);
    public Object getValue() {
         Object selectedItem = super.getSelectedItem();
         if (selectedItem==fc) {
         if (jmf != null) jmf.setMaskDocument();
         if (returnClass==null || returnClass==Calendar.class) return fc;
         if (returnClass==Date.class) return fc.getTime();
         if (returnClass==String.class) return fc.toString();
         } else if (selectedItem==alternate) if (jmf!=null) jmf.setOrigDocument();
         else if (jmf!=null) jmf.setMaskDocument();
         return selectedItem;
    public void setAlternate(Object Alternate) {
         if (alternate != null) super.removeItem(alternate);
         datePopup.setAlternate(Alternate);
         alternate = Alternate;
         super.addItem(alternate);
    public Object getAlternate() { return alternate; }
    public void updateUI() {
         ComboBoxUI cui = (ComboBoxUI) UIManager.getUI(this);
         if (cui instanceof MetalComboBoxUI) { cui = new MetalDateComboBoxUI(); }
         else if (cui instanceof MotifComboBoxUI) { cui = new MotifDateComboBoxUI(); }
         else if (cui instanceof WindowsComboBoxUI) { cui = new WindowsDateComboBoxUI(); }
         setUI(cui);
    class MetalDateComboBoxUI extends MetalComboBoxUI {
         protected ComboPopup createPopup() { return datePopup = new DatePopup(comboBox, sdf); }
    class WindowsDateComboBoxUI extends WindowsComboBoxUI {
         protected ComboPopup createPopup() { return datePopup = new DatePopup(comboBox, sdf); }
    class MotifDateComboBoxUI extends MotifComboBoxUI {
         protected ComboPopup createPopup() { return datePopup = new DatePopup(comboBox, sdf); }
    public void setFormat(SimpleDateFormat SDF) {
         datePopup.setFormat(SDF);
         fc.setFormat(SDF);
    public SimpleDateFormat getFormat() { return sdf; }
    class DatePopup implements ComboPopup, MouseMotionListener, MouseListener,
                   KeyListener, PopupMenuListener, ActionListener {
    private static final SimpleDateFormat defaultSDF = new SimpleDateFormat("MM/dd/yy");
    // protected SimpleDateFormat dateFormat = new SimpleDateFormat("MMM d, yyyy");
    protected SimpleDateFormat dateFormat;// = new SimpleDateFormat("MM/dd/yy");
    protected DateComboBox comboBox;
    protected Calendar calendar;
    protected JPopupMenu popup;
    protected JLabel monthLabel;
    protected JPanel days = null, alternatePanel = new JPanel(new FlowLayout());
    protected JButton alternateButton = new JButton();
    protected Vector listenerComponents = new Vector();
    protected SimpleDateFormat monthFormat = new SimpleDateFormat("MMM yyyy");
    protected void setFormat(SimpleDateFormat SDF) { dateFormat=SDF; }
    protected Color selectedBackground, selectedForeground,
                   background, foreground;
    public DatePopup(JComboBox comboBox) {
         this(comboBox, defaultSDF);
    public DatePopup(JComboBox comboBox, SimpleDateFormat SDF) {
         dateFormat = SDF;
         this.comboBox = (DateComboBox)comboBox;
         calendar = Calendar.getInstance();
         // check Look and Feel
         background = UIManager.getColor("ComboBox.background");
         foreground = UIManager.getColor("ComboBox.foreground");
         selectedBackground = UIManager.getColor("ComboBox.selectionBackground");
         selectedForeground = UIManager.getColor("ComboBox.selectionForeground");
         alternatePanel.setBackground(background);
         alternatePanel.setOpaque(true);
         alternateButton.setBorder(BorderFactory.createRaisedBevelBorder());
         alternatePanel.add(alternateButton);
         alternateButton.addActionListener(this);
         initializePopup();
    //========================================
    // begin ComboPopup method implementations
    public void show() {
         try {
         // if setSelectedItem() was called with a valid date, adjust the calendar
         calendar.setTime( dateFormat.parse( comboBox.getSelectedItem().toString() ) );
         } catch (Exception e) {}
         updatePopup();
         popup.show(comboBox, 0, comboBox.getHeight());
    public void hide() {
         for (int i=0; i<listenerComponents.size(); i++) {
         Component c = (Component)listenerComponents.get(i);
         EventListener[] l = c.getListeners(MouseListener.class);
         for (int j=0; j<l.length; j++) c.removeMouseListener((MouseListener)l[j]);
         listenerComponents.removeAllElements();
         popup.removePopupMenuListener(this);
         popup.setVisible(false);
    protected JList list = new JList();
    public JList getList() { return list; }
    public MouseListener getMouseListener() { return this; }
    public MouseMotionListener getMouseMotionListener() { return this; }
    public KeyListener getKeyListener() { return this; }
    public boolean isVisible() { return popup.isVisible(); }
    public void uninstallingUI() { popup.removePopupMenuListener(this); }
    // end ComboPopup method implementations
    //======================================
    //===================================================================
    // begin Event Listeners
    // MouseListener
    public void mousePressed( MouseEvent e ) {}
    public void mouseReleased( MouseEvent e ) {}
    // something else registered for MousePressed
    public void mouseClicked(MouseEvent e) {
         if ( !SwingUtilities.isLeftMouseButton(e) ) return;
         if ( !comboBox.isEnabled() ) return;
         if ( comboBox.isEditable() ) {
         comboBox.getEditor().getEditorComponent().requestFocus();
         } else comboBox.requestFocus();
         togglePopup();
    protected boolean mouseInside = false;
    public void mouseEntered(MouseEvent e) { mouseInside = true; }
    public void mouseExited(MouseEvent e) { mouseInside = false; }
    // MouseMotionListener
    public void mouseDragged(MouseEvent e) {}
    public void mouseMoved(MouseEvent e) {}
    // KeyListener
    public void keyPressed(KeyEvent e) {}
    public void keyTyped(KeyEvent e) {}
    public void keyReleased( KeyEvent e ) {
         if ( e.getKeyCode() == KeyEvent.VK_SPACE ||
         e.getKeyCode() == KeyEvent.VK_ENTER ) {
         togglePopup();
    * Variables hideNext and mouseInside are used to
    * hide the popupMenu by clicking the mouse in the JComboBox
    public void popupMenuCanceled(PopupMenuEvent e) {}
    protected boolean hideNext = false;
    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
         hideNext = mouseInside;
    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
    // end Event Listeners
    //=================================================================
    //===================================================================
    // begin Utility methods
    protected void togglePopup() {
         if ( isVisible() || hideNext ) hide();
         else show();
         hideNext = false;
    // end Utility methods
    //=================================================================
    // Note *** did not use JButton because Popup closes when pressed
    protected JLabel createUpdateButton(final int field, final int amount) {
         final JLabel label = new JLabel();
         final Border selectedBorder = new EtchedBorder();
         final Border unselectedBorder = new EmptyBorder(selectedBorder.getBorderInsets(new JLabel()));
         label.setBorder(unselectedBorder);
         label.setForeground(foreground);
         label.addMouseListener(new MouseAdapter() {
              public void mouseReleased(MouseEvent e) {
              calendar.add(field, amount);
              updatePopup();
              public void mouseEntered(MouseEvent e) {
              label.setBorder(selectedBorder);
              public void mouseExited(MouseEvent e) {
              label.setBorder(unselectedBorder);
         return label;
    protected void setAlternate(Object Alternate) {
         if (Alternate != null) {
         alternateButton.setText(Alternate.toString());
         if (alternatePanel.getParent()!=popup) popup.add(alternatePanel, BorderLayout.SOUTH);
         } else popup.remove(alternatePanel);
    protected void initializePopup() {
         JPanel header = new JPanel(); // used Box, but it wasn't Opaque
         header.setLayout(new BoxLayout(header, BoxLayout.X_AXIS));
         header.setBackground(background);
         header.setOpaque(true);
         JLabel label;
         label = createUpdateButton(Calendar.YEAR, -1);
         label.setText("<<");
         label.setToolTipText("Previous Year");
         header.add(Box.createHorizontalStrut(12));
         header.add(label);
         header.add(Box.createHorizontalStrut(12));
         label = createUpdateButton(Calendar.MONTH, -1);
         label.setText("<");
         label.setToolTipText("Previous Month");
         header.add(label);
         monthLabel = new JLabel("", JLabel.CENTER);
         monthLabel.setForeground(foreground);
         header.add(Box.createHorizontalGlue());
         header.add(monthLabel);
         header.add(Box.createHorizontalGlue());
         label = createUpdateButton(Calendar.MONTH, 1);
         label.setText(">");
         label.setToolTipText("Next Month");
         header.add(label);
         label = createUpdateButton(Calendar.YEAR, 1);
         label.setText(">>");
         label.setToolTipText("Next Year");
         header.add(Box.createHorizontalStrut(12));
         header.add(label);
         header.add(Box.createHorizontalStrut(12));
         popup = new JPopupMenu();
         popup.setBorder(BorderFactory.createLineBorder(Color.black));
         popup.setLayout(new BorderLayout());
         popup.setBackground(background);
         popup.addPopupMenuListener(this);
         popup.add(BorderLayout.NORTH, header);
    private SimpleDateFormat dowSDF = new SimpleDateFormat("EEE");
    public void actionPerformed(ActionEvent ae) {
         comboBox.setSelectedItem(comboBox.getAlternate());
         hide();
    // update the Popup when either the month or the year of the calendar has been changed
    protected void updatePopup() {
         monthLabel.setText( monthFormat.format(calendar.getTime()) );
         if (days != null) {
         popup.remove(days);
         days = new JPanel(new GridLayout(0, 7));
         days.setBackground(background);
         days.setOpaque(true);
         Calendar setupCalendar = (Calendar) calendar.clone();
         setupCalendar.set(Calendar.DAY_OF_WEEK, setupCalendar.getFirstDayOfWeek());
         for (int i = 0; i < 7; i++) {
         int dayInt = setupCalendar.get(Calendar.DAY_OF_WEEK);
         JLabel label = new JLabel(dowSDF.format(setupCalendar.getTime()));
         label.setHorizontalAlignment(JLabel.CENTER);
         label.setForeground(foreground);
         days.add(label);
         setupCalendar.roll(Calendar.DAY_OF_WEEK, true);
         setupCalendar = (Calendar) calendar.clone();
         setupCalendar.set(Calendar.DAY_OF_MONTH, 1);
         int first = setupCalendar.get(Calendar.DAY_OF_WEEK);
         for (int i = 0; i < (first - 1); i++) days.add(new JLabel(""));
         for (int i = 1; i <= setupCalendar.getActualMaximum(Calendar.DAY_OF_MONTH); i++) {
         final int day = i;
         final JLabel label = new JLabel(String.valueOf(day));
         label.setHorizontalAlignment(JLabel.CENTER);
         label.setForeground(foreground);
         listenerComponents.add(label);
         label.addMouseListener(new MouseAdapter() {
              public void mouseReleased(MouseEvent e) {
                   label.setOpaque(false);
                   label.setBackground(background);
                   label.setForeground(foreground);
                   calendar.set(Calendar.DAY_OF_MONTH, day);
                   comboBox.setSelectedItem(calendar);
                   hide();
                   comboBox.requestFocus();
              public void mouseEntered(MouseEvent e) {
                   label.setOpaque(true);
                   label.setBackground(selectedBackground);
                   label.setForeground(selectedForeground);
              public void mouseExited(MouseEvent e) {
                   label.setOpaque(false);
                   label.setBackground(background);
                   label.setForeground(foreground);
         days.add(label);
         popup.add(BorderLayout.CENTER, days);
         popup.pack();
    class MyComboBoxEditor extends BasicComboBoxEditor {
    public MyComboBoxEditor() {}
    public MyComboBoxEditor(JMaskField JMF) {
         super.editor = JMF;

  • NetUI tags and calendar popups

    Does anybody have an example of a simple calendar popup that can work with NetUI
    tags. I downloaded a couple different solutions from the net and they work fine
    when I use simple html form tags, however don't seem to work if I use the netui
    tags.
    Thanks!
    Kunal

    use the netui tagID
    <netui:form tagId="aForm" >
    <netui:textbox datasource="{actionForm.firstname}" tagId="firstName">
    then
    alert(document.forms[getNetuiTagName("aForm",this)][getNetuiTagName("firstName",this)].value)

  • Calendar popups with NetUI tags

    Does anybody have an example of a simple calendar popup that can work with NetUI
    tags. I downloaded a couple different solutions from the net and they work fine
    when I use simple html form tags, however don't seem to work if I use the netui
    tags.
    Thanks!
    Kunal

    Mike,
    Doc of choice tag says
    The <netui-data:choice> tag must be used together with the <netui-data:choiceMethod> tag in order to achieve conditional rendering of the body of a particular <netui-data:choice> tag. A single <netui-data:choiceMethod> and one or more <netui-data:choice> tags should be nested within a <b><netui-data:repeaterItem></b> tag.
    In my case, I don't have any repeaterItem...
    I have a value in pageContext; I want to compare the its value with any value in jsp. I can go for <logic:equal> as in struts. But I dont wnat to use struts. I wnat to use netui's tags. Moreover I dont want to use scriplets..
    Then How?
    Thanks.
    Prakash

Maybe you are looking for

  • Chart legend scroll bar

    Hi, i have a chart and legend in a panel.. when there are more than 20+(depends on size of the panel and in my case it is around 20) legend items, legend items occupies most of the place and which in turn shrinking chart..(so chart is not clear in th

  • How do I get my documents to print correctly?

    My MacBook Air is not printing to my canon printer correctly. Prints blank or with lines across page. I have installed printer drivers and did not help. Apple support has not been able to help with problem yet.

  • Iphoto 8 - after uploading web gallery

    After uploading gallery, how do I get a follow up on which photos have been downloaded, how many time they have been downloaded, when was the last time some visited ect... I want to know if I can delete them or keep them online for a while longer...

  • Full screen cupture

    Hello Has anyone managed to realize a full screen capture using camtasia or any other means with flash media server. I would very much appreciate any answer. Thanks

  • How do I unblock a contact

    How do I unblock a contact?