Re: Adding Objects to an ArrayList (Checkboxes)
Re: Adding Objects to an ArrayList (Checkboxes)
- Subject: Re: Adding Objects to an ArrayList (Checkboxes)
- From: Janice Cheung <email@hidden>
- Date: Mon, 10 Oct 2005 19:51:40 -0400
Hi David,
When I do setAllServersTrue, my servers are being passed
correctly over:
public WOComponent setServersTrue(){
UserHome nextPage=(UserHome)pageWithName(UserHome);
nextPage.fetchByDnsName();
nextPage.setSelectedObjects(m_ServersA);
return nextPage;
}
When you do this, do all of the checkboxes appear "checked"?
Yes, when I do that, all the checkboxes appear "checked".
I noticed that when I do this:
public void setObjectSelected(boolean value) {
System.out.println("Now in setObjectsSelected with value: " + value
+ " and server: " + server);
if (value) {
nothing ever prints out when I go to the nextPage from my
EmailServerContacts() method. It seems as though
setObjectSelected doesn't get accessed to update the checked
checkBoxes. Is there a way to ensure that
setObjectSelected is called?
Thanks so much for helping me..
Janice
If so that is good, it means that the bindings are correct.
Also, I notice there is a bug in the code that I wrote (damn typing
off the top of my head!). This is wrong:
public boolean setObjectSelected(boolean value) {
<snip>
It should be:
public void setObjectSelected(boolean value) {
^^^^
Setter methods shouldn't have a return type (oops).
Since things are still not working, I recommend you follow Ken's
advice and add some kind of log statement to that method to track
down where it is breaking. ie:
public void setObjectSelected(boolean value) {
System.out.println("Now in setObjectsSelected with value: " +
value + " and server: " + server);
if (value) {
---etc---
--
;david
--
David LeBer
"I am codeferous!"
Codeferous Software
site: http://www.codeferous.com
blog: http://david.codeferous.com
_______________________________________________
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