Re: [ANN] AjaxDatePicker and AjaxDefaultSubmitButton
Re: [ANN] AjaxDatePicker and AjaxDefaultSubmitButton
- Subject: Re: [ANN] AjaxDatePicker and AjaxDefaultSubmitButton
- From: Chuck Hill <email@hidden>
- Date: Fri, 27 Mar 2009 08:02:02 -0700
On Mar 27, 2009, at 12:56 AM, Ramon Havermans wrote:
On Mar 26, 2009, at 6:16 PM, Chuck Hill wrote:
_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.
I removed the event.stop();, this works in my case! Thanx!
I am not sure why they stop it. It does not seem to be required.
One other thing is when you reopen the AMD a second time (without
doing a page refresh) the css will be lost. To fix it I adding the
css in the appendToResponse of the AMD with ERXResponseRewriter,
just like your note about putting the javascript in there. Now it
looks like its working.
I don't see this problem. Is this only after using the close link?
If I close it using my controls, and open it again, it looks as it did
the first time.
One minor thing is, it won't like the user resising the browser
though, but i think we will take that for granted.
Feel free to submit a patch! :-)
Chuck
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:
@cpp.nl
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
--
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