myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Resolved] (TOMAHAWK-1577) t:inputCalendar disabled status is not working with f:ajax
Date Thu, 28 Apr 2011 21:05:03 GMT


Leonardo Uribe resolved TOMAHAWK-1577.

       Resolution: Fixed
    Fix Version/s: 1.1.11-SNAPSHOT
         Assignee: Leonardo Uribe

I have checked it and the problem resides on how t:inputCalendar is rendered. It has this

<input id="aDate" ... />
<span id="aDateSpan" .../>
<script .... >...</script>
<input type="button" ... value="..."/>

The problem is when a render operation is requested for the calendar, the node that is replaced
is only the input textbox, and the remaining three still keep attached to the DOM tree.

The solution is just wrap everything inside a <span> tag and replace the id (but not
the name) of the input textbox to something different like aDate_input. I tried other alternatives
(create a facet for the button, but it will never be visited by the ajax render operation)
without success, so at the end this is the most reasonable alternative, even if it requires
a change on the input textbox.

> t:inputCalendar disabled status is not working with f:ajax
> ----------------------------------------------------------
>                 Key: TOMAHAWK-1577
>                 URL:
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: AJAX Form Components, Calendar
>    Affects Versions: 1.1.11-SNAPSHOT
>         Environment: Win XP, JDK, Tomcat 6.0.29, MyFaces 2.0.6 - Snapshots (built
from trunk of 09-04-2011), Tomahawk20-1.1.11 Snapshot (built from trunk of 09-04-2011)
>            Reporter: Oliver Bayer
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.11-SNAPSHOT
> I'm using a t:selectBooleanCheckbox with ajax functionality and the t:inputCalendar component.
The calendar should be enabled if the checkbox is checked and vice versa. By default the checkbox
is unchecked and the calendar disabled. The disabled calendar does not show the (disabled)
button for the popup at all. If the checkbox is checked the calendar stays disabled.
> See demo source code below:
> <t:selectBooleanCheckbox id="aCheckbox" value="#{mybean.aCheckbox}">
> 	<f:ajax event="valueChange" render="aDate" />
> </t:selectBooleanCheckbox>
> <t:inputCalendar id="aDate" 
> 	monthYearRowClass="yearMonthHeader" 
> 	weekRowClass="weekHeader" 
> 	popupButtonStyleClass="standard_bold"
> 	currentDayCellClass="currentDayCell" 
> 	value="#{mybean.aDate}" 
> 	renderAsPopup="true"
> 	popupTodayString="today"
> 	popupDateFormat="dd.MM.yyyy" 
> 	popupWeekString="week"
> 	forceId="true"
> 	disabled="#{mybean.aCheckbox == false}" />
> Maybe this ajax issue is related to this ticket: TOMAHAWK-1574

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message