Re: [ANN] AjaxDatePicker and AjaxDefaultSubmitButton
Re: [ANN] AjaxDatePicker and AjaxDefaultSubmitButton
- Subject: Re: [ANN] AjaxDatePicker and AjaxDefaultSubmitButton
- From: Chuck Hill <email@hidden>
- Date: Thu, 26 Mar 2009 10:16:29 -0700
On Mar 26, 2009, at 7:51 AM, Ramon Havermans wrote:
Hi there,
I want to use the AjaxDatePicker, but i am using the
AjaxModalDialogOpener... The note from chuck is needed to get things
going.
There is an other issue as well. If you open the datepicker and
don't choose a value and then close the dialog with the x button,
you will see the datepicker on the page which opened the AMD
(without any style, because the stylesheet isn't loaded there).
I always make my dialogs locked so that the user has to click one of
my controls to get out. This allows me to ensure that ec.revert() or
whatever is called.
I think the problem here is that the event is stopped if the user
clicks on the overlay or the close link:
_hide: function(event) { // Internal hide method to use with overlay
and close link
event.stop(); // Stop event propaganation for link elements
I am not sure what the effect would be if this is not done. I will
try and look at this later.
Maybe the days and months translation could be better. I think it
could lookup the values with ERXLocalizer and the English word as a
value? Than you could just put in the days and months translation in
your own Localizable.strings and it would work.
I did not do that on purpose. These components are intended for use
in non-Wonder apps too and I did not want to tie them into Wonder's
localization.
Chuck
In the interests of keeping folks up to date with what is getting
added to Wonder...
AjaxDatePicker
Shameless port and adoption of Rails Date Kit (Swazz Calendar with
extra goodness). This input understands the format symbols %d, %e,
%b, %m, %B, %y, and %Y. See the NSTimestampFormatter for what these
symbols do. This component can also understand the corresponding
symbols from java.text.SimpleDateFormat. You can use any date
format allowed by these symbols. The translation from
SimpleDateFormat symbols to NSTimestampFormatter symbols may have
some defects. Localization is also supported. The AjaxExamples
page shows a French version.
NOTE: the AjaxDatePicker does NOT play nice with the
AjaxModalDialogOpener. There is some sort of initialization
conflict (I think) with Prototype that leaves you with a blank page
and the browser waiting forever for something (and I have not been
able to determine what it is) as soon as calendar.js loads and
initialized. It will work if the page the AMD appears on explicitly
loads the calendar.js in it's HEAD:
public void appendToResponse(WOResponse response, WOContext
context) {
super.appendToResponse(response, context);
ERXResponseRewriter.addScriptResourceInHead(response, context(),
"Ajax", "calendar.js");
}
Full details in JavaDoc.
AjaxDefaultSubmitButton
Invisible form submit button that can be included as the first
element in an Ajax submitted form so that hitting enter performs
the action bound to this button. It supports most of the other
AjaxSubmitButton bindings.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden