Hi Mark,
As I ever stated, my popup panel is not selectInputDate component. It is just a popup panel. The partial code snippet is as follows:
=======================================================================================
<!-- panel popup code, modal type -->
<ice:panelPopup id="popupDiv"
rendered="#
{adminScheduleHandler.showEditor}"
visible="#{adminScheduleHandler.showEditor}
"
draggable="true"
style="z-index:1001; width: 370px; height: 300px; top: 300px; left: 300px; position: absolute;">
<f:facet name="header">
<ice:outputText styleClass="popupTitle"
value="Admin Schedule Editor"/>
</f:facet>
<f:facet name="body">
<ice:panelGrid width="100%" cellpadding="0"
cellspacing="0" columns="1"
rendered="#
{adminScheduleHandler.showEditor}
"
styleClass="popupLayoutGridStyle"
style="z-index:2;">
<!-- ======================= new entries =========================== -->
<ice:panelGrid columns="2" id="newEntries" rendered="#
{adminScheduleHandler.new}"
columnClasses="rightCol, leftCol">
<ice:outputText value="Start Time:" />
<ice:panelGroup>
<ice:selectOneMenu styleClass="selectTagMenu"
value="#{adminScheduleHandler.startHour}"
style="width:50px;">
<f:selectItems value="#{adminScheduleHandler.hourItems}"/>
</ice:selectOneMenu>
<ice:outputText value=": " />
<ice:selectOneMenu styleClass="selectTagMenu"
value="#{adminScheduleHandler.startMin}"
style="width:50px;">
<f:selectItems value="#{adminScheduleHandler.minItems}"/>
</ice:selectOneMenu>
<ice:selectOneMenu styleClass="selectTagMenu"
value="#{adminScheduleHandler.startAmpm}"
style="width:50px;">
<f:selectItems value="#{adminScheduleHandler.ampmItems}"/>
</ice:selectOneMenu>
</ice:panelGroup>
<ice:outputLabel for="interval1" value="Interval:" />
<ice:panelGroup>
<ice:selectOneMenu id="interval1" styleClass="selectTagMenu"
value="#{adminScheduleHandler.interval}"
style="width:120px;">
<f:selectItems value="#{adminScheduleHandler.intervalItems}"/>
</ice:selectOneMenu>
<ice:message for="interval1" />
</ice:panelGroup>
</ice:panelGrid>
<ice:panelGroup style="text-align: center; width:100%;">
<ice:commandButton actionListener="#{adminScheduleHandler.cancelEditor}"
style="z-index:2;" value="Cancel" />
<ice:commandButton action="#{adminScheduleHandler.createEntries}"
value="Create Entries" rendered="#{adminScheduleHandler.new}
"
style="z-index:2;"/>
</ice:panelGroup>
......
public void scheduleClicked(ScheduleMouseEvent event) {
switch (event.getEventType())
{
case ScheduleMouseEvent.SCHEDULE_BODY_CLICKED:
log.info("time=" + event.getClickedTime().toString());
startTime = event.getClickedTime();
Calendar calendar = GregorianCalendar.getInstance();
if (startTime == null)
startTime = new Date();
calendar.setTime(startTime);
startHour = calendar.get(Calendar.HOUR);
startMin = calendar.get(Calendar.MINUTE);
startAmpm = calendar.get(Calendar.AM_PM);
isNew = true;
showEditor = true;
break;
....
}
#1 Fixed.
I also made it so that when you click on a date in the popup calendar, it will set the focus on the button you just clicked, and not the selectInputDate's input text field, since the input text field uses an onblur handler, so if you then click anywhere else it would have submitted the form again, redundantly.
#2 This is just how JSF works. After getting rid of the needless update from the onblur, I realised that it's doing what it should.
Trunk: Subversion 15150
icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java
ICEfaces 1.6.2 Branch: Subversion15151
icefaces\component\src\com\icesoft\faces\component\selectinputdate\SelectInputDateRenderer.java