Re: Oddity with disabled Submit button
Re: Oddity with disabled Submit button
- Subject: Re: Oddity with disabled Submit button
- From: email@hidden
- Date: Thu, 09 Oct 2003 11:03:02 CDT
- Priority: 3 (Normal)
[demime could not interpret encoding binary - treating as plain text]
I'm surprised that setting disabled even succesfully greys out the
button. For a WOHyperlink, setting disabled to true simply makes the
hyperlink disappear entirely. Really, HTML does not provide any
facilities for automatically 'disabling' a button like this. [Unless
there's something in CSS I don't know about---but even if there is, I'm
confident that the built in WO elements are not using any CSS].
I'm not sure exactly how to explain what you are seeeing, but I think
you're going to have to write your own facilities to do this. The first
step is figuring out exactly how you are going to accomplish this in
HTML. Once you do this, it should be easy to write your own reuseable
WOComponent to implement this functionality.
One option would be using graphical submit buttons (beware that some
versions of Mac IE have problems with graphical submit buttons on forms
that contain file uploads; otherwise, no problem). You can create a
graphical icon for the 'live' submit button and the 'greyed out' submit
button. You can create your own reuseable component that has bindings
for the 'live' button filename, the 'greyed out' button filename, and a
binding for 'disabled'. If not disabled, your component will put in a
graphical submit button with the specified 'live' graphic. If disabled,
your component will put in a simple WOImage, not a live hyperlink or form
submit, with the greyed out button.
[Beware that the 'disabled' value must not change in between the time of
page generation and the time that the user clicks on the active element,
triggering takeValuesFromRequest and invokeAction! This is true even of
the built-in 'disabled' bindings, like the one on WOHyperlink, and will
probably be true of your own implementation too. The reason for this
can't be well explained in just a couple sentances, but I can try in
another post if you want to know.]
--Jonathan
On Thu, 9 Oct 2003 09:26:23 -0400 Arturo Pirez wrote:
> My setup.
>
> WO5.2 (according to EOModeller. Where should I look?). OSX 10.2.8.
>
> I have a form with lots of submit buttons (of course :-). Multiple
> submit set to true.
> A pair of these buttons have methods bound to the disabled setting.
> When the button is set to be
> disabled it greys out very nicely. But if you click on one of these
> disabled buttons the form is still posted.
>
> That does not seem to be the correct behavior. Shouldn't nothing
> happen?
>
>
> -------
> WebObjects in Philadelphia. You want a cheesesteak with that?
> Visit http://webobjects.meetup.com
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.