myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <werner.p...@gmail.com>
Subject Re: Dojo integration usage documentation
Date Wed, 23 May 2007 15:28:43 GMT
Here is a custom facelet component I have written a while ago...


<ui:composition>
	<t:dojoInitializer require="dojo.widget.DropdownDatePicker" />
	<t:inputText value="#{entity[fieldName]}" id="#{id}" forceId="true" >
		<s:convertDateTime pattern="dd.MM.yyyy"/>
	</t:inputText>	
	<script type="text/javascript">
		var #{id}_value = dojo.byId("#{id}").value;
		if(!#{id}_value)
			#{id}_value = "";
		dojo.widget.createWidget("DropdownDatePicker",{widgetId:
"#{id}_dojoWidget", inputId: "#{id}", inputName: "#{id}",
dateFormat:"%d.%m.%Y"
		},dojo.byId('#{id}'));
				dojo.widget.byId("#{id}_dojoWidget").inputNode.value = #{id}_value;
	</script>
</ui:composition>


usage:
<ir:dojodatepicker id="fromDate"				
entity="#{appointmentdetailview}"				fieldName="startDate" />
								>








Juan Ignacio Sánchez Lara schrieb:
> I've just seen at the wiki a really interesting article
> <http://wiki.apache.org/myfaces/WYSIWYG_Editor> about Dojo wrapping
> inside Tomahawk. Can I do something similar to use dropdown calendar??
> Is it documented somewhere??
> 
> -- 
> Juan Ignacio Sánchez Lara
> Ingeniero Informático + Técnico de Sistemas
> 
> Diario: http://juanignaciosl.blogspot.com
> Ideas + Ingeniería del Software: http://iiso.blogspot.com/
> 
> Fotos (todas): http://www.flickr.com/photos/juanignaciosl
> Fotos (selección): http://jpgmag.com/people/juanignaciosl


Mime
View raw message