• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOCheckBox woes.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOCheckBox woes.


  • Subject: Re: WOCheckBox woes.
  • From: Zac Konopa <email@hidden>
  • Date: Fri, 21 Jul 2006 10:23:02 -0700

Dave and Owen,

Thanks for the help guys. I didn't have the form submitted by a submit button, I was using a WOActiveImage. Initially I was using a submit button, but as the app evolved the client wanted an image in place of the submit. Initially I used a custom WO that used javascript to submit the form. But at some point it was switched to the WOActiveImage. It seems that the changes in text fields was posting normally but my check box changes weren't being posted. The problem wasn't noticed for a while after the change happened though so it was tough to walk back through the development history to figure it out. Once again thanks guys, your suggestions were invaluable in quickly solving this problem.

Zac

On Jul 20, 2006, at 4:51 PM, Dave Elsner wrote:

Hi Zac,

Your HTML should look like this

	<webobject name="Form1">
		<webobject name="CheckBox1"></webobject>
		<webobject name="SubmitButton1"></webobject>
	</webobject>

Wod file:

CheckBox1: WOCheckBox {
	checked = aBoolean;
}


Java File:

 public boolean aBoolean;



However if the form only contains checkboxes an none of them are checked the form does not post any vales back to the server resulting in all the values remaining as is.
To overcome this insert a HiddenField on the form e.g


<input type="hidden" name="blah" value="blah">

Regards
Dave


On 21/07/2006, at 9:27 AM, Zac Konopa wrote:

Okay all,

I'm having a weird problem and I think it's a result of not having a clear understanding of the working of all the bindings involved. I've got a WOCheckBox. I have bound to it's checked attribute a primitive boolean value. Said boolean is set to "true" when the page is instantiated. The page is accurately displayed with the check box checked. If I leave the boxes alone the boolean variable retains it's "true" state. When I uncheck the box as I understand it the boolean should be assigned the value "false". Instead I'm getting a null value in my boolean. Am I misunderstanding the use of the checked binding for WOCheckBox or do I need to look elsewhere in my code?

Thanks,

Zac
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40uow.edu.au


This email sent to email@hidden


_______________________________________________ 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
  • Follow-Ups:
    • Re: WOCheckBox woes.
      • From: Paul Lynch <email@hidden>
References: 
 >WOCheckBox woes. (From: Zac Konopa <email@hidden>)
 >Re: WOCheckBox woes. (From: Dave Elsner <email@hidden>)

  • Prev by Date: Re: Pulldown Menu and WOPopUpButton
  • Next by Date: Re: WWDC Security concern
  • Previous by thread: Re: WOCheckBox woes.
  • Next by thread: Re: WOCheckBox woes.
  • Index(es):
    • Date
    • Thread