myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Decker (JIRA)" <myfaces-...@incubator.apache.org>
Subject [jira] Commented: (MYFACES-181) onchange attribute for x:inputCalendar
Date Fri, 15 Apr 2005 13:24:16 GMT
     [ http://issues.apache.org/jira/browse/MYFACES-181?page=comments#action_62896 ]
     
Rob Decker commented on MYFACES-181:
------------------------------------

Adding pass-through html attributes shouldn't just be arbitrarily decided by whether or not
the component developer thinks it is useful. They should be added becuase they belong to the
element used per the html spec. Leaving them off just means limiting what a user can do with
the component. It's not an improvement, it's a bug that an input component doesn't have an
onchange attribute. 

> onchange attribute for x:inputCalendar
> --------------------------------------
>
>          Key: MYFACES-181
>          URL: http://issues.apache.org/jira/browse/MYFACES-181
>      Project: MyFaces
>         Type: Improvement
>  Environment: Fedora Core 3, Weblogic 8.1|JBoss 4
>     Reporter: Galen Dunkleberger
>     Priority: Trivial

>
> I know this is super trivial but it would be nice to have the onchange attribute available
for the calendar component. Both for when the user selected a new date via the popup or if
they enter a new date in the input box. I think it's really just a matter of adding the onchange
attribute to the tag and adding a small line in the javascript....
> function jscalendarCloseCalendar() {
> 	jscalendarHideCalendar();
> 	
> 	if( jscalendarMyFacesCtlType!="x:inputDate" )
> 	{
> 		jscalendarCtlToPlaceValue.value = jscalendarConstructDate(jscalendarDateSelected,jscalendarMonthSelected,jscalendarYearSelected)
> 		var onchange=jscalendarCtlToPlaceValue.getAttribute("onchange");
> 		if(onchange)
> 		{
> 			eval(onchange);
> 		}
> 	}
> 	else
> 	{
> 		document.getElementById(jscalendarMyFacesInputDateClientId+".day").value = jscalendarDateSelected;
> 		document.getElementById(jscalendarMyFacesInputDateClientId+".month").value = jscalendarMonthSelected+1;
> 		document.getElementById(jscalendarMyFacesInputDateClientId+".year").value = jscalendarYearSelected;
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message