Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.1.3
-
None
-
None
-
java 1.4.2_13, myfaces 1.1.4, tomahawk 1.1.3, windows XP
Description
I have a jsp with the following components:
<t:outputText value="Processed Date/Time:"/>
<t:panelGroup rendered="#
">
<t:inputText styleClass="deactiveText" title="yyyy-MM-dd"
size="10" maxlength="10" readonly="true"/>
<t:inputText styleClass="deactiveText" title="HH:mm:ss"
size="8" maxlength="8" readonly="true"/>
</t:panelGroup>
<t:panelGroup rendered="#
">
<t:inputText binding="#
" size="10"
maxlength="10" immediate="true"
value="#
" title="yyyy-MM-dd"
forceId="true" id="processedDateStartDateInput">
<t:convertDateTime type="date" pattern="yyyy-MM-dd"/>
</t:inputText>
<t:inputText binding="#
" size="8"
maxlength="8" immediate="true"
value="#
" title="HH:mm:ss"
forceId="true" id="processedDateStartTimeInput">
<t:convertDateTime type="time" pattern="HH:mm:ss"/>
</t:inputText>
</t:panelGroup>
When the page is initially displayed the value of reportBean.dateCleared is false, so the first two inputText components are displayed. The source of the page looks like:
<td class="fieldLabelColumn">Processed Date/Time:</td>
<td class="defaultColumn">
<input id="mainform:_idJsp393" name="mainform:_idJsp393"
type="text" value="" maxlength="10" readonly="readonly"
size="10" title="yyyy-MM-dd" class="deactiveText"/>
<input id="mainform:_idJsp396" name="mainform:_idJsp396"
type="text" value="" maxlength="8" readonly="readonly"
size="8" title="HH:mm:ss" class="deactiveText"/>
</td>...
which shows what I would expect for the componet IDs.
The page also contains a jsCookMenu with an action method that causes the processed date fields to be set according to the user selection. The action method is executed with immediate="true" set on the menu component.
Once the date is set, the reportBean.dateCleared is set to false and the current page is re-rendered. The selected date is correctly displayed in the date fields, but the component IDs are not set correctly. After setting the date and the page re-rendered, the source looks like:
<td class="fieldLabelColumn">Processed Date/Time:</td>
<td class="defaultColumn">
<input id="mainform:processedDateStartDateInput"
name="mainform:processedDateStartDateInput" type="text"
value="2007-12-15" maxlength="10" size="10"
title="yyyy-MM-dd" />
<input id="mainform:processedDateStartTimeInput"
name="mainform:processedDateStartTimeInput" type="text"
value="23:59:59" maxlength="8" size="8"
title="HH:mm:ss"/>
</td>
The component IDs have the specified value, but the form name is prepended.
Once I navigate to the next page of the application, and then navigate back to this page (via an action method on a button), I see the following source:
<td class="fieldLabelColumn">Processed Date/Time:</td>
<td class="defaultColumn">
<input id="processedDateStartDateInput"
name="processedDateStartDateInput" type="text"
value="2007-12-15" maxlength="10" size="10"
title="yyyy-MM-dd" />
<input id="processedDateStartTimeInput"
name="processedDateStartTimeInput" type="text"
value="23:59:59" maxlength="8" size="8"
title="HH:mm:ss"/>
</td>
Now the component IDs are what I expected, just the ID without the form name prepended.
Any insight as to why the forceId doesn't appear to work when rendering the page after an (immediate) action, but it does work when rendering the page via navigation?
Thanks.