Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.2, 1.7DR#2
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Win XP SP2, component-showcase
-
ICEsoft Forum Reference:
Description
Some comments in the JForum posting, as well as comments by Sheng Gu in ICE-1343 led me to investigate ice:selectInputDate. Here are the issues that I found. I'm putting these in a single Jira because I think it'll just be a huge hassle trying to address and commit these issues separately.
1. Can't clear out the text field to make no date selected. Select a date, and see that it validates, and is set into the bean. Then go clear out the text field, and tab away. It gets a null submittedValue, but the value does not become null, and the bean does not get the null value.
2. If you try to implement a Cancel button by setting immediate="true" on it, and having its actionListener null out values in the bean, it won't work with selectInputDate, because clicking on the button will also submit the form, and cause a series of interactions that will result in the date existing again. Amusingly enough, it will work with imediate="false".
1. Can't clear out the text field to make no date selected. Select a date, and see that it validates, and is set into the bean. Then go clear out the text field, and tab away. It gets a null submittedValue, but the value does not become null, and the bean does not get the null value.
2. If you try to implement a Cancel button by setting immediate="true" on it, and having its actionListener null out values in the bean, it won't work with selectInputDate, because clicking on the button will also submit the form, and cause a series of interactions that will result in the date existing again. Amusingly enough, it will work with imediate="false".
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:
{adminScheduleHandler.showEditor}"=======================================================================================
<!-- panel popup code, modal type -->
<ice:panelPopup id="popupDiv"
rendered="#
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">
{adminScheduleHandler.showEditor}<ice:panelGrid width="100%" cellpadding="0"
cellspacing="0" columns="1"
rendered="#
"
styleClass="popupLayoutGridStyle"
style="z-index:2;">
<!-- ======================= new entries =========================== -->
{adminScheduleHandler.new}"<ice:panelGrid columns="2" id="newEntries" rendered="#
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) {
{ 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; .... }switch (event.getEventType())